Lines Matching full:netdev
21 * @netdev: pointer to port representor netdev
26 ice_repr_get_phys_port_name(struct net_device *netdev, char *buf, size_t len) in ice_repr_get_phys_port_name() argument
28 struct ice_netdev_priv *np = netdev_priv(netdev); in ice_repr_get_phys_port_name()
45 * @netdev: pointer to port representor netdev
49 ice_repr_get_stats64(struct net_device *netdev, struct rtnl_link_stats64 *stats) in ice_repr_get_stats64() argument
51 struct ice_netdev_priv *np = netdev_priv(netdev); in ice_repr_get_stats64()
76 * @netdev: pointer to port representor netdev
78 struct ice_repr *ice_netdev_to_repr(struct net_device *netdev) in ice_netdev_to_repr() argument
80 struct ice_netdev_priv *np = netdev_priv(netdev); in ice_netdev_to_repr()
87 * @netdev: network interface device structure
95 static int ice_repr_open(struct net_device *netdev) in ice_repr_open() argument
97 struct ice_repr *repr = ice_netdev_to_repr(netdev); in ice_repr_open()
105 netif_carrier_on(netdev); in ice_repr_open()
106 netif_tx_start_all_queues(netdev); in ice_repr_open()
113 * @netdev: network interface device structure
121 static int ice_repr_stop(struct net_device *netdev) in ice_repr_stop() argument
123 struct ice_repr *repr = ice_netdev_to_repr(netdev); in ice_repr_stop()
131 netif_carrier_off(netdev); in ice_repr_stop()
132 netif_tx_stop_all_queues(netdev); in ice_repr_stop()
138 ice_repr_get_devlink_port(struct net_device *netdev) in ice_repr_get_devlink_port() argument
140 struct ice_repr *repr = ice_netdev_to_repr(netdev); in ice_repr_get_devlink_port()
204 return ice_add_cls_flower(repr->netdev, repr->src_vsi, flower); in ice_repr_setup_tc_cls_flower()
230 ice_repr_setup_tc(struct net_device *netdev, enum tc_setup_type type, in ice_repr_setup_tc() argument
233 struct ice_netdev_priv *np = netdev_priv(netdev); in ice_repr_setup_tc()
260 * ice_is_port_repr_netdev - Check if a given netdevice is a port representor netdev
261 * @netdev: pointer to netdev
263 bool ice_is_port_repr_netdev(struct net_device *netdev) in ice_is_port_repr_netdev() argument
265 return netdev && (netdev->netdev_ops == &ice_repr_netdev_ops); in ice_is_port_repr_netdev()
269 * ice_repr_reg_netdev - register port representor netdev
270 * @netdev: pointer to port representor netdev
273 ice_repr_reg_netdev(struct net_device *netdev) in ice_repr_reg_netdev() argument
275 eth_hw_addr_random(netdev); in ice_repr_reg_netdev()
276 netdev->netdev_ops = &ice_repr_netdev_ops; in ice_repr_reg_netdev()
277 ice_set_ethtool_repr_ops(netdev); in ice_repr_reg_netdev()
279 netdev->hw_features |= NETIF_F_HW_TC; in ice_repr_reg_netdev()
281 netif_carrier_off(netdev); in ice_repr_reg_netdev()
282 netif_tx_stop_all_queues(netdev); in ice_repr_reg_netdev()
284 return register_netdev(netdev); in ice_repr_reg_netdev()
315 repr->netdev = alloc_etherdev(sizeof(struct ice_netdev_priv)); in ice_repr_add()
316 if (!repr->netdev) { in ice_repr_add()
324 np = netdev_priv(repr->netdev); in ice_repr_add()
338 repr->netdev->min_mtu = ETH_MIN_MTU; in ice_repr_add()
339 repr->netdev->max_mtu = ICE_MAX_MTU; in ice_repr_add()
341 SET_NETDEV_DEV(repr->netdev, ice_pf_to_dev(vf->pf)); in ice_repr_add()
342 err = ice_repr_reg_netdev(repr->netdev); in ice_repr_add()
346 devlink_port_type_eth_set(&vf->devlink_port, repr->netdev); in ice_repr_add()
358 free_netdev(repr->netdev); in ice_repr_add()
359 repr->netdev = NULL; in ice_repr_add()
382 unregister_netdev(vf->repr->netdev); in ice_repr_rem()
384 free_netdev(vf->repr->netdev); in ice_repr_rem()
385 vf->repr->netdev = NULL; in ice_repr_rem()
443 netif_carrier_on(repr->netdev); in ice_repr_start_tx_queues()
444 netif_tx_start_all_queues(repr->netdev); in ice_repr_start_tx_queues()
453 netif_carrier_off(repr->netdev); in ice_repr_stop_tx_queues()
454 netif_tx_stop_all_queues(repr->netdev); in ice_repr_stop_tx_queues()
464 struct ice_netdev_priv *np = netdev_priv(repr->netdev); in ice_repr_set_traffic_vsi()