Lines Matching refs:netdev

47 	eth_hw_addr_set(bd->netdev, bd->pf.mac_addr);  in bnge_init_mac_addr()
52 struct bnge_net *bn = netdev_priv(bd->netdev); in bnge_set_tpa_flags()
56 if (bd->netdev->features & NETIF_F_LRO) in bnge_set_tpa_flags()
58 else if (bd->netdev->features & NETIF_F_GRO_HW) in bnge_set_tpa_flags()
73 struct bnge_net *bn = netdev_priv(bd->netdev); in bnge_set_ring_params()
78 rx_size = SKB_DATA_ALIGN(bn->netdev->mtu + ETH_HLEN + NET_IP_ALIGN + 8); in bnge_set_ring_params()
96 jumbo_factor = PAGE_ALIGN(bn->netdev->mtu - 40) >> PAGE_SHIFT; in bnge_set_ring_params()
103 netdev_warn(bn->netdev, "RX ring size reduced from %d to %d due to jumbo ring\n", in bnge_set_ring_params()
116 netdev_warn(bn->netdev, "RX agg ring size %d reduced to %d.\n", in bnge_set_ring_params()
148 netdev_warn(bn->netdev, "completion ring size %d reduced to %d.\n", in bnge_set_ring_params()
157 struct net_device *netdev; in bnge_netdev_alloc() local
161 netdev = alloc_etherdev_mqs(sizeof(*bn), max_irqs * BNGE_MAX_QUEUE, in bnge_netdev_alloc()
163 if (!netdev) in bnge_netdev_alloc()
166 SET_NETDEV_DEV(netdev, bd->dev); in bnge_netdev_alloc()
167 bd->netdev = netdev; in bnge_netdev_alloc()
169 netdev->netdev_ops = &bnge_netdev_ops; in bnge_netdev_alloc()
171 bnge_set_ethtool_ops(netdev); in bnge_netdev_alloc()
173 bn = netdev_priv(netdev); in bnge_netdev_alloc()
174 bn->netdev = netdev; in bnge_netdev_alloc()
177 netdev->min_mtu = ETH_ZLEN; in bnge_netdev_alloc()
178 netdev->max_mtu = bd->max_mtu; in bnge_netdev_alloc()
180 netdev->hw_features = NETIF_F_IP_CSUM | in bnge_netdev_alloc()
196 netdev->hw_features |= NETIF_F_GSO_UDP_L4; in bnge_netdev_alloc()
199 netdev->hw_features |= NETIF_F_LRO; in bnge_netdev_alloc()
201 netdev->hw_enc_features = NETIF_F_IP_CSUM | in bnge_netdev_alloc()
214 netdev->hw_enc_features |= NETIF_F_GSO_UDP_L4; in bnge_netdev_alloc()
216 netdev->gso_partial_features = NETIF_F_GSO_UDP_TUNNEL_CSUM | in bnge_netdev_alloc()
219 netdev->vlan_features = netdev->hw_features | NETIF_F_HIGHDMA; in bnge_netdev_alloc()
221 netdev->hw_features |= BNGE_HW_FEATURE_VLAN_ALL_RX; in bnge_netdev_alloc()
223 netdev->hw_features |= BNGE_HW_FEATURE_VLAN_ALL_TX; in bnge_netdev_alloc()
226 netdev->hw_features |= NETIF_F_GRO_HW; in bnge_netdev_alloc()
228 netdev->features |= netdev->hw_features | NETIF_F_HIGHDMA; in bnge_netdev_alloc()
230 if (netdev->features & NETIF_F_GRO_HW) in bnge_netdev_alloc()
231 netdev->features &= ~NETIF_F_LRO; in bnge_netdev_alloc()
233 netdev->priv_flags |= IFF_UNICAST_FLT; in bnge_netdev_alloc()
235 netif_set_tso_max_size(netdev, GSO_MAX_SIZE); in bnge_netdev_alloc()
237 netif_set_tso_max_segs(netdev, bd->tso_max_segs); in bnge_netdev_alloc()
248 rc = register_netdev(netdev); in bnge_netdev_alloc()
257 free_netdev(netdev); in bnge_netdev_alloc()
263 struct net_device *netdev = bd->netdev; in bnge_netdev_free() local
265 unregister_netdev(netdev); in bnge_netdev_free()
266 free_netdev(netdev); in bnge_netdev_free()
267 bd->netdev = NULL; in bnge_netdev_free()