• Home
  • Raw
  • Download

Lines Matching refs:netdev

27 static struct internal_dev *internal_dev_priv(struct net_device *netdev)  in internal_dev_priv()  argument
29 return netdev_priv(netdev); in internal_dev_priv()
34 internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) in internal_dev_xmit() argument
40 err = ovs_vport_receive(internal_dev_priv(netdev)->vport, skb, NULL); in internal_dev_xmit()
44 struct pcpu_sw_netstats *tstats = this_cpu_ptr(netdev->tstats); in internal_dev_xmit()
51 netdev->stats.tx_errors++; in internal_dev_xmit()
56 static int internal_dev_open(struct net_device *netdev) in internal_dev_open() argument
58 netif_start_queue(netdev); in internal_dev_open()
62 static int internal_dev_stop(struct net_device *netdev) in internal_dev_stop() argument
64 netif_stop_queue(netdev); in internal_dev_stop()
68 static void internal_dev_getinfo(struct net_device *netdev, in internal_dev_getinfo() argument
110 static void do_setup(struct net_device *netdev) in do_setup() argument
112 ether_setup(netdev); in do_setup()
114 netdev->max_mtu = ETH_MAX_MTU; in do_setup()
116 netdev->netdev_ops = &internal_dev_netdev_ops; in do_setup()
118 netdev->priv_flags &= ~IFF_TX_SKB_SHARING; in do_setup()
119 netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_OPENVSWITCH | in do_setup()
121 netdev->needs_free_netdev = true; in do_setup()
122 netdev->priv_destructor = NULL; in do_setup()
123 netdev->ethtool_ops = &internal_dev_ethtool_ops; in do_setup()
124 netdev->rtnl_link_ops = &internal_dev_link_ops; in do_setup()
126 netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST | in do_setup()
130 netdev->vlan_features = netdev->features; in do_setup()
131 netdev->hw_enc_features = netdev->features; in do_setup()
132 netdev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX; in do_setup()
133 netdev->hw_features = netdev->features & ~NETIF_F_LLTX; in do_setup()
135 eth_hw_addr_random(netdev); in do_setup()
209 struct net_device *netdev = skb->dev; in internal_dev_recv() local
211 if (unlikely(!(netdev->flags & IFF_UP))) { in internal_dev_recv()
213 netdev->stats.rx_dropped++; in internal_dev_recv()
222 skb->protocol = eth_type_trans(skb, netdev); in internal_dev_recv()
224 dev_sw_netstats_rx_add(netdev, skb->len); in internal_dev_recv()
237 int ovs_is_internal_dev(const struct net_device *netdev) in ovs_is_internal_dev() argument
239 return netdev->netdev_ops == &internal_dev_netdev_ops; in ovs_is_internal_dev()
242 struct vport *ovs_internal_dev_get_vport(struct net_device *netdev) in ovs_internal_dev_get_vport() argument
244 if (!ovs_is_internal_dev(netdev)) in ovs_internal_dev_get_vport()
247 return internal_dev_priv(netdev)->vport; in ovs_internal_dev_get_vport()