Lines Matching defs:net_device

86 void netdev_set_default_ethtool_ops(struct net_device *dev,
88 void netdev_sw_irq_coalesce_default_on(struct net_device *dev);
312 int (*create) (struct sk_buff *skb, struct net_device *dev,
318 const struct net_device *dev,
372 struct net_device *dev;
432 * Currently, a net_device can only have a single rx_handler registered. Trying
435 * To register a rx_handler on a net_device, use netdev_rx_handler_register().
436 * To unregister a rx_handler on a net_device, use
447 * net_device, it should return RX_HANDLER_ANOTHER. The rx_handler for the
537 int dev_set_threaded(struct net_device *dev, bool threaded);
623 struct net_device *dev;
642 struct net_device *sb_dev;
784 bool rps_may_expire_flow(struct net_device *dev, u16 rxq_index, u32 flow_id,
789 /* XPS map type and offset of the xps map within net_device->xps_maps[]. */
879 typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
881 struct net_device *sb_dev);
894 const struct net_device *dev;
933 const struct net_device *dev;
1062 * int (*ndo_init)(struct net_device *dev);
1068 * void (*ndo_uninit)(struct net_device *dev);
1072 * int (*ndo_open)(struct net_device *dev);
1076 * int (*ndo_stop)(struct net_device *dev);
1081 * struct net_device *dev);
1090 * struct net_device *dev
1099 * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
1100 * struct net_device *sb_dev);
1104 * void (*ndo_change_rx_flags)(struct net_device *dev, int flags);
1108 * void (*ndo_set_rx_mode)(struct net_device *dev);
1113 * int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
1118 * int (*ndo_validate_addr)(struct net_device *dev);
1121 * int (*ndo_do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
1126 * int (*ndo_siocbond)(struct net_device *dev, struct ifreq *ifr, int cmd);
1131 * * int (*ndo_eth_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
1135 * int (*ndo_set_config)(struct net_device *dev, struct ifmap *map);
1140 * int (*ndo_change_mtu)(struct net_device *dev, int new_mtu);
1144 * void (*ndo_tx_timeout)(struct net_device *dev, unsigned int txqueue);
1148 * void (*ndo_get_stats64)(struct net_device *dev,
1150 * struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
1162 * bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id)
1165 * int (*ndo_get_offload_stats)(int attr_id, const struct net_device *dev,
1170 * int (*ndo_vlan_rx_add_vid)(struct net_device *dev, __be16 proto, u16 vid);
1174 * int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, __be16 proto, u16 vid);
1178 * void (*ndo_poll_controller)(struct net_device *dev);
1181 * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
1182 * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan,
1184 * int (*ndo_set_vf_rate)(struct net_device *dev, int vf, int min_tx_rate,
1186 * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
1187 * int (*ndo_set_vf_trust)(struct net_device *dev, int vf, bool setting);
1188 * int (*ndo_get_vf_config)(struct net_device *dev,
1190 * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state);
1191 * int (*ndo_set_vf_port)(struct net_device *dev, int vf,
1197 * int (*ndo_set_vf_rss_query_en)(struct net_device *dev, int vf, bool setting);
1198 * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb);
1199 * int (*ndo_setup_tc)(struct net_device *dev, enum tc_setup_type type,
1207 * int (*ndo_fcoe_enable)(struct net_device *dev);
1212 * int (*ndo_fcoe_disable)(struct net_device *dev);
1217 * int (*ndo_fcoe_ddp_setup)(struct net_device *dev, u16 xid,
1224 * int (*ndo_fcoe_ddp_done)(struct net_device *dev, u16 xid);
1229 * int (*ndo_fcoe_ddp_target)(struct net_device *dev, u16 xid,
1236 * int (*ndo_fcoe_get_hbainfo)(struct net_device *dev,
1243 * int (*ndo_fcoe_get_wwn)(struct net_device *dev, u64 *wwn, int type);
1250 * int (*ndo_rx_flow_steer)(struct net_device *dev, const struct sk_buff *skb,
1257 * int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev);
1260 * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
1263 * struct net_device *(*ndo_get_xmit_slave)(struct net_device *dev,
1270 * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
1276 * int (*ndo_set_features)(struct net_device *dev, netdev_features_t features);
1282 * struct net_device *dev,
1287 * struct net_device *dev,
1291 * struct net_device *dev,
1295 * struct net_device *dev, struct net_device *filter_dev,
1300 * int (*ndo_mdb_add)(struct net_device *dev, struct nlattr *tb[],
1303 * int (*ndo_mdb_del)(struct net_device *dev, struct nlattr *tb[],
1306 * int (*ndo_mdb_dump)(struct net_device *dev, struct sk_buff *skb,
1311 * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh,
1314 * struct net_device *dev, u32 filter_mask,
1316 * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
1319 * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
1327 * int (*ndo_get_phys_port_id)(struct net_device *dev,
1333 * int (*ndo_get_port_parent_id)(struct net_device *dev,
1337 * void* (*ndo_dfwd_add_station)(struct net_device *pdev,
1338 * struct net_device *dev)
1344 * void (*ndo_dfwd_del_station)(struct net_device *pdev, void *priv)
1349 * int (*ndo_set_tx_maxrate)(struct net_device *dev,
1353 * int (*ndo_get_iflink)(const struct net_device *dev);
1355 * int (*ndo_fill_metadata_dst)(struct net_device *dev, struct sk_buff *skb);
1359 * void (*ndo_set_rx_headroom)(struct net_device *dev, int needed_headroom);
1365 * int (*ndo_bpf)(struct net_device *dev, struct netdev_bpf *bpf);
1369 * int (*ndo_xdp_xmit)(struct net_device *dev, int n, struct xdp_frame **xdp,
1376 * struct net_device *(*ndo_xdp_get_xmit_slave)(struct net_device *dev,
1379 * int (*ndo_xsk_wakeup)(struct net_device *dev, u32 queue_id, u32 flags);
1385 * int (*ndo_tunnel_ctl)(struct net_device *dev, struct ip_tunnel_parm *p,
1388 * struct net_device *(*ndo_get_peer_dev)(struct net_device *dev);
1393 * ktime_t (*ndo_get_tstamp)(struct net_device *dev,
1400 * int (*ndo_hwtstamp_get)(struct net_device *dev,
1405 * int (*ndo_hwtstamp_set)(struct net_device *dev,
1411 int (*ndo_init)(struct net_device *dev);
1412 void (*ndo_uninit)(struct net_device *dev);
1413 int (*ndo_open)(struct net_device *dev);
1414 int (*ndo_stop)(struct net_device *dev);
1416 struct net_device *dev);
1418 struct net_device *dev,
1420 u16 (*ndo_select_queue)(struct net_device *dev,
1422 struct net_device *sb_dev);
1423 void (*ndo_change_rx_flags)(struct net_device *dev,
1425 void (*ndo_set_rx_mode)(struct net_device *dev);
1426 int (*ndo_set_mac_address)(struct net_device *dev,
1428 int (*ndo_validate_addr)(struct net_device *dev);
1429 int (*ndo_do_ioctl)(struct net_device *dev,
1431 int (*ndo_eth_ioctl)(struct net_device *dev,
1433 int (*ndo_siocbond)(struct net_device *dev,
1435 int (*ndo_siocwandev)(struct net_device *dev,
1437 int (*ndo_siocdevprivate)(struct net_device *dev,
1440 int (*ndo_set_config)(struct net_device *dev,
1442 int (*ndo_change_mtu)(struct net_device *dev,
1444 int (*ndo_neigh_setup)(struct net_device *dev,
1446 void (*ndo_tx_timeout) (struct net_device *dev,
1449 void (*ndo_get_stats64)(struct net_device *dev,
1451 bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id);
1453 const struct net_device *dev,
1455 struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
1457 int (*ndo_vlan_rx_add_vid)(struct net_device *dev,
1459 int (*ndo_vlan_rx_kill_vid)(struct net_device *dev,
1462 void (*ndo_poll_controller)(struct net_device *dev);
1463 int (*ndo_netpoll_setup)(struct net_device *dev,
1465 void (*ndo_netpoll_cleanup)(struct net_device *dev);
1467 int (*ndo_set_vf_mac)(struct net_device *dev,
1469 int (*ndo_set_vf_vlan)(struct net_device *dev,
1472 int (*ndo_set_vf_rate)(struct net_device *dev,
1475 int (*ndo_set_vf_spoofchk)(struct net_device *dev,
1477 int (*ndo_set_vf_trust)(struct net_device *dev,
1479 int (*ndo_get_vf_config)(struct net_device *dev,
1482 int (*ndo_set_vf_link_state)(struct net_device *dev,
1484 int (*ndo_get_vf_stats)(struct net_device *dev,
1488 int (*ndo_set_vf_port)(struct net_device *dev,
1491 int (*ndo_get_vf_port)(struct net_device *dev,
1493 int (*ndo_get_vf_guid)(struct net_device *dev,
1497 int (*ndo_set_vf_guid)(struct net_device *dev,
1501 struct net_device *dev,
1503 int (*ndo_setup_tc)(struct net_device *dev,
1507 int (*ndo_fcoe_enable)(struct net_device *dev);
1508 int (*ndo_fcoe_disable)(struct net_device *dev);
1509 int (*ndo_fcoe_ddp_setup)(struct net_device *dev,
1513 int (*ndo_fcoe_ddp_done)(struct net_device *dev,
1515 int (*ndo_fcoe_ddp_target)(struct net_device *dev,
1519 int (*ndo_fcoe_get_hbainfo)(struct net_device *dev,
1526 int (*ndo_fcoe_get_wwn)(struct net_device *dev,
1531 int (*ndo_rx_flow_steer)(struct net_device *dev,
1536 int (*ndo_add_slave)(struct net_device *dev,
1537 struct net_device *slave_dev,
1539 int (*ndo_del_slave)(struct net_device *dev,
1540 struct net_device *slave_dev);
1541 struct net_device* (*ndo_get_xmit_slave)(struct net_device *dev,
1544 struct net_device* (*ndo_sk_get_lower_dev)(struct net_device *dev,
1546 netdev_features_t (*ndo_fix_features)(struct net_device *dev,
1548 int (*ndo_set_features)(struct net_device *dev,
1550 int (*ndo_neigh_construct)(struct net_device *dev,
1552 void (*ndo_neigh_destroy)(struct net_device *dev,
1557 struct net_device *dev,
1564 struct net_device *dev,
1569 struct net_device *dev,
1574 struct net_device *dev,
1575 struct net_device *filter_dev,
1579 struct net_device *dev,
1583 int (*ndo_mdb_add)(struct net_device *dev,
1587 int (*ndo_mdb_del)(struct net_device *dev,
1590 int (*ndo_mdb_dump)(struct net_device *dev,
1593 int (*ndo_bridge_setlink)(struct net_device *dev,
1599 struct net_device *dev,
1602 int (*ndo_bridge_dellink)(struct net_device *dev,
1605 int (*ndo_change_carrier)(struct net_device *dev,
1607 int (*ndo_get_phys_port_id)(struct net_device *dev,
1609 int (*ndo_get_port_parent_id)(struct net_device *dev,
1611 int (*ndo_get_phys_port_name)(struct net_device *dev,
1613 void* (*ndo_dfwd_add_station)(struct net_device *pdev,
1614 struct net_device *dev);
1615 void (*ndo_dfwd_del_station)(struct net_device *pdev,
1618 int (*ndo_set_tx_maxrate)(struct net_device *dev,
1621 int (*ndo_get_iflink)(const struct net_device *dev);
1622 int (*ndo_fill_metadata_dst)(struct net_device *dev,
1624 void (*ndo_set_rx_headroom)(struct net_device *dev,
1626 int (*ndo_bpf)(struct net_device *dev,
1628 int (*ndo_xdp_xmit)(struct net_device *dev, int n,
1631 struct net_device * (*ndo_xdp_get_xmit_slave)(struct net_device *dev,
1633 int (*ndo_xsk_wakeup)(struct net_device *dev,
1635 int (*ndo_tunnel_ctl)(struct net_device *dev,
1637 struct net_device * (*ndo_get_peer_dev)(struct net_device *dev);
1640 ktime_t (*ndo_get_tstamp)(struct net_device *dev,
1643 int (*ndo_hwtstamp_get)(struct net_device *dev,
1645 int (*ndo_hwtstamp_set)(struct net_device *dev,
1651 * enum netdev_priv_flags - &struct net_device priv_flags
1653 * These are the &struct net_device, they are only set internally
1771 /* Specifies the type of the struct net_device::ml_priv pointer */
1785 * struct net_device - The DEVICE structure.
2063 * FIXME: cleanup struct net_device such that network protocol info
2067 struct net_device {
2330 void (*priv_destructor)(struct net_device *dev);
2421 #define to_net_dev(d) container_of(d, struct net_device, dev)
2434 static inline bool netif_elide_gro(const struct net_device *dev)
2444 int netdev_get_prio_tc_map(const struct net_device *dev, u32 prio)
2450 int netdev_set_prio_tc_map(struct net_device *dev, u8 prio, u8 tc)
2459 int netdev_txq_to_tc(struct net_device *dev, unsigned int txq);
2460 void netdev_reset_tc(struct net_device *dev);
2461 int netdev_set_tc_queue(struct net_device *dev, u8 tc, u16 count, u16 offset);
2462 int netdev_set_num_tc(struct net_device *dev, u8 num_tc);
2465 int netdev_get_num_tc(struct net_device *dev)
2486 void netdev_unbind_sb_channel(struct net_device *dev,
2487 struct net_device *sb_dev);
2488 int netdev_bind_sb_channel_queue(struct net_device *dev,
2489 struct net_device *sb_dev,
2491 int netdev_set_sb_channel(struct net_device *dev, u16 channel);
2492 static inline int netdev_get_sb_channel(struct net_device *dev)
2498 struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev,
2505 static inline struct netdev_queue *skb_get_tx_queue(const struct net_device *dev,
2511 static inline void netdev_for_each_tx_queue(struct net_device *dev,
2512 void (*f)(struct net_device *,
2538 u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,
2539 struct net_device *sb_dev);
2540 struct netdev_queue *netdev_core_pick_tx(struct net_device *dev,
2542 struct net_device *sb_dev);
2547 static inline unsigned netdev_get_fwd_headroom(struct net_device *dev)
2552 static inline void netdev_set_rx_headroom(struct net_device *dev, int new_hr)
2559 static inline void netdev_reset_rx_headroom(struct net_device *dev)
2564 static inline void *netdev_get_ml_priv(struct net_device *dev,
2573 static inline void netdev_set_ml_priv(struct net_device *dev,
2591 struct net *dev_net(const struct net_device *dev)
2597 void dev_net_set(struct net_device *dev, struct net *net)
2608 static inline void *netdev_priv(const struct net_device *dev)
2610 return (char *)dev + ALIGN(sizeof(struct net_device), NETDEV_ALIGN);
2629 void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi,
2642 netif_napi_add(struct net_device *dev, struct napi_struct *napi,
2649 netif_napi_add_tx_weight(struct net_device *dev,
2668 static inline void netif_napi_add_tx(struct net_device *dev,
2700 struct net_device *dev; /* NULL is wildcarded here */
2703 struct net_device *,
2705 struct net_device *);
2708 struct net_device *);
2756 void dev_lstats_read(struct net_device *dev, u64 *packets, u64 *bytes);
2758 static inline void dev_sw_netstats_rx_add(struct net_device *dev, unsigned int len)
2768 static inline void dev_sw_netstats_tx_add(struct net_device *dev,
2780 static inline void dev_lstats_add(struct net_device *dev, unsigned int len)
2909 int register_netdevice_notifier_dev_net(struct net_device *dev,
2912 int unregister_netdevice_notifier_dev_net(struct net_device *dev,
2917 struct net_device *dev;
2935 struct net_device *upper_dev; /* new upper dev */
2967 int netdev_offload_xstats_enable(struct net_device *dev,
2970 int netdev_offload_xstats_disable(struct net_device *dev,
2972 bool netdev_offload_xstats_enabled(const struct net_device *dev,
2974 int netdev_offload_xstats_get(struct net_device *dev,
2983 void netdev_offload_xstats_push_delta(struct net_device *dev,
2988 struct net_device *dev)
2994 static inline struct net_device *
3006 int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
3030 #define net_device_entry(lh) list_entry(lh, struct net_device, dev_list)
3035 static inline struct net_device *next_net_device(struct net_device *dev)
3045 static inline struct net_device *next_net_device_rcu(struct net_device *dev)
3055 static inline struct net_device *first_net_device(struct net *net)
3061 static inline struct net_device *first_net_device_rcu(struct net *net)
3068 int netdev_boot_setup_check(struct net_device *dev);
3069 struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type,
3071 struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type);
3078 int dev_get_iflink(const struct net_device *dev);
3079 int dev_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb);
3080 int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr,
3082 struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,
3084 struct net_device *dev_get_by_name(struct net *net, const char *name);
3085 struct net_device *dev_get_by_name_rcu(struct net *net, const char *name);
3086 struct net_device *__dev_get_by_name(struct net *net, const char *name);
3088 int dev_alloc_name(struct net_device *dev, const char *name);
3089 int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
3090 void dev_close(struct net_device *dev);
3092 void dev_disable_lro(struct net_device *dev);
3094 u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb,
3095 struct net_device *sb_dev);
3096 u16 dev_pick_tx_cpu_id(struct net_device *dev, struct sk_buff *skb,
3097 struct net_device *sb_dev);
3099 int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev);
3108 struct net_device *sb_dev)
3123 int register_netdevice(struct net_device *dev);
3124 void unregister_netdevice_queue(struct net_device *dev, struct list_head *head);
3126 static inline void unregister_netdevice(struct net_device *dev)
3131 int netdev_refcnt_read(const struct net_device *dev);
3132 void free_netdev(struct net_device *dev);
3133 void netdev_freemem(struct net_device *dev);
3134 int init_dummy_netdev(struct net_device *dev);
3136 struct net_device *netdev_get_xmit_slave(struct net_device *dev,
3139 struct net_device *netdev_sk_get_lowest_dev(struct net_device *dev,
3141 struct net_device *dev_get_by_index(struct net *net, int ifindex);
3142 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
3143 struct net_device *netdev_get_by_index(struct net *net, int ifindex,
3145 struct net_device *netdev_get_by_name(struct net *net, const char *name,
3147 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
3148 struct net_device *dev_get_by_napi_id(unsigned int napi_id);
3150 static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
3164 const struct net_device *dev = skb->dev;
3173 const struct net_device *dev = skb->dev;
3181 static inline bool dev_validate_header(const struct net_device *dev,
3200 static inline bool dev_has_header(const struct net_device *dev)
3306 static inline void netif_tx_schedule_all(struct net_device *dev)
3325 static inline void netif_start_queue(struct net_device *dev)
3330 static inline void netif_tx_start_all_queues(struct net_device *dev)
3349 static inline void netif_wake_queue(struct net_device *dev)
3354 static inline void netif_tx_wake_all_queues(struct net_device *dev)
3377 static inline void netif_stop_queue(struct net_device *dev)
3382 void netif_tx_stop_all_queues(struct net_device *dev);
3395 static inline bool netif_queue_stopped(const struct net_device *dev)
3527 static inline void netdev_sent_queue(struct net_device *dev, unsigned int bytes)
3532 static inline bool __netdev_sent_queue(struct net_device *dev,
3583 static inline void netdev_completed_queue(struct net_device *dev,
3604 static inline void netdev_reset_queue(struct net_device *dev_queue)
3617 static inline u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index)
3635 static inline bool netif_running(const struct net_device *dev)
3654 static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index)
3668 static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index)
3681 static inline bool __netif_subqueue_stopped(const struct net_device *dev,
3696 static inline bool netif_subqueue_stopped(const struct net_device *dev,
3709 static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
3717 int netif_set_xps_queue(struct net_device *dev, const struct cpumask *mask,
3719 int __netif_set_xps_queue(struct net_device *dev, const unsigned long *mask,
3806 static inline int netif_set_xps_queue(struct net_device *dev,
3813 static inline int __netif_set_xps_queue(struct net_device *dev,
3827 static inline bool netif_is_multiqueue(const struct net_device *dev)
3832 int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq);
3835 int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq);
3837 static inline int netif_set_real_num_rx_queues(struct net_device *dev,
3844 int netif_set_real_num_queues(struct net_device *dev,
3916 bool netdev_is_rx_handler_busy(struct net_device *dev);
3917 int netdev_rx_handler_register(struct net_device *dev,
3920 void netdev_rx_handler_unregister(struct net_device *dev);
3932 int generic_hwtstamp_get_lower(struct net_device *dev,
3934 int generic_hwtstamp_set_lower(struct net_device *dev,
3938 unsigned int dev_get_flags(const struct net_device *);
3939 int __dev_change_flags(struct net_device *dev, unsigned int flags,
3941 int dev_change_flags(struct net_device *dev, unsigned int flags,
3943 int dev_set_alias(struct net_device *, const char *, size_t);
3944 int dev_get_alias(const struct net_device *, char *, size_t);
3945 int __dev_change_net_namespace(struct net_device *dev, struct net *net,
3948 int dev_change_net_namespace(struct net_device *dev, struct net *net,
3953 int __dev_set_mtu(struct net_device *, int);
3954 int dev_set_mtu(struct net_device *, int);
3955 int dev_pre_changeaddr_notify(struct net_device *dev, const char *addr,
3957 int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
3959 int dev_set_mac_address_user(struct net_device *dev, struct sockaddr *sa,
3962 int dev_get_port_parent_id(struct net_device *dev,
3964 bool netdev_port_same_parent_id(struct net_device *a, struct net_device *b);
3965 struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev, bool *again);
3966 struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
3970 u8 dev_xdp_prog_count(struct net_device *dev);
3971 u32 dev_xdp_prog_id(struct net_device *dev, enum bpf_xdp_mode mode);
3973 int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
3974 int dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
3975 int dev_forward_skb_nomtu(struct net_device *dev, struct sk_buff *skb);
3976 bool is_skb_forwardable(const struct net_device *dev,
3979 static __always_inline bool __is_skb_forwardable(const struct net_device *dev,
4005 struct net_device_core_stats __percpu *netdev_core_stats_alloc(struct net_device *dev);
4007 static inline struct net_device_core_stats __percpu *dev_core_stats(struct net_device *dev)
4019 static inline void dev_core_stats_##FIELD##_inc(struct net_device *dev) \
4032 static __always_inline int ____dev_forward_skb(struct net_device *dev,
4048 bool dev_nit_active(struct net_device *dev);
4049 void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
4051 static inline void __dev_put(struct net_device *dev)
4062 static inline void __dev_hold(struct net_device *dev)
4073 static inline void __netdev_tracker_alloc(struct net_device *dev,
4085 static inline void netdev_tracker_alloc(struct net_device *dev,
4094 static inline void netdev_tracker_free(struct net_device *dev,
4102 static inline void netdev_hold(struct net_device *dev,
4111 static inline void netdev_put(struct net_device *dev,
4127 static inline void dev_hold(struct net_device *dev)
4139 static inline void dev_put(struct net_device *dev)
4144 static inline void netdev_ref_replace(struct net_device *odev,
4145 struct net_device *ndev,
4167 void linkwatch_fire_event(struct net_device *dev);
4175 static inline bool netif_carrier_ok(const struct net_device *dev)
4180 unsigned long dev_trans_start(struct net_device *dev);
4182 void __netdev_watchdog_up(struct net_device *dev);
4184 void netif_carrier_on(struct net_device *dev);
4185 void netif_carrier_off(struct net_device *dev);
4186 void netif_carrier_event(struct net_device *dev);
4200 static inline void netif_dormant_on(struct net_device *dev)
4212 static inline void netif_dormant_off(struct net_device *dev)
4224 static inline bool netif_dormant(const struct net_device *dev)
4240 static inline void netif_testing_on(struct net_device *dev)
4252 static inline void netif_testing_off(struct net_device *dev)
4264 static inline bool netif_testing(const struct net_device *dev)
4276 static inline bool netif_oper_up(const struct net_device *dev)
4288 static inline bool netif_device_present(const struct net_device *dev)
4293 void netif_device_detach(struct net_device *dev);
4295 void netif_device_attach(struct net_device *dev);
4440 static inline void netif_trans_update(struct net_device *dev)
4453 void netif_tx_lock(struct net_device *dev);
4455 static inline void netif_tx_lock_bh(struct net_device *dev)
4461 void netif_tx_unlock(struct net_device *dev);
4463 static inline void netif_tx_unlock_bh(struct net_device *dev)
4490 static inline void netif_tx_disable(struct net_device *dev)
4509 static inline void netif_addr_lock(struct net_device *dev)
4519 static inline void netif_addr_lock_bh(struct net_device *dev)
4530 static inline void netif_addr_unlock(struct net_device *dev)
4535 static inline void netif_addr_unlock_bh(struct net_device *dev)
4549 void ether_setup(struct net_device *dev);
4552 struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
4554 void (*setup)(struct net_device *),
4563 int register_netdev(struct net_device *dev);
4564 void unregister_netdev(struct net_device *dev);
4566 int devm_register_netdev(struct device *dev, struct net_device *ndev);
4574 struct net_device *dev,
4575 int (*sync)(struct net_device *, const unsigned char *),
4576 int (*unsync)(struct net_device *,
4579 struct net_device *dev,
4580 int (*sync)(struct net_device *,
4582 int (*unsync)(struct net_device *,
4585 struct net_device *dev,
4586 int (*unsync)(struct net_device *,
4589 struct net_device *dev,
4590 int (*unsync)(struct net_device *,
4595 void dev_addr_mod(struct net_device *dev, unsigned int offset,
4599 __dev_addr_set(struct net_device *dev, const void *addr, size_t len)
4604 static inline void dev_addr_set(struct net_device *dev, const u8 *addr)
4609 int dev_addr_add(struct net_device *dev, const unsigned char *addr,
4611 int dev_addr_del(struct net_device *dev, const unsigned char *addr,
4615 int dev_uc_add(struct net_device *dev, const unsigned char *addr);
4616 int dev_uc_add_excl(struct net_device *dev, const unsigned char *addr);
4617 int dev_uc_del(struct net_device *dev, const unsigned char *addr);
4618 int dev_uc_sync(struct net_device *to, struct net_device *from);
4619 int dev_uc_sync_multiple(struct net_device *to, struct net_device *from);
4620 void dev_uc_unsync(struct net_device *to, struct net_device *from);
4621 void dev_uc_flush(struct net_device *dev);
4622 void dev_uc_init(struct net_device *dev);
4633 static inline int __dev_uc_sync(struct net_device *dev,
4634 int (*sync)(struct net_device *,
4636 int (*unsync)(struct net_device *,
4649 static inline void __dev_uc_unsync(struct net_device *dev,
4650 int (*unsync)(struct net_device *,
4657 int dev_mc_add(struct net_device *dev, const unsigned char *addr);
4658 int dev_mc_add_global(struct net_device *dev, const unsigned char *addr);
4659 int dev_mc_add_excl(struct net_device *dev, const unsigned char *addr);
4660 int dev_mc_del(struct net_device *dev, const unsigned char *addr);
4661 int dev_mc_del_global(struct net_device *dev, const unsigned char *addr);
4662 int dev_mc_sync(struct net_device *to, struct net_device *from);
4663 int dev_mc_sync_multiple(struct net_device *to, struct net_device *from);
4664 void dev_mc_unsync(struct net_device *to, struct net_device *from);
4665 void dev_mc_flush(struct net_device *dev);
4666 void dev_mc_init(struct net_device *dev);
4677 static inline int __dev_mc_sync(struct net_device *dev,
4678 int (*sync)(struct net_device *,
4680 int (*unsync)(struct net_device *,
4693 static inline void __dev_mc_unsync(struct net_device *dev,
4694 int (*unsync)(struct net_device *,
4701 void dev_set_rx_mode(struct net_device *dev);
4702 int dev_set_promiscuity(struct net_device *dev, int inc);
4703 int dev_set_allmulti(struct net_device *dev, int inc);
4704 void netdev_state_change(struct net_device *dev);
4705 void __netdev_notify_peers(struct net_device *dev);
4706 void netdev_notify_peers(struct net_device *dev);
4707 void netdev_features_change(struct net_device *dev);
4710 struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
4716 void dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s);
4739 bool netdev_has_upper_dev(struct net_device *dev, struct net_device *upper_dev);
4740 struct net_device *netdev_upper_get_next_dev_rcu(struct net_device *dev,
4750 int netdev_walk_all_upper_dev_rcu(struct net_device *dev,
4751 int (*fn)(struct net_device *upper_dev,
4755 bool netdev_has_upper_dev_all_rcu(struct net_device *dev,
4756 struct net_device *upper_dev);
4758 bool netdev_has_any_upper_dev(struct net_device *dev);
4760 void *netdev_lower_get_next_private(struct net_device *dev,
4762 void *netdev_lower_get_next_private_rcu(struct net_device *dev,
4777 void *netdev_lower_get_next(struct net_device *dev,
4786 struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev,
4788 int netdev_walk_all_lower_dev(struct net_device *dev,
4789 int (*fn)(struct net_device *lower_dev,
4792 int netdev_walk_all_lower_dev_rcu(struct net_device *dev,
4793 int (*fn)(struct net_device *lower_dev,
4798 void *netdev_lower_get_first_private_rcu(struct net_device *dev);
4799 struct net_device *netdev_master_upper_dev_get(struct net_device *dev);
4800 struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev);
4801 int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev,
4803 int netdev_master_upper_dev_link(struct net_device *dev,
4804 struct net_device *upper_dev,
4807 void netdev_upper_dev_unlink(struct net_device *dev,
4808 struct net_device *upper_dev);
4809 int netdev_adjacent_change_prepare(struct net_device *old_dev,
4810 struct net_device *new_dev,
4811 struct net_device *dev,
4813 void netdev_adjacent_change_commit(struct net_device *old_dev,
4814 struct net_device *new_dev,
4815 struct net_device *dev);
4816 void netdev_adjacent_change_abort(struct net_device *old_dev,
4817 struct net_device *new_dev,
4818 struct net_device *dev);
4819 void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);
4820 void *netdev_lower_dev_get_private(struct net_device *dev,
4821 struct net_device *lower_dev);
4822 void netdev_lower_state_changed(struct net_device *lower_dev,
4845 void netdev_bonding_info_change(struct net_device *dev,
4849 void ethtool_notify(struct net_device *dev, unsigned int cmd, const void *data);
4851 static inline void ethtool_notify(struct net_device *dev, unsigned int cmd,
4883 void netdev_rx_csum_fault(struct net_device *dev, struct sk_buff *skb);
4885 static inline void netdev_rx_csum_fault(struct net_device *dev,
4894 static inline ktime_t netdev_get_tstamp(struct net_device *dev,
4907 struct sk_buff *skb, struct net_device *dev,
4919 static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_device *dev,
4939 const char *netdev_drivername(const struct net_device *dev);
4955 struct net_device *dev)
4972 int __netdev_update_features(struct net_device *dev);
4973 void netdev_update_features(struct net_device *dev);
4974 void netdev_change_features(struct net_device *dev);
4976 void netif_stacked_transfer_operstate(const struct net_device *rootdev,
4977 struct net_device *dev);
4980 struct net_device *dev,
5027 void netif_set_tso_max_size(struct net_device *dev, unsigned int size);
5028 void netif_set_tso_max_segs(struct net_device *dev, unsigned int segs);
5029 void netif_inherit_tso_max(struct net_device *to,
5030 const struct net_device *from);
5032 static inline bool netif_is_macsec(const struct net_device *dev)
5037 static inline bool netif_is_macvlan(const struct net_device *dev)
5042 static inline bool netif_is_macvlan_port(const struct net_device *dev)
5047 static inline bool netif_is_bond_master(const struct net_device *dev)
5052 static inline bool netif_is_bond_slave(const struct net_device *dev)
5057 static inline bool netif_supports_nofcs(struct net_device *dev)
5062 static inline bool netif_has_l3_rx_handler(const struct net_device *dev)
5067 static inline bool netif_is_l3_master(const struct net_device *dev)
5072 static inline bool netif_is_l3_slave(const struct net_device *dev)
5077 static inline int dev_sdif(const struct net_device *dev)
5086 static inline bool netif_is_bridge_master(const struct net_device *dev)
5091 static inline bool netif_is_bridge_port(const struct net_device *dev)
5096 static inline bool netif_is_ovs_master(const struct net_device *dev)
5101 static inline bool netif_is_ovs_port(const struct net_device *dev)
5106 static inline bool netif_is_any_bridge_master(const struct net_device *dev)
5111 static inline bool netif_is_any_bridge_port(const struct net_device *dev)
5116 static inline bool netif_is_team_master(const struct net_device *dev)
5121 static inline bool netif_is_team_port(const struct net_device *dev)
5126 static inline bool netif_is_lag_master(const struct net_device *dev)
5131 static inline bool netif_is_lag_port(const struct net_device *dev)
5136 static inline bool netif_is_rxfh_configured(const struct net_device *dev)
5141 static inline bool netif_is_failover(const struct net_device *dev)
5146 static inline bool netif_is_failover_slave(const struct net_device *dev)
5152 static inline void netif_keep_dst(struct net_device *dev)
5158 static inline bool netif_reduces_vlan_mtu(struct net_device *dev)
5170 static inline const char *netdev_name(const struct net_device *dev)
5173 return "(unnamed net_device)";
5177 static inline const char *netdev_reg_state(const struct net_device *dev)
5233 extern struct net_device *blackhole_netdev;