Lines Matching full:net_device
91 void netdev_set_default_ethtool_ops(struct net_device *dev,
93 void netdev_sw_irq_coalesce_default_on(struct net_device *dev);
311 int (*create) (struct sk_buff *skb, struct net_device *dev,
317 const struct net_device *dev,
397 struct net_device *dev;
466 * Currently, a net_device can only have a single rx_handler registered. Trying
469 * To register a rx_handler on a net_device, use netdev_rx_handler_register().
470 * To unregister a rx_handler on a net_device, use
481 * net_device, it should return RX_HANDLER_ANOTHER. The rx_handler for the
591 int dev_set_threaded(struct net_device *dev, bool threaded);
672 struct net_device *dev;
689 struct net_device *sb_dev;
713 * "ops protected", see comment about net_device::lock
768 bool rps_may_expire_flow(struct net_device *dev, u16 rxq_index, u32 flow_id,
772 /* XPS map type and offset of the xps map within net_device->xps_maps[]. */
862 typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
864 struct net_device *sb_dev);
877 const struct net_device *dev;
917 const struct net_device *dev;
1046 * int (*ndo_init)(struct net_device *dev);
1052 * void (*ndo_uninit)(struct net_device *dev);
1056 * int (*ndo_open)(struct net_device *dev);
1060 * int (*ndo_stop)(struct net_device *dev);
1065 * struct net_device *dev);
1074 * struct net_device *dev
1083 * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
1084 * struct net_device *sb_dev);
1088 * void (*ndo_change_rx_flags)(struct net_device *dev, int flags);
1092 * void (*ndo_set_rx_mode)(struct net_device *dev);
1097 * int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
1102 * int (*ndo_validate_addr)(struct net_device *dev);
1105 * int (*ndo_do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
1110 * int (*ndo_siocbond)(struct net_device *dev, struct ifreq *ifr, int cmd);
1115 * * int (*ndo_eth_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
1119 * int (*ndo_set_config)(struct net_device *dev, struct ifmap *map);
1124 * int (*ndo_change_mtu)(struct net_device *dev, int new_mtu);
1128 * void (*ndo_tx_timeout)(struct net_device *dev, unsigned int txqueue);
1132 * void (*ndo_get_stats64)(struct net_device *dev,
1134 * struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
1146 * bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id)
1149 * int (*ndo_get_offload_stats)(int attr_id, const struct net_device *dev,
1154 * int (*ndo_vlan_rx_add_vid)(struct net_device *dev, __be16 proto, u16 vid);
1158 * int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, __be16 proto, u16 vid);
1162 * void (*ndo_poll_controller)(struct net_device *dev);
1165 * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
1166 * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan,
1168 * int (*ndo_set_vf_rate)(struct net_device *dev, int vf, int min_tx_rate,
1170 * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
1171 * int (*ndo_set_vf_trust)(struct net_device *dev, int vf, bool setting);
1172 * int (*ndo_get_vf_config)(struct net_device *dev,
1174 * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state);
1175 * int (*ndo_set_vf_port)(struct net_device *dev, int vf,
1181 * int (*ndo_set_vf_rss_query_en)(struct net_device *dev, int vf, bool setting);
1182 * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb);
1183 * int (*ndo_setup_tc)(struct net_device *dev, enum tc_setup_type type,
1191 * int (*ndo_fcoe_enable)(struct net_device *dev);
1196 * int (*ndo_fcoe_disable)(struct net_device *dev);
1201 * int (*ndo_fcoe_ddp_setup)(struct net_device *dev, u16 xid,
1208 * int (*ndo_fcoe_ddp_done)(struct net_device *dev, u16 xid);
1213 * int (*ndo_fcoe_ddp_target)(struct net_device *dev, u16 xid,
1220 * int (*ndo_fcoe_get_hbainfo)(struct net_device *dev,
1227 * int (*ndo_fcoe_get_wwn)(struct net_device *dev, u64 *wwn, int type);
1234 * int (*ndo_rx_flow_steer)(struct net_device *dev, const struct sk_buff *skb,
1241 * int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev);
1244 * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
1247 * struct net_device *(*ndo_get_xmit_slave)(struct net_device *dev,
1254 * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
1260 * int (*ndo_set_features)(struct net_device *dev, netdev_features_t features);
1266 * struct net_device *dev,
1273 * struct net_device *dev,
1279 * int (*ndo_fdb_del_bulk)(struct nlmsghdr *nlh, struct net_device *dev,
1282 * struct net_device *dev, struct net_device *filter_dev,
1287 * int (*ndo_mdb_add)(struct net_device *dev, struct nlattr *tb[],
1290 * int (*ndo_mdb_del)(struct net_device *dev, struct nlattr *tb[],
1293 * int (*ndo_mdb_del_bulk)(struct net_device *dev, struct nlattr *tb[],
1296 * int (*ndo_mdb_dump)(struct net_device *dev, struct sk_buff *skb,
1301 * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh,
1304 * struct net_device *dev, u32 filter_mask,
1306 * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
1309 * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
1317 * int (*ndo_get_phys_port_id)(struct net_device *dev,
1323 * int (*ndo_get_port_parent_id)(struct net_device *dev,
1327 * void* (*ndo_dfwd_add_station)(struct net_device *pdev,
1328 * struct net_device *dev)
1334 * void (*ndo_dfwd_del_station)(struct net_device *pdev, void *priv)
1339 * int (*ndo_set_tx_maxrate)(struct net_device *dev,
1343 * int (*ndo_get_iflink)(const struct net_device *dev);
1345 * int (*ndo_fill_metadata_dst)(struct net_device *dev, struct sk_buff *skb);
1349 * void (*ndo_set_rx_headroom)(struct net_device *dev, int needed_headroom);
1355 * int (*ndo_bpf)(struct net_device *dev, struct netdev_bpf *bpf);
1359 * int (*ndo_xdp_xmit)(struct net_device *dev, int n, struct xdp_frame **xdp,
1366 * struct net_device *(*ndo_xdp_get_xmit_slave)(struct net_device *dev,
1369 * int (*ndo_xsk_wakeup)(struct net_device *dev, u32 queue_id, u32 flags);
1375 * int (*ndo_tunnel_ctl)(struct net_device *dev, struct ip_tunnel_parm_kern *p,
1378 * struct net_device *(*ndo_get_peer_dev)(struct net_device *dev);
1383 * ktime_t (*ndo_get_tstamp)(struct net_device *dev,
1390 * int (*ndo_hwtstamp_get)(struct net_device *dev,
1395 * int (*ndo_hwtstamp_set)(struct net_device *dev,
1401 int (*ndo_init)(struct net_device *dev);
1402 void (*ndo_uninit)(struct net_device *dev);
1403 int (*ndo_open)(struct net_device *dev);
1404 int (*ndo_stop)(struct net_device *dev);
1406 struct net_device *dev);
1408 struct net_device *dev,
1410 u16 (*ndo_select_queue)(struct net_device *dev,
1412 struct net_device *sb_dev);
1413 void (*ndo_change_rx_flags)(struct net_device *dev,
1415 void (*ndo_set_rx_mode)(struct net_device *dev);
1416 int (*ndo_set_mac_address)(struct net_device *dev,
1418 int (*ndo_validate_addr)(struct net_device *dev);
1419 int (*ndo_do_ioctl)(struct net_device *dev,
1421 int (*ndo_eth_ioctl)(struct net_device *dev,
1423 int (*ndo_siocbond)(struct net_device *dev,
1425 int (*ndo_siocwandev)(struct net_device *dev,
1427 int (*ndo_siocdevprivate)(struct net_device *dev,
1430 int (*ndo_set_config)(struct net_device *dev,
1432 int (*ndo_change_mtu)(struct net_device *dev,
1434 int (*ndo_neigh_setup)(struct net_device *dev,
1436 void (*ndo_tx_timeout) (struct net_device *dev,
1439 void (*ndo_get_stats64)(struct net_device *dev,
1441 bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id);
1443 const struct net_device *dev,
1445 struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
1447 int (*ndo_vlan_rx_add_vid)(struct net_device *dev,
1449 int (*ndo_vlan_rx_kill_vid)(struct net_device *dev,
1452 void (*ndo_poll_controller)(struct net_device *dev);
1453 int (*ndo_netpoll_setup)(struct net_device *dev);
1454 void (*ndo_netpoll_cleanup)(struct net_device *dev);
1456 int (*ndo_set_vf_mac)(struct net_device *dev,
1458 int (*ndo_set_vf_vlan)(struct net_device *dev,
1461 int (*ndo_set_vf_rate)(struct net_device *dev,
1464 int (*ndo_set_vf_spoofchk)(struct net_device *dev,
1466 int (*ndo_set_vf_trust)(struct net_device *dev,
1468 int (*ndo_get_vf_config)(struct net_device *dev,
1471 int (*ndo_set_vf_link_state)(struct net_device *dev,
1473 int (*ndo_get_vf_stats)(struct net_device *dev,
1477 int (*ndo_set_vf_port)(struct net_device *dev,
1480 int (*ndo_get_vf_port)(struct net_device *dev,
1482 int (*ndo_get_vf_guid)(struct net_device *dev,
1486 int (*ndo_set_vf_guid)(struct net_device *dev,
1490 struct net_device *dev,
1492 int (*ndo_setup_tc)(struct net_device *dev,
1496 int (*ndo_fcoe_enable)(struct net_device *dev);
1497 int (*ndo_fcoe_disable)(struct net_device *dev);
1498 int (*ndo_fcoe_ddp_setup)(struct net_device *dev,
1502 int (*ndo_fcoe_ddp_done)(struct net_device *dev,
1504 int (*ndo_fcoe_ddp_target)(struct net_device *dev,
1508 int (*ndo_fcoe_get_hbainfo)(struct net_device *dev,
1515 int (*ndo_fcoe_get_wwn)(struct net_device *dev,
1520 int (*ndo_rx_flow_steer)(struct net_device *dev,
1525 int (*ndo_add_slave)(struct net_device *dev,
1526 struct net_device *slave_dev,
1528 int (*ndo_del_slave)(struct net_device *dev,
1529 struct net_device *slave_dev);
1530 struct net_device* (*ndo_get_xmit_slave)(struct net_device *dev,
1533 struct net_device* (*ndo_sk_get_lower_dev)(struct net_device *dev,
1535 netdev_features_t (*ndo_fix_features)(struct net_device *dev,
1537 int (*ndo_set_features)(struct net_device *dev,
1539 int (*ndo_neigh_construct)(struct net_device *dev,
1541 void (*ndo_neigh_destroy)(struct net_device *dev,
1546 struct net_device *dev,
1554 struct net_device *dev,
1560 struct net_device *dev,
1564 struct net_device *dev,
1565 struct net_device *filter_dev,
1569 struct net_device *dev,
1573 int (*ndo_mdb_add)(struct net_device *dev,
1577 int (*ndo_mdb_del)(struct net_device *dev,
1580 int (*ndo_mdb_del_bulk)(struct net_device *dev,
1583 int (*ndo_mdb_dump)(struct net_device *dev,
1586 int (*ndo_mdb_get)(struct net_device *dev,
1590 int (*ndo_bridge_setlink)(struct net_device *dev,
1596 struct net_device *dev,
1599 int (*ndo_bridge_dellink)(struct net_device *dev,
1602 int (*ndo_change_carrier)(struct net_device *dev,
1604 int (*ndo_get_phys_port_id)(struct net_device *dev,
1606 int (*ndo_get_port_parent_id)(struct net_device *dev,
1608 int (*ndo_get_phys_port_name)(struct net_device *dev,
1610 void* (*ndo_dfwd_add_station)(struct net_device *pdev,
1611 struct net_device *dev);
1612 void (*ndo_dfwd_del_station)(struct net_device *pdev,
1615 int (*ndo_set_tx_maxrate)(struct net_device *dev,
1618 int (*ndo_get_iflink)(const struct net_device *dev);
1619 int (*ndo_fill_metadata_dst)(struct net_device *dev,
1621 void (*ndo_set_rx_headroom)(struct net_device *dev,
1623 int (*ndo_bpf)(struct net_device *dev,
1625 int (*ndo_xdp_xmit)(struct net_device *dev, int n,
1628 struct net_device * (*ndo_xdp_get_xmit_slave)(struct net_device *dev,
1630 int (*ndo_xsk_wakeup)(struct net_device *dev,
1632 int (*ndo_tunnel_ctl)(struct net_device *dev,
1635 struct net_device * (*ndo_get_peer_dev)(struct net_device *dev);
1638 ktime_t (*ndo_get_tstamp)(struct net_device *dev,
1641 int (*ndo_hwtstamp_get)(struct net_device *dev,
1643 int (*ndo_hwtstamp_set)(struct net_device *dev,
1657 * enum netdev_priv_flags - &struct net_device priv_flags
1659 * These are the &struct net_device, they are only set internally
1664 * You should add bitfield booleans after either net_device::priv_flags
1740 /* Specifies the type of the struct net_device::ml_priv pointer */
1763 * struct net_device - The DEVICE structure.
2076 * FIXME: cleanup struct net_device such that network protocol info
2080 struct net_device { struct
2082 * Documentation/networking/net_cachelines/net_device.rst.
2368 void (*priv_destructor)(struct net_device *dev); argument
2444 /** @cfg: net_device queue-related configuration */ argument
2551 #define to_net_dev(d) container_of(d, struct net_device, dev) argument
2564 static inline bool netif_elide_gro(const struct net_device *dev) in netif_elide_gro()
2574 int netdev_get_prio_tc_map(const struct net_device *dev, u32 prio) in netdev_get_prio_tc_map()
2580 int netdev_set_prio_tc_map(struct net_device *dev, u8 prio, u8 tc) in netdev_set_prio_tc_map()
2589 int netdev_txq_to_tc(struct net_device *dev, unsigned int txq);
2590 void netdev_reset_tc(struct net_device *dev);
2591 int netdev_set_tc_queue(struct net_device *dev, u8 tc, u16 count, u16 offset);
2592 int netdev_set_num_tc(struct net_device *dev, u8 num_tc);
2595 int netdev_get_num_tc(struct net_device *dev) in netdev_get_num_tc()
2616 void netdev_unbind_sb_channel(struct net_device *dev,
2617 struct net_device *sb_dev);
2618 int netdev_bind_sb_channel_queue(struct net_device *dev,
2619 struct net_device *sb_dev,
2621 int netdev_set_sb_channel(struct net_device *dev, u16 channel);
2622 static inline int netdev_get_sb_channel(struct net_device *dev) in netdev_get_sb_channel()
2628 struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev, in netdev_get_tx_queue()
2635 static inline struct netdev_queue *skb_get_tx_queue(const struct net_device *dev, in skb_get_tx_queue()
2641 static inline void netdev_for_each_tx_queue(struct net_device *dev, in netdev_for_each_tx_queue()
2642 void (*f)(struct net_device *, in netdev_for_each_tx_queue() argument
2653 u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,
2654 struct net_device *sb_dev);
2655 struct netdev_queue *netdev_core_pick_tx(struct net_device *dev,
2657 struct net_device *sb_dev);
2662 static inline unsigned netdev_get_fwd_headroom(struct net_device *dev) in netdev_get_fwd_headroom()
2667 static inline void netdev_set_rx_headroom(struct net_device *dev, int new_hr) in netdev_set_rx_headroom()
2674 static inline void netdev_reset_rx_headroom(struct net_device *dev) in netdev_reset_rx_headroom()
2679 static inline void *netdev_get_ml_priv(struct net_device *dev, in netdev_get_ml_priv()
2688 static inline void netdev_set_ml_priv(struct net_device *dev, in netdev_set_ml_priv()
2706 struct net *dev_net(const struct net_device *dev) in dev_net()
2712 struct net *dev_net_rcu(const struct net_device *dev) in dev_net_rcu()
2718 void dev_net_set(struct net_device *dev, struct net *net) in dev_net_set()
2729 static inline void *netdev_priv(const struct net_device *dev) in netdev_priv()
2745 void netif_queue_set_napi(struct net_device *dev, unsigned int queue_index,
2749 static inline void netdev_lock(struct net_device *dev) in netdev_lock()
2754 static inline void netdev_unlock(struct net_device *dev) in netdev_unlock()
2774 void netif_napi_add_weight_locked(struct net_device *dev,
2780 netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi, in netif_napi_add_weight()
2798 netif_napi_add(struct net_device *dev, struct napi_struct *napi, in netif_napi_add()
2805 netif_napi_add_locked(struct net_device *dev, struct napi_struct *napi, in netif_napi_add_locked()
2812 netif_napi_add_tx_weight(struct net_device *dev, in netif_napi_add_tx_weight()
2822 netif_napi_add_config_locked(struct net_device *dev, struct napi_struct *napi, in netif_napi_add_config_locked()
2838 netif_napi_add_config(struct net_device *dev, struct napi_struct *napi, in netif_napi_add_config()
2856 static inline void netif_napi_add_tx(struct net_device *dev, in netif_napi_add_tx()
2898 int netif_enable_cpu_rmap(struct net_device *dev, unsigned int num_irqs);
2899 void netif_set_affinity_auto(struct net_device *dev);
2904 struct net_device *dev; /* NULL is wildcarded here */
2907 struct net_device *,
2909 struct net_device *);
2912 struct net_device *);
2960 void dev_lstats_read(struct net_device *dev, u64 *packets, u64 *bytes);
2962 static inline void dev_sw_netstats_rx_add(struct net_device *dev, unsigned int len) in dev_sw_netstats_rx_add()
2972 static inline void dev_sw_netstats_tx_add(struct net_device *dev, in dev_sw_netstats_tx_add()
2984 static inline void dev_lstats_add(struct net_device *dev, unsigned int len) in dev_lstats_add()
2994 static inline void dev_dstats_rx_add(struct net_device *dev, in dev_dstats_rx_add()
3005 static inline void dev_dstats_rx_dropped(struct net_device *dev) in dev_dstats_rx_dropped()
3014 static inline void dev_dstats_tx_add(struct net_device *dev, in dev_dstats_tx_add()
3025 static inline void dev_dstats_tx_dropped(struct net_device *dev) in dev_dstats_tx_dropped()
3153 int register_netdevice_notifier_dev_net(struct net_device *dev,
3156 int unregister_netdevice_notifier_dev_net(struct net_device *dev,
3161 struct net_device *dev;
3179 struct net_device *upper_dev; /* new upper dev */
3211 int netdev_offload_xstats_enable(struct net_device *dev,
3214 int netdev_offload_xstats_disable(struct net_device *dev,
3216 bool netdev_offload_xstats_enabled(const struct net_device *dev,
3218 int netdev_offload_xstats_get(struct net_device *dev,
3227 void netdev_offload_xstats_push_delta(struct net_device *dev,
3232 struct net_device *dev) in netdev_notifier_info_init()
3238 static inline struct net_device *
3250 int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
3272 #define net_device_entry(lh) list_entry(lh, struct net_device, dev_list)
3278 static inline struct net_device *next_net_device(struct net_device *dev) in next_net_device()
3288 static inline struct net_device *next_net_device_rcu(struct net_device *dev) in next_net_device_rcu()
3298 static inline struct net_device *first_net_device(struct net *net) in first_net_device()
3304 static inline struct net_device *first_net_device_rcu(struct net *net) in first_net_device_rcu()
3311 int netdev_boot_setup_check(struct net_device *dev);
3312 struct net_device *dev_getbyhwaddr(struct net *net, unsigned short type,
3314 struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type,
3316 struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type);
3323 int dev_get_iflink(const struct net_device *dev);
3324 int dev_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb);
3325 int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr,
3327 struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,
3329 struct net_device *dev_get_by_name(struct net *net, const char *name);
3330 struct net_device *dev_get_by_name_rcu(struct net *net, const char *name);
3331 struct net_device *__dev_get_by_name(struct net *net, const char *name);
3333 int dev_alloc_name(struct net_device *dev, const char *name);
3334 int netif_open(struct net_device *dev, struct netlink_ext_ack *extack);
3335 int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
3336 void netif_close(struct net_device *dev);
3337 void dev_close(struct net_device *dev);
3339 void netif_disable_lro(struct net_device *dev);
3340 void dev_disable_lro(struct net_device *dev);
3342 u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb,
3343 struct net_device *sb_dev);
3345 int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev);
3354 struct net_device *sb_dev) in dev_queue_xmit_accel()
3369 int register_netdevice(struct net_device *dev);
3370 void unregister_netdevice_queue(struct net_device *dev, struct list_head *head);
3372 static inline void unregister_netdevice(struct net_device *dev) in unregister_netdevice()
3377 int netdev_refcnt_read(const struct net_device *dev);
3378 void free_netdev(struct net_device *dev);
3380 struct net_device *netdev_get_xmit_slave(struct net_device *dev,
3383 struct net_device *netdev_sk_get_lowest_dev(struct net_device *dev,
3385 struct net_device *dev_get_by_index(struct net *net, int ifindex);
3386 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
3387 struct net_device *netdev_get_by_index(struct net *net, int ifindex,
3389 struct net_device *netdev_get_by_name(struct net *net, const char *name,
3391 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
3392 void netdev_copy_name(struct net_device *dev, char *name);
3394 static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev, in dev_hard_header()
3408 const struct net_device *dev = skb->dev; in dev_parse_header()
3417 const struct net_device *dev = skb->dev; in dev_parse_header_protocol()
3425 static inline bool dev_validate_header(const struct net_device *dev, in dev_validate_header()
3444 static inline bool dev_has_header(const struct net_device *dev) in dev_has_header()
3523 static inline void netif_tx_schedule_all(struct net_device *dev) in netif_tx_schedule_all()
3542 static inline void netif_start_queue(struct net_device *dev) in netif_start_queue()
3547 static inline void netif_tx_start_all_queues(struct net_device *dev) in netif_tx_start_all_queues()
3566 static inline void netif_wake_queue(struct net_device *dev) in netif_wake_queue()
3571 static inline void netif_tx_wake_all_queues(struct net_device *dev) in netif_tx_wake_all_queues()
3600 static inline void netif_stop_queue(struct net_device *dev) in netif_stop_queue()
3605 void netif_tx_stop_all_queues(struct net_device *dev);
3618 static inline bool netif_queue_stopped(const struct net_device *dev) in netif_queue_stopped()
3766 static inline void netdev_sent_queue(struct net_device *dev, unsigned int bytes) in netdev_sent_queue()
3771 static inline bool __netdev_sent_queue(struct net_device *dev, in __netdev_sent_queue()
3822 static inline void netdev_completed_queue(struct net_device *dev, in netdev_completed_queue()
3841 static inline void netdev_tx_reset_subqueue(const struct net_device *dev, in netdev_tx_reset_subqueue()
3854 static inline void netdev_reset_queue(struct net_device *dev_queue) in netdev_reset_queue()
3867 static inline u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index) in netdev_cap_txqueue()
3885 static inline bool netif_running(const struct net_device *dev) in netif_running()
3904 static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index) in netif_start_subqueue()
3918 static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index) in netif_stop_subqueue()
3931 static inline bool __netif_subqueue_stopped(const struct net_device *dev, in __netif_subqueue_stopped()
3946 static inline bool netif_subqueue_stopped(const struct net_device *dev, in netif_subqueue_stopped()
3959 static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) in netif_wake_subqueue()
3967 int netif_set_xps_queue(struct net_device *dev, const struct cpumask *mask,
3969 int __netif_set_xps_queue(struct net_device *dev, const unsigned long *mask,
4058 static inline int netif_set_xps_queue(struct net_device *dev, in netif_set_xps_queue()
4065 static inline int __netif_set_xps_queue(struct net_device *dev, in __netif_set_xps_queue()
4079 static inline bool netif_is_multiqueue(const struct net_device *dev) in netif_is_multiqueue()
4084 int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq);
4085 int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq);
4086 int netif_set_real_num_queues(struct net_device *dev,
4161 bool netdev_is_rx_handler_busy(struct net_device *dev);
4162 int netdev_rx_handler_register(struct net_device *dev,
4165 void netdev_rx_handler_unregister(struct net_device *dev);
4177 int dev_eth_ioctl(struct net_device *dev,
4179 int generic_hwtstamp_get_lower(struct net_device *dev,
4181 int generic_hwtstamp_set_lower(struct net_device *dev,
4185 unsigned int dev_get_flags(const struct net_device *);
4186 int __dev_change_flags(struct net_device *dev, unsigned int flags,
4188 int netif_change_flags(struct net_device *dev, unsigned int flags,
4190 int dev_change_flags(struct net_device *dev, unsigned int flags,
4192 int netif_set_alias(struct net_device *dev, const char *alias, size_t len);
4193 int dev_set_alias(struct net_device *, const char *, size_t);
4194 int dev_get_alias(const struct net_device *, char *, size_t);
4195 int __dev_change_net_namespace(struct net_device *dev, struct net *net,
4198 int dev_change_net_namespace(struct net_device *dev, struct net *net,
4200 int __dev_set_mtu(struct net_device *, int);
4201 int netif_set_mtu(struct net_device *dev, int new_mtu);
4202 int dev_set_mtu(struct net_device *, int);
4203 int dev_pre_changeaddr_notify(struct net_device *dev, const char *addr,
4205 int netif_set_mac_address(struct net_device *dev, struct sockaddr *sa,
4207 int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
4209 int dev_set_mac_address_user(struct net_device *dev, struct sockaddr *sa,
4212 int dev_get_port_parent_id(struct net_device *dev,
4214 bool netdev_port_same_parent_id(struct net_device *a, struct net_device *b);
4216 struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev, bool *again);
4217 struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
4221 u8 dev_xdp_prog_count(struct net_device *dev);
4222 int netif_xdp_propagate(struct net_device *dev, struct netdev_bpf *bpf);
4223 int dev_xdp_propagate(struct net_device *dev, struct netdev_bpf *bpf);
4224 u8 dev_xdp_sb_prog_count(struct net_device *dev);
4225 u32 dev_xdp_prog_id(struct net_device *dev, enum bpf_xdp_mode mode);
4227 u32 dev_get_min_mp_channel_count(const struct net_device *dev);
4229 int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
4230 int dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
4231 int dev_forward_skb_nomtu(struct net_device *dev, struct sk_buff *skb);
4232 bool is_skb_forwardable(const struct net_device *dev,
4235 static __always_inline bool __is_skb_forwardable(const struct net_device *dev, in __is_skb_forwardable()
4261 void netdev_core_stats_inc(struct net_device *dev, u32 offset);
4264 static inline void dev_core_stats_##FIELD##_inc(struct net_device *dev) \
4275 static __always_inline int ____dev_forward_skb(struct net_device *dev, in DEV_CORE_STATS_INC()
4291 bool dev_nit_active_rcu(const struct net_device *dev);
4292 static inline bool dev_nit_active(const struct net_device *dev) in dev_nit_active()
4302 void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
4304 static inline void __dev_put(struct net_device *dev) in __dev_put()
4315 static inline void __dev_hold(struct net_device *dev) in __dev_hold()
4326 static inline void __netdev_tracker_alloc(struct net_device *dev, in __netdev_tracker_alloc()
4338 static inline void netdev_tracker_alloc(struct net_device *dev, in netdev_tracker_alloc()
4347 static inline void netdev_tracker_free(struct net_device *dev, in netdev_tracker_free()
4355 static inline void netdev_hold(struct net_device *dev, in netdev_hold()
4364 static inline void netdev_put(struct net_device *dev, in netdev_put()
4380 static inline void dev_hold(struct net_device *dev) in dev_hold()
4392 static inline void dev_put(struct net_device *dev) in dev_put()
4397 DEFINE_FREE(dev_put, struct net_device *, if (_T) dev_put(_T)) in DEFINE_FREE() argument
4399 static inline void netdev_ref_replace(struct net_device *odev, in DEFINE_FREE()
4400 struct net_device *ndev, in DEFINE_FREE()
4422 void linkwatch_fire_event(struct net_device *dev);
4431 void linkwatch_sync_dev(struct net_device *dev);
4432 void __linkwatch_sync_dev(struct net_device *dev);
4440 static inline bool netif_carrier_ok(const struct net_device *dev) in netif_carrier_ok()
4445 unsigned long dev_trans_start(struct net_device *dev);
4447 void netdev_watchdog_up(struct net_device *dev);
4449 void netif_carrier_on(struct net_device *dev);
4450 void netif_carrier_off(struct net_device *dev);
4451 void netif_carrier_event(struct net_device *dev);
4465 static inline void netif_dormant_on(struct net_device *dev) in netif_dormant_on()
4477 static inline void netif_dormant_off(struct net_device *dev) in netif_dormant_off()
4489 static inline bool netif_dormant(const struct net_device *dev) in netif_dormant()
4505 static inline void netif_testing_on(struct net_device *dev) in netif_testing_on()
4517 static inline void netif_testing_off(struct net_device *dev) in netif_testing_off()
4529 static inline bool netif_testing(const struct net_device *dev) in netif_testing()
4541 static inline bool netif_oper_up(const struct net_device *dev) in netif_oper_up()
4555 static inline bool netif_device_present(const struct net_device *dev) in netif_device_present()
4560 void netif_device_detach(struct net_device *dev);
4562 void netif_device_attach(struct net_device *dev);
4707 static inline void netif_trans_update(struct net_device *dev) in netif_trans_update()
4720 void netif_tx_lock(struct net_device *dev);
4722 static inline void netif_tx_lock_bh(struct net_device *dev) in netif_tx_lock_bh()
4728 void netif_tx_unlock(struct net_device *dev);
4730 static inline void netif_tx_unlock_bh(struct net_device *dev) in netif_tx_unlock_bh()
4757 static inline void netif_tx_disable(struct net_device *dev) in netif_tx_disable()
4776 static inline void netif_addr_lock(struct net_device *dev) in netif_addr_lock()
4786 static inline void netif_addr_lock_bh(struct net_device *dev) in netif_addr_lock_bh()
4797 static inline void netif_addr_unlock(struct net_device *dev) in netif_addr_unlock()
4802 static inline void netif_addr_unlock_bh(struct net_device *dev) in netif_addr_unlock_bh()
4816 void ether_setup(struct net_device *dev);
4818 /* Allocate dummy net_device */
4819 struct net_device *alloc_netdev_dummy(int sizeof_priv);
4822 struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
4824 void (*setup)(struct net_device *),
4833 int register_netdev(struct net_device *dev);
4834 void unregister_netdev(struct net_device *dev);
4836 int devm_register_netdev(struct device *dev, struct net_device *ndev);
4847 struct net_device *dev,
4848 int (*sync)(struct net_device *, const unsigned char *),
4849 int (*unsync)(struct net_device *,
4852 struct net_device *dev,
4853 int (*sync)(struct net_device *,
4855 int (*unsync)(struct net_device *,
4858 struct net_device *dev,
4859 int (*unsync)(struct net_device *,
4862 struct net_device *dev,
4863 int (*unsync)(struct net_device *,
4868 void dev_addr_mod(struct net_device *dev, unsigned int offset,
4872 __dev_addr_set(struct net_device *dev, const void *addr, size_t len) in __dev_addr_set()
4877 static inline void dev_addr_set(struct net_device *dev, const u8 *addr) in dev_addr_set()
4882 int dev_addr_add(struct net_device *dev, const unsigned char *addr,
4884 int dev_addr_del(struct net_device *dev, const unsigned char *addr,
4888 int dev_uc_add(struct net_device *dev, const unsigned char *addr);
4889 int dev_uc_add_excl(struct net_device *dev, const unsigned char *addr);
4890 int dev_uc_del(struct net_device *dev, const unsigned char *addr);
4891 int dev_uc_sync(struct net_device *to, struct net_device *from);
4892 int dev_uc_sync_multiple(struct net_device *to, struct net_device *from);
4893 void dev_uc_unsync(struct net_device *to, struct net_device *from);
4894 void dev_uc_flush(struct net_device *dev);
4895 void dev_uc_init(struct net_device *dev);
4906 static inline int __dev_uc_sync(struct net_device *dev, in __dev_uc_sync()
4907 int (*sync)(struct net_device *, in __dev_uc_sync() argument
4909 int (*unsync)(struct net_device *, in __dev_uc_sync() argument
4922 static inline void __dev_uc_unsync(struct net_device *dev, in __dev_uc_unsync()
4923 int (*unsync)(struct net_device *, in __dev_uc_unsync() argument
4930 int dev_mc_add(struct net_device *dev, const unsigned char *addr);
4931 int dev_mc_add_global(struct net_device *dev, const unsigned char *addr);
4932 int dev_mc_add_excl(struct net_device *dev, const unsigned char *addr);
4933 int dev_mc_del(struct net_device *dev, const unsigned char *addr);
4934 int dev_mc_del_global(struct net_device *dev, const unsigned char *addr);
4935 int dev_mc_sync(struct net_device *to, struct net_device *from);
4936 int dev_mc_sync_multiple(struct net_device *to, struct net_device *from);
4937 void dev_mc_unsync(struct net_device *to, struct net_device *from);
4938 void dev_mc_flush(struct net_device *dev);
4939 void dev_mc_init(struct net_device *dev);
4950 static inline int __dev_mc_sync(struct net_device *dev, in __dev_mc_sync()
4951 int (*sync)(struct net_device *, in __dev_mc_sync() argument
4953 int (*unsync)(struct net_device *, in __dev_mc_sync() argument
4966 static inline void __dev_mc_unsync(struct net_device *dev, in __dev_mc_unsync()
4967 int (*unsync)(struct net_device *, in __dev_mc_unsync() argument
4974 void dev_set_rx_mode(struct net_device *dev);
4975 int netif_set_promiscuity(struct net_device *dev, int inc);
4976 int dev_set_promiscuity(struct net_device *dev, int inc);
4977 int netif_set_allmulti(struct net_device *dev, int inc, bool notify);
4978 int dev_set_allmulti(struct net_device *dev, int inc);
4979 void netif_state_change(struct net_device *dev);
4980 void netdev_state_change(struct net_device *dev);
4981 void __netdev_notify_peers(struct net_device *dev);
4982 void netdev_notify_peers(struct net_device *dev);
4983 void netdev_features_change(struct net_device *dev);
4986 struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
4992 void dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s);
5010 bool netdev_has_upper_dev(struct net_device *dev, struct net_device *upper_dev);
5011 struct net_device *netdev_upper_get_next_dev_rcu(struct net_device *dev,
5021 int netdev_walk_all_upper_dev_rcu(struct net_device *dev,
5022 int (*fn)(struct net_device *upper_dev,
5026 bool netdev_has_upper_dev_all_rcu(struct net_device *dev,
5027 struct net_device *upper_dev);
5029 bool netdev_has_any_upper_dev(struct net_device *dev);
5031 void *netdev_lower_get_next_private(struct net_device *dev,
5033 void *netdev_lower_get_next_private_rcu(struct net_device *dev,
5048 void *netdev_lower_get_next(struct net_device *dev,
5057 struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev,
5059 int netdev_walk_all_lower_dev(struct net_device *dev,
5060 int (*fn)(struct net_device *lower_dev,
5063 int netdev_walk_all_lower_dev_rcu(struct net_device *dev,
5064 int (*fn)(struct net_device *lower_dev,
5069 void *netdev_lower_get_first_private_rcu(struct net_device *dev);
5070 struct net_device *netdev_master_upper_dev_get(struct net_device *dev);
5071 struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev);
5072 int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev,
5074 int netdev_master_upper_dev_link(struct net_device *dev,
5075 struct net_device *upper_dev,
5078 void netdev_upper_dev_unlink(struct net_device *dev,
5079 struct net_device *upper_dev);
5080 int netdev_adjacent_change_prepare(struct net_device *old_dev,
5081 struct net_device *new_dev,
5082 struct net_device *dev,
5084 void netdev_adjacent_change_commit(struct net_device *old_dev,
5085 struct net_device *new_dev,
5086 struct net_device *dev);
5087 void netdev_adjacent_change_abort(struct net_device *old_dev,
5088 struct net_device *new_dev,
5089 struct net_device *dev);
5090 void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);
5091 void *netdev_lower_dev_get_private(struct net_device *dev,
5092 struct net_device *lower_dev);
5093 void netdev_lower_state_changed(struct net_device *lower_dev,
5116 void netdev_bonding_info_change(struct net_device *dev,
5120 void ethtool_notify(struct net_device *dev, unsigned int cmd, const void *data);
5122 static inline void ethtool_notify(struct net_device *dev, unsigned int cmd, in ethtool_notify()
5154 void netdev_rx_csum_fault(struct net_device *dev, struct sk_buff *skb);
5156 static inline void netdev_rx_csum_fault(struct net_device *dev, in netdev_rx_csum_fault()
5165 static inline ktime_t netdev_get_tstamp(struct net_device *dev, in netdev_get_tstamp()
5200 struct sk_buff *skb, struct net_device *dev, in __netdev_start_xmit()
5207 static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_device *dev, in netdev_start_xmit()
5227 const char *netdev_drivername(const struct net_device *dev);
5243 struct net_device *dev) in netdev_get_wanted_features()
5260 int __netdev_update_features(struct net_device *dev);
5261 void netdev_update_features(struct net_device *dev);
5262 void netdev_change_features(struct net_device *dev);
5264 void netif_stacked_transfer_operstate(const struct net_device *rootdev,
5265 struct net_device *dev);
5268 struct net_device *dev,
5317 void netif_set_tso_max_size(struct net_device *dev, unsigned int size);
5318 void netif_set_tso_max_segs(struct net_device *dev, unsigned int segs);
5319 void netif_inherit_tso_max(struct net_device *to,
5320 const struct net_device *from);
5323 netif_get_gro_max_size(const struct net_device *dev, const struct sk_buff *skb) in netif_get_gro_max_size()
5332 netif_get_gso_max_size(const struct net_device *dev, const struct sk_buff *skb) in netif_get_gso_max_size()
5340 static inline bool netif_is_macsec(const struct net_device *dev) in netif_is_macsec()
5345 static inline bool netif_is_macvlan(const struct net_device *dev) in netif_is_macvlan()
5350 static inline bool netif_is_macvlan_port(const struct net_device *dev) in netif_is_macvlan_port()
5355 static inline bool netif_is_bond_master(const struct net_device *dev) in netif_is_bond_master()
5360 static inline bool netif_is_bond_slave(const struct net_device *dev) in netif_is_bond_slave()
5365 static inline bool netif_supports_nofcs(struct net_device *dev) in netif_supports_nofcs()
5370 static inline bool netif_has_l3_rx_handler(const struct net_device *dev) in netif_has_l3_rx_handler()
5375 static inline bool netif_is_l3_master(const struct net_device *dev) in netif_is_l3_master()
5380 static inline bool netif_is_l3_slave(const struct net_device *dev) in netif_is_l3_slave()
5385 static inline int dev_sdif(const struct net_device *dev) in dev_sdif()
5394 static inline bool netif_is_bridge_master(const struct net_device *dev) in netif_is_bridge_master()
5399 static inline bool netif_is_bridge_port(const struct net_device *dev) in netif_is_bridge_port()
5404 static inline bool netif_is_ovs_master(const struct net_device *dev) in netif_is_ovs_master()
5409 static inline bool netif_is_ovs_port(const struct net_device *dev) in netif_is_ovs_port()
5414 static inline bool netif_is_any_bridge_master(const struct net_device *dev) in netif_is_any_bridge_master()
5419 static inline bool netif_is_any_bridge_port(const struct net_device *dev) in netif_is_any_bridge_port()
5424 static inline bool netif_is_team_master(const struct net_device *dev) in netif_is_team_master()
5429 static inline bool netif_is_team_port(const struct net_device *dev) in netif_is_team_port()
5434 static inline bool netif_is_lag_master(const struct net_device *dev) in netif_is_lag_master()
5439 static inline bool netif_is_lag_port(const struct net_device *dev) in netif_is_lag_port()
5444 static inline bool netif_is_rxfh_configured(const struct net_device *dev) in netif_is_rxfh_configured()
5449 static inline bool netif_is_failover(const struct net_device *dev) in netif_is_failover()
5454 static inline bool netif_is_failover_slave(const struct net_device *dev) in netif_is_failover_slave()
5460 static inline void netif_keep_dst(struct net_device *dev) in netif_keep_dst()
5466 static inline bool netif_reduces_vlan_mtu(struct net_device *dev) in netif_reduces_vlan_mtu()
5478 static inline const char *netdev_name(const struct net_device *dev) in netdev_name()
5481 return "(unnamed net_device)"; in netdev_name()
5485 static inline const char *netdev_reg_state(const struct net_device *dev) in netdev_reg_state()
5542 extern struct net_device *blackhole_netdev;