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);
306 int (*create) (struct sk_buff *skb, struct net_device *dev,
312 const struct net_device *dev,
366 struct net_device *dev;
427 * Currently, a net_device can only have a single rx_handler registered. Trying
430 * To register a rx_handler on a net_device, use netdev_rx_handler_register().
431 * To unregister a rx_handler on a net_device, use
442 * net_device, it should return RX_HANDLER_ANOTHER. The rx_handler for the
552 int dev_set_threaded(struct net_device *dev, bool threaded);
638 struct net_device *dev;
657 struct net_device *sb_dev;
728 bool rps_may_expire_flow(struct net_device *dev, u16 rxq_index, u32 flow_id,
732 /* XPS map type and offset of the xps map within net_device->xps_maps[]. */
822 typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
824 struct net_device *sb_dev);
837 const struct net_device *dev;
877 const struct net_device *dev;
1006 * int (*ndo_init)(struct net_device *dev);
1012 * void (*ndo_uninit)(struct net_device *dev);
1016 * int (*ndo_open)(struct net_device *dev);
1020 * int (*ndo_stop)(struct net_device *dev);
1025 * struct net_device *dev);
1034 * struct net_device *dev
1043 * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
1044 * struct net_device *sb_dev);
1048 * void (*ndo_change_rx_flags)(struct net_device *dev, int flags);
1052 * void (*ndo_set_rx_mode)(struct net_device *dev);
1057 * int (*ndo_set_mac_address)(struct net_device *dev, void *addr);
1062 * int (*ndo_validate_addr)(struct net_device *dev);
1065 * int (*ndo_do_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
1070 * int (*ndo_siocbond)(struct net_device *dev, struct ifreq *ifr, int cmd);
1075 * * int (*ndo_eth_ioctl)(struct net_device *dev, struct ifreq *ifr, int cmd);
1079 * int (*ndo_set_config)(struct net_device *dev, struct ifmap *map);
1084 * int (*ndo_change_mtu)(struct net_device *dev, int new_mtu);
1088 * void (*ndo_tx_timeout)(struct net_device *dev, unsigned int txqueue);
1092 * void (*ndo_get_stats64)(struct net_device *dev,
1094 * struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
1106 * bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id)
1109 * int (*ndo_get_offload_stats)(int attr_id, const struct net_device *dev,
1114 * int (*ndo_vlan_rx_add_vid)(struct net_device *dev, __be16 proto, u16 vid);
1118 * int (*ndo_vlan_rx_kill_vid)(struct net_device *dev, __be16 proto, u16 vid);
1122 * void (*ndo_poll_controller)(struct net_device *dev);
1125 * int (*ndo_set_vf_mac)(struct net_device *dev, int vf, u8* mac);
1126 * int (*ndo_set_vf_vlan)(struct net_device *dev, int vf, u16 vlan,
1128 * int (*ndo_set_vf_rate)(struct net_device *dev, int vf, int min_tx_rate,
1130 * int (*ndo_set_vf_spoofchk)(struct net_device *dev, int vf, bool setting);
1131 * int (*ndo_set_vf_trust)(struct net_device *dev, int vf, bool setting);
1132 * int (*ndo_get_vf_config)(struct net_device *dev,
1134 * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state);
1135 * int (*ndo_set_vf_port)(struct net_device *dev, int vf,
1141 * int (*ndo_set_vf_rss_query_en)(struct net_device *dev, int vf, bool setting);
1142 * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb);
1143 * int (*ndo_setup_tc)(struct net_device *dev, enum tc_setup_type type,
1151 * int (*ndo_fcoe_enable)(struct net_device *dev);
1156 * int (*ndo_fcoe_disable)(struct net_device *dev);
1161 * int (*ndo_fcoe_ddp_setup)(struct net_device *dev, u16 xid,
1168 * int (*ndo_fcoe_ddp_done)(struct net_device *dev, u16 xid);
1173 * int (*ndo_fcoe_ddp_target)(struct net_device *dev, u16 xid,
1180 * int (*ndo_fcoe_get_hbainfo)(struct net_device *dev,
1187 * int (*ndo_fcoe_get_wwn)(struct net_device *dev, u64 *wwn, int type);
1194 * int (*ndo_rx_flow_steer)(struct net_device *dev, const struct sk_buff *skb,
1201 * int (*ndo_add_slave)(struct net_device *dev, struct net_device *slave_dev);
1204 * int (*ndo_del_slave)(struct net_device *dev, struct net_device *slave_dev);
1207 * struct net_device *(*ndo_get_xmit_slave)(struct net_device *dev,
1214 * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
1220 * int (*ndo_set_features)(struct net_device *dev, netdev_features_t features);
1226 * struct net_device *dev,
1231 * struct net_device *dev,
1234 * int (*ndo_fdb_del_bulk)(struct nlmsghdr *nlh, struct net_device *dev,
1237 * struct net_device *dev, struct net_device *filter_dev,
1242 * int (*ndo_mdb_add)(struct net_device *dev, struct nlattr *tb[],
1245 * int (*ndo_mdb_del)(struct net_device *dev, struct nlattr *tb[],
1248 * int (*ndo_mdb_del_bulk)(struct net_device *dev, struct nlattr *tb[],
1251 * int (*ndo_mdb_dump)(struct net_device *dev, struct sk_buff *skb,
1256 * int (*ndo_bridge_setlink)(struct net_device *dev, struct nlmsghdr *nlh,
1259 * struct net_device *dev, u32 filter_mask,
1261 * int (*ndo_bridge_dellink)(struct net_device *dev, struct nlmsghdr *nlh,
1264 * int (*ndo_change_carrier)(struct net_device *dev, bool new_carrier);
1272 * int (*ndo_get_phys_port_id)(struct net_device *dev,
1278 * int (*ndo_get_port_parent_id)(struct net_device *dev,
1282 * void* (*ndo_dfwd_add_station)(struct net_device *pdev,
1283 * struct net_device *dev)
1289 * void (*ndo_dfwd_del_station)(struct net_device *pdev, void *priv)
1294 * int (*ndo_set_tx_maxrate)(struct net_device *dev,
1298 * int (*ndo_get_iflink)(const struct net_device *dev);
1300 * int (*ndo_fill_metadata_dst)(struct net_device *dev, struct sk_buff *skb);
1304 * void (*ndo_set_rx_headroom)(struct net_device *dev, int needed_headroom);
1310 * int (*ndo_bpf)(struct net_device *dev, struct netdev_bpf *bpf);
1314 * int (*ndo_xdp_xmit)(struct net_device *dev, int n, struct xdp_frame **xdp,
1321 * struct net_device *(*ndo_xdp_get_xmit_slave)(struct net_device *dev,
1324 * int (*ndo_xsk_wakeup)(struct net_device *dev, u32 queue_id, u32 flags);
1330 * int (*ndo_tunnel_ctl)(struct net_device *dev, struct ip_tunnel_parm *p,
1333 * struct net_device *(*ndo_get_peer_dev)(struct net_device *dev);
1338 * ktime_t (*ndo_get_tstamp)(struct net_device *dev,
1345 * int (*ndo_hwtstamp_get)(struct net_device *dev,
1350 * int (*ndo_hwtstamp_set)(struct net_device *dev,
1356 int (*ndo_init)(struct net_device *dev);
1357 void (*ndo_uninit)(struct net_device *dev);
1358 int (*ndo_open)(struct net_device *dev);
1359 int (*ndo_stop)(struct net_device *dev);
1361 struct net_device *dev);
1363 struct net_device *dev,
1365 u16 (*ndo_select_queue)(struct net_device *dev,
1367 struct net_device *sb_dev);
1368 void (*ndo_change_rx_flags)(struct net_device *dev,
1370 void (*ndo_set_rx_mode)(struct net_device *dev);
1371 int (*ndo_set_mac_address)(struct net_device *dev,
1373 int (*ndo_validate_addr)(struct net_device *dev);
1374 int (*ndo_do_ioctl)(struct net_device *dev,
1376 int (*ndo_eth_ioctl)(struct net_device *dev,
1378 int (*ndo_siocbond)(struct net_device *dev,
1380 int (*ndo_siocwandev)(struct net_device *dev,
1382 int (*ndo_siocdevprivate)(struct net_device *dev,
1385 int (*ndo_set_config)(struct net_device *dev,
1387 int (*ndo_change_mtu)(struct net_device *dev,
1389 int (*ndo_neigh_setup)(struct net_device *dev,
1391 void (*ndo_tx_timeout) (struct net_device *dev,
1394 void (*ndo_get_stats64)(struct net_device *dev,
1396 bool (*ndo_has_offload_stats)(const struct net_device *dev, int attr_id);
1398 const struct net_device *dev,
1400 struct net_device_stats* (*ndo_get_stats)(struct net_device *dev);
1402 int (*ndo_vlan_rx_add_vid)(struct net_device *dev,
1404 int (*ndo_vlan_rx_kill_vid)(struct net_device *dev,
1407 void (*ndo_poll_controller)(struct net_device *dev);
1408 int (*ndo_netpoll_setup)(struct net_device *dev,
1410 void (*ndo_netpoll_cleanup)(struct net_device *dev);
1412 int (*ndo_set_vf_mac)(struct net_device *dev,
1414 int (*ndo_set_vf_vlan)(struct net_device *dev,
1417 int (*ndo_set_vf_rate)(struct net_device *dev,
1420 int (*ndo_set_vf_spoofchk)(struct net_device *dev,
1422 int (*ndo_set_vf_trust)(struct net_device *dev,
1424 int (*ndo_get_vf_config)(struct net_device *dev,
1427 int (*ndo_set_vf_link_state)(struct net_device *dev,
1429 int (*ndo_get_vf_stats)(struct net_device *dev,
1433 int (*ndo_set_vf_port)(struct net_device *dev,
1436 int (*ndo_get_vf_port)(struct net_device *dev,
1438 int (*ndo_get_vf_guid)(struct net_device *dev,
1442 int (*ndo_set_vf_guid)(struct net_device *dev,
1446 struct net_device *dev,
1448 int (*ndo_setup_tc)(struct net_device *dev,
1452 int (*ndo_fcoe_enable)(struct net_device *dev);
1453 int (*ndo_fcoe_disable)(struct net_device *dev);
1454 int (*ndo_fcoe_ddp_setup)(struct net_device *dev,
1458 int (*ndo_fcoe_ddp_done)(struct net_device *dev,
1460 int (*ndo_fcoe_ddp_target)(struct net_device *dev,
1464 int (*ndo_fcoe_get_hbainfo)(struct net_device *dev,
1471 int (*ndo_fcoe_get_wwn)(struct net_device *dev,
1476 int (*ndo_rx_flow_steer)(struct net_device *dev,
1481 int (*ndo_add_slave)(struct net_device *dev,
1482 struct net_device *slave_dev,
1484 int (*ndo_del_slave)(struct net_device *dev,
1485 struct net_device *slave_dev);
1486 struct net_device* (*ndo_get_xmit_slave)(struct net_device *dev,
1489 struct net_device* (*ndo_sk_get_lower_dev)(struct net_device *dev,
1491 netdev_features_t (*ndo_fix_features)(struct net_device *dev,
1493 int (*ndo_set_features)(struct net_device *dev,
1495 int (*ndo_neigh_construct)(struct net_device *dev,
1497 void (*ndo_neigh_destroy)(struct net_device *dev,
1502 struct net_device *dev,
1509 struct net_device *dev,
1513 struct net_device *dev,
1517 struct net_device *dev,
1518 struct net_device *filter_dev,
1522 struct net_device *dev,
1526 int (*ndo_mdb_add)(struct net_device *dev,
1530 int (*ndo_mdb_del)(struct net_device *dev,
1533 int (*ndo_mdb_del_bulk)(struct net_device *dev,
1536 int (*ndo_mdb_dump)(struct net_device *dev,
1539 int (*ndo_mdb_get)(struct net_device *dev,
1543 int (*ndo_bridge_setlink)(struct net_device *dev,
1549 struct net_device *dev,
1552 int (*ndo_bridge_dellink)(struct net_device *dev,
1555 int (*ndo_change_carrier)(struct net_device *dev,
1557 int (*ndo_get_phys_port_id)(struct net_device *dev,
1559 int (*ndo_get_port_parent_id)(struct net_device *dev,
1561 int (*ndo_get_phys_port_name)(struct net_device *dev,
1563 void* (*ndo_dfwd_add_station)(struct net_device *pdev,
1564 struct net_device *dev);
1565 void (*ndo_dfwd_del_station)(struct net_device *pdev,
1568 int (*ndo_set_tx_maxrate)(struct net_device *dev,
1571 int (*ndo_get_iflink)(const struct net_device *dev);
1572 int (*ndo_fill_metadata_dst)(struct net_device *dev,
1574 void (*ndo_set_rx_headroom)(struct net_device *dev,
1576 int (*ndo_bpf)(struct net_device *dev,
1578 int (*ndo_xdp_xmit)(struct net_device *dev, int n,
1581 struct net_device * (*ndo_xdp_get_xmit_slave)(struct net_device *dev,
1583 int (*ndo_xsk_wakeup)(struct net_device *dev,
1585 int (*ndo_tunnel_ctl)(struct net_device *dev,
1587 struct net_device * (*ndo_get_peer_dev)(struct net_device *dev);
1590 ktime_t (*ndo_get_tstamp)(struct net_device *dev,
1593 int (*ndo_hwtstamp_get)(struct net_device *dev,
1595 int (*ndo_hwtstamp_set)(struct net_device *dev,
1601 * enum netdev_priv_flags - &struct net_device priv_flags
1603 * These are the &struct net_device, they are only set internally
1721 /* Specifies the type of the struct net_device::ml_priv pointer */
1744 * struct net_device - The DEVICE structure.
2027 * FIXME: cleanup struct net_device such that network protocol info
2031 struct net_device {
2033 * Documentation/networking/net_cachelines/net_device.rst.
2316 void (*priv_destructor)(struct net_device *dev);
2401 #define to_net_dev(d) container_of(d, struct net_device, dev)
2414 static inline bool netif_elide_gro(const struct net_device *dev)
2424 int netdev_get_prio_tc_map(const struct net_device *dev, u32 prio)
2430 int netdev_set_prio_tc_map(struct net_device *dev, u8 prio, u8 tc)
2439 int netdev_txq_to_tc(struct net_device *dev, unsigned int txq);
2440 void netdev_reset_tc(struct net_device *dev);
2441 int netdev_set_tc_queue(struct net_device *dev, u8 tc, u16 count, u16 offset);
2442 int netdev_set_num_tc(struct net_device *dev, u8 num_tc);
2445 int netdev_get_num_tc(struct net_device *dev)
2466 void netdev_unbind_sb_channel(struct net_device *dev,
2467 struct net_device *sb_dev);
2468 int netdev_bind_sb_channel_queue(struct net_device *dev,
2469 struct net_device *sb_dev,
2471 int netdev_set_sb_channel(struct net_device *dev, u16 channel);
2472 static inline int netdev_get_sb_channel(struct net_device *dev)
2478 struct netdev_queue *netdev_get_tx_queue(const struct net_device *dev,
2485 static inline struct netdev_queue *skb_get_tx_queue(const struct net_device *dev,
2491 static inline void netdev_for_each_tx_queue(struct net_device *dev,
2492 void (*f)(struct net_device *,
2518 u16 netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,
2519 struct net_device *sb_dev);
2520 struct netdev_queue *netdev_core_pick_tx(struct net_device *dev,
2522 struct net_device *sb_dev);
2527 static inline unsigned netdev_get_fwd_headroom(struct net_device *dev)
2532 static inline void netdev_set_rx_headroom(struct net_device *dev, int new_hr)
2539 static inline void netdev_reset_rx_headroom(struct net_device *dev)
2544 static inline void *netdev_get_ml_priv(struct net_device *dev,
2553 static inline void netdev_set_ml_priv(struct net_device *dev,
2571 struct net *dev_net(const struct net_device *dev)
2577 void dev_net_set(struct net_device *dev, struct net *net)
2588 static inline void *netdev_priv(const struct net_device *dev)
2590 return (char *)dev + ALIGN(sizeof(struct net_device), NETDEV_ALIGN);
2604 void netif_queue_set_napi(struct net_device *dev, unsigned int queue_index,
2618 void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi,
2631 netif_napi_add(struct net_device *dev, struct napi_struct *napi,
2638 netif_napi_add_tx_weight(struct net_device *dev,
2657 static inline void netif_napi_add_tx(struct net_device *dev,
2689 struct net_device *dev; /* NULL is wildcarded here */
2692 struct net_device *,
2694 struct net_device *);
2697 struct net_device *);
2745 void dev_lstats_read(struct net_device *dev, u64 *packets, u64 *bytes);
2747 static inline void dev_sw_netstats_rx_add(struct net_device *dev, unsigned int len)
2757 static inline void dev_sw_netstats_tx_add(struct net_device *dev,
2769 static inline void dev_lstats_add(struct net_device *dev, unsigned int len)
2898 int register_netdevice_notifier_dev_net(struct net_device *dev,
2901 int unregister_netdevice_notifier_dev_net(struct net_device *dev,
2906 struct net_device *dev;
2924 struct net_device *upper_dev; /* new upper dev */
2956 int netdev_offload_xstats_enable(struct net_device *dev,
2959 int netdev_offload_xstats_disable(struct net_device *dev,
2961 bool netdev_offload_xstats_enabled(const struct net_device *dev,
2963 int netdev_offload_xstats_get(struct net_device *dev,
2972 void netdev_offload_xstats_push_delta(struct net_device *dev,
2977 struct net_device *dev)
2983 static inline struct net_device *
2995 int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
3017 #define net_device_entry(lh) list_entry(lh, struct net_device, dev_list)
3022 static inline struct net_device *next_net_device(struct net_device *dev)
3032 static inline struct net_device *next_net_device_rcu(struct net_device *dev)
3042 static inline struct net_device *first_net_device(struct net *net)
3048 static inline struct net_device *first_net_device_rcu(struct net *net)
3055 int netdev_boot_setup_check(struct net_device *dev);
3056 struct net_device *dev_getbyhwaddr_rcu(struct net *net, unsigned short type,
3058 struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type);
3065 int dev_get_iflink(const struct net_device *dev);
3066 int dev_fill_metadata_dst(struct net_device *dev, struct sk_buff *skb);
3067 int dev_fill_forward_path(const struct net_device *dev, const u8 *daddr,
3069 struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,
3071 struct net_device *dev_get_by_name(struct net *net, const char *name);
3072 struct net_device *dev_get_by_name_rcu(struct net *net, const char *name);
3073 struct net_device *__dev_get_by_name(struct net *net, const char *name);
3075 int dev_alloc_name(struct net_device *dev, const char *name);
3076 int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
3077 void dev_close(struct net_device *dev);
3079 void dev_disable_lro(struct net_device *dev);
3081 u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb,
3082 struct net_device *sb_dev);
3083 u16 dev_pick_tx_cpu_id(struct net_device *dev, struct sk_buff *skb,
3084 struct net_device *sb_dev);
3086 int __dev_queue_xmit(struct sk_buff *skb, struct net_device *sb_dev);
3095 struct net_device *sb_dev)
3110 int register_netdevice(struct net_device *dev);
3111 void unregister_netdevice_queue(struct net_device *dev, struct list_head *head);
3113 static inline void unregister_netdevice(struct net_device *dev)
3118 int netdev_refcnt_read(const struct net_device *dev);
3119 void free_netdev(struct net_device *dev);
3120 void netdev_freemem(struct net_device *dev);
3121 void init_dummy_netdev(struct net_device *dev);
3123 struct net_device *netdev_get_xmit_slave(struct net_device *dev,
3126 struct net_device *netdev_sk_get_lowest_dev(struct net_device *dev,
3128 struct net_device *dev_get_by_index(struct net *net, int ifindex);
3129 struct net_device *__dev_get_by_index(struct net *net, int ifindex);
3130 struct net_device *netdev_get_by_index(struct net *net, int ifindex,
3132 struct net_device *netdev_get_by_name(struct net *net, const char *name,
3134 struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
3135 struct net_device *dev_get_by_napi_id(unsigned int napi_id);
3137 static inline int dev_hard_header(struct sk_buff *skb, struct net_device *dev,
3151 const struct net_device *dev = skb->dev;
3160 const struct net_device *dev = skb->dev;
3168 static inline bool dev_validate_header(const struct net_device *dev,
3187 static inline bool dev_has_header(const struct net_device *dev)
3293 static inline void netif_tx_schedule_all(struct net_device *dev)
3312 static inline void netif_start_queue(struct net_device *dev)
3317 static inline void netif_tx_start_all_queues(struct net_device *dev)
3336 static inline void netif_wake_queue(struct net_device *dev)
3341 static inline void netif_tx_wake_all_queues(struct net_device *dev)
3364 static inline void netif_stop_queue(struct net_device *dev)
3369 void netif_tx_stop_all_queues(struct net_device *dev);
3382 static inline bool netif_queue_stopped(const struct net_device *dev)
3524 static inline void netdev_sent_queue(struct net_device *dev, unsigned int bytes)
3529 static inline bool __netdev_sent_queue(struct net_device *dev,
3580 static inline void netdev_completed_queue(struct net_device *dev,
3601 static inline void netdev_reset_queue(struct net_device *dev_queue)
3614 static inline u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index)
3632 static inline bool netif_running(const struct net_device *dev)
3651 static inline void netif_start_subqueue(struct net_device *dev, u16 queue_index)
3665 static inline void netif_stop_subqueue(struct net_device *dev, u16 queue_index)
3678 static inline bool __netif_subqueue_stopped(const struct net_device *dev,
3693 static inline bool netif_subqueue_stopped(const struct net_device *dev,
3706 static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index)
3714 int netif_set_xps_queue(struct net_device *dev, const struct cpumask *mask,
3716 int __netif_set_xps_queue(struct net_device *dev, const unsigned long *mask,
3803 static inline int netif_set_xps_queue(struct net_device *dev,
3810 static inline int __netif_set_xps_queue(struct net_device *dev,
3824 static inline bool netif_is_multiqueue(const struct net_device *dev)
3829 int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq);
3832 int netif_set_real_num_rx_queues(struct net_device *dev, unsigned int rxq);
3834 static inline int netif_set_real_num_rx_queues(struct net_device *dev,
3841 int netif_set_real_num_queues(struct net_device *dev,
3911 bool netdev_is_rx_handler_busy(struct net_device *dev);
3912 int netdev_rx_handler_register(struct net_device *dev,
3915 void netdev_rx_handler_unregister(struct net_device *dev);
3927 int generic_hwtstamp_get_lower(struct net_device *dev,
3929 int generic_hwtstamp_set_lower(struct net_device *dev,
3932 int dev_set_hwtstamp_phylib(struct net_device *dev,
3936 unsigned int dev_get_flags(const struct net_device *);
3937 int __dev_change_flags(struct net_device *dev, unsigned int flags,
3939 int dev_change_flags(struct net_device *dev, unsigned int flags,
3941 int dev_set_alias(struct net_device *, const char *, size_t);
3942 int dev_get_alias(const struct net_device *, char *, size_t);
3943 int __dev_change_net_namespace(struct net_device *dev, struct net *net,
3946 int dev_change_net_namespace(struct net_device *dev, struct net *net,
3951 int __dev_set_mtu(struct net_device *, int);
3952 int dev_set_mtu(struct net_device *, int);
3953 int dev_pre_changeaddr_notify(struct net_device *dev, const char *addr,
3955 int dev_set_mac_address(struct net_device *dev, struct sockaddr *sa,
3957 int dev_set_mac_address_user(struct net_device *dev, struct sockaddr *sa,
3960 int dev_get_port_parent_id(struct net_device *dev,
3962 bool netdev_port_same_parent_id(struct net_device *a, struct net_device *b);
3964 struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev, bool *again);
3965 struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
3969 u8 dev_xdp_prog_count(struct net_device *dev);
3970 u32 dev_xdp_prog_id(struct net_device *dev, enum bpf_xdp_mode mode);
3972 int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
3973 int dev_forward_skb(struct net_device *dev, struct sk_buff *skb);
3974 int dev_forward_skb_nomtu(struct net_device *dev, struct sk_buff *skb);
3975 bool is_skb_forwardable(const struct net_device *dev,
3978 static __always_inline bool __is_skb_forwardable(const struct net_device *dev,
4004 void netdev_core_stats_inc(struct net_device *dev, u32 offset);
4007 static inline void dev_core_stats_##FIELD##_inc(struct net_device *dev) \
4018 static __always_inline int ____dev_forward_skb(struct net_device *dev,
4034 bool dev_nit_active(struct net_device *dev);
4035 void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev);
4037 static inline void __dev_put(struct net_device *dev)
4048 static inline void __dev_hold(struct net_device *dev)
4059 static inline void __netdev_tracker_alloc(struct net_device *dev,
4071 static inline void netdev_tracker_alloc(struct net_device *dev,
4080 static inline void netdev_tracker_free(struct net_device *dev,
4088 static inline void netdev_hold(struct net_device *dev,
4097 static inline void netdev_put(struct net_device *dev,
4113 static inline void dev_hold(struct net_device *dev)
4125 static inline void dev_put(struct net_device *dev)
4130 static inline void netdev_ref_replace(struct net_device *odev,
4131 struct net_device *ndev,
4153 void linkwatch_fire_event(struct net_device *dev);
4162 void linkwatch_sync_dev(struct net_device *dev);
4170 static inline bool netif_carrier_ok(const struct net_device *dev)
4175 unsigned long dev_trans_start(struct net_device *dev);
4177 void __netdev_watchdog_up(struct net_device *dev);
4179 void netif_carrier_on(struct net_device *dev);
4180 void netif_carrier_off(struct net_device *dev);
4181 void netif_carrier_event(struct net_device *dev);
4195 static inline void netif_dormant_on(struct net_device *dev)
4207 static inline void netif_dormant_off(struct net_device *dev)
4219 static inline bool netif_dormant(const struct net_device *dev)
4235 static inline void netif_testing_on(struct net_device *dev)
4247 static inline void netif_testing_off(struct net_device *dev)
4259 static inline bool netif_testing(const struct net_device *dev)
4271 static inline bool netif_oper_up(const struct net_device *dev)
4285 static inline bool netif_device_present(const struct net_device *dev)
4290 void netif_device_detach(struct net_device *dev);
4292 void netif_device_attach(struct net_device *dev);
4437 static inline void netif_trans_update(struct net_device *dev)
4450 void netif_tx_lock(struct net_device *dev);
4452 static inline void netif_tx_lock_bh(struct net_device *dev)
4458 void netif_tx_unlock(struct net_device *dev);
4460 static inline void netif_tx_unlock_bh(struct net_device *dev)
4487 static inline void netif_tx_disable(struct net_device *dev)
4506 static inline void netif_addr_lock(struct net_device *dev)
4516 static inline void netif_addr_lock_bh(struct net_device *dev)
4527 static inline void netif_addr_unlock(struct net_device *dev)
4532 static inline void netif_addr_unlock_bh(struct net_device *dev)
4546 void ether_setup(struct net_device *dev);
4549 struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
4551 void (*setup)(struct net_device *),
4560 int register_netdev(struct net_device *dev);
4561 void unregister_netdev(struct net_device *dev);
4563 int devm_register_netdev(struct device *dev, struct net_device *ndev);
4571 struct net_device *dev,
4572 int (*sync)(struct net_device *, const unsigned char *),
4573 int (*unsync)(struct net_device *,
4576 struct net_device *dev,
4577 int (*sync)(struct net_device *,
4579 int (*unsync)(struct net_device *,
4582 struct net_device *dev,
4583 int (*unsync)(struct net_device *,
4586 struct net_device *dev,
4587 int (*unsync)(struct net_device *,
4592 void dev_addr_mod(struct net_device *dev, unsigned int offset,
4596 __dev_addr_set(struct net_device *dev, const void *addr, size_t len)
4601 static inline void dev_addr_set(struct net_device *dev, const u8 *addr)
4606 int dev_addr_add(struct net_device *dev, const unsigned char *addr,
4608 int dev_addr_del(struct net_device *dev, const unsigned char *addr,
4612 int dev_uc_add(struct net_device *dev, const unsigned char *addr);
4613 int dev_uc_add_excl(struct net_device *dev, const unsigned char *addr);
4614 int dev_uc_del(struct net_device *dev, const unsigned char *addr);
4615 int dev_uc_sync(struct net_device *to, struct net_device *from);
4616 int dev_uc_sync_multiple(struct net_device *to, struct net_device *from);
4617 void dev_uc_unsync(struct net_device *to, struct net_device *from);
4618 void dev_uc_flush(struct net_device *dev);
4619 void dev_uc_init(struct net_device *dev);
4630 static inline int __dev_uc_sync(struct net_device *dev,
4631 int (*sync)(struct net_device *,
4633 int (*unsync)(struct net_device *,
4646 static inline void __dev_uc_unsync(struct net_device *dev,
4647 int (*unsync)(struct net_device *,
4654 int dev_mc_add(struct net_device *dev, const unsigned char *addr);
4655 int dev_mc_add_global(struct net_device *dev, const unsigned char *addr);
4656 int dev_mc_add_excl(struct net_device *dev, const unsigned char *addr);
4657 int dev_mc_del(struct net_device *dev, const unsigned char *addr);
4658 int dev_mc_del_global(struct net_device *dev, const unsigned char *addr);
4659 int dev_mc_sync(struct net_device *to, struct net_device *from);
4660 int dev_mc_sync_multiple(struct net_device *to, struct net_device *from);
4661 void dev_mc_unsync(struct net_device *to, struct net_device *from);
4662 void dev_mc_flush(struct net_device *dev);
4663 void dev_mc_init(struct net_device *dev);
4674 static inline int __dev_mc_sync(struct net_device *dev,
4675 int (*sync)(struct net_device *,
4677 int (*unsync)(struct net_device *,
4690 static inline void __dev_mc_unsync(struct net_device *dev,
4691 int (*unsync)(struct net_device *,
4698 void dev_set_rx_mode(struct net_device *dev);
4699 int dev_set_promiscuity(struct net_device *dev, int inc);
4700 int dev_set_allmulti(struct net_device *dev, int inc);
4701 void netdev_state_change(struct net_device *dev);
4702 void __netdev_notify_peers(struct net_device *dev);
4703 void netdev_notify_peers(struct net_device *dev);
4704 void netdev_features_change(struct net_device *dev);
4707 struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
4713 void dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s);
4731 bool netdev_has_upper_dev(struct net_device *dev, struct net_device *upper_dev);
4732 struct net_device *netdev_upper_get_next_dev_rcu(struct net_device *dev,
4742 int netdev_walk_all_upper_dev_rcu(struct net_device *dev,
4743 int (*fn)(struct net_device *upper_dev,
4747 bool netdev_has_upper_dev_all_rcu(struct net_device *dev,
4748 struct net_device *upper_dev);
4750 bool netdev_has_any_upper_dev(struct net_device *dev);
4752 void *netdev_lower_get_next_private(struct net_device *dev,
4754 void *netdev_lower_get_next_private_rcu(struct net_device *dev,
4769 void *netdev_lower_get_next(struct net_device *dev,
4778 struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev,
4780 int netdev_walk_all_lower_dev(struct net_device *dev,
4781 int (*fn)(struct net_device *lower_dev,
4784 int netdev_walk_all_lower_dev_rcu(struct net_device *dev,
4785 int (*fn)(struct net_device *lower_dev,
4790 void *netdev_lower_get_first_private_rcu(struct net_device *dev);
4791 struct net_device *netdev_master_upper_dev_get(struct net_device *dev);
4792 struct net_device *netdev_master_upper_dev_get_rcu(struct net_device *dev);
4793 int netdev_upper_dev_link(struct net_device *dev, struct net_device *upper_dev,
4795 int netdev_master_upper_dev_link(struct net_device *dev,
4796 struct net_device *upper_dev,
4799 void netdev_upper_dev_unlink(struct net_device *dev,
4800 struct net_device *upper_dev);
4801 int netdev_adjacent_change_prepare(struct net_device *old_dev,
4802 struct net_device *new_dev,
4803 struct net_device *dev,
4805 void netdev_adjacent_change_commit(struct net_device *old_dev,
4806 struct net_device *new_dev,
4807 struct net_device *dev);
4808 void netdev_adjacent_change_abort(struct net_device *old_dev,
4809 struct net_device *new_dev,
4810 struct net_device *dev);
4811 void netdev_adjacent_rename_links(struct net_device *dev, char *oldname);
4812 void *netdev_lower_dev_get_private(struct net_device *dev,
4813 struct net_device *lower_dev);
4814 void netdev_lower_state_changed(struct net_device *lower_dev,
4837 void netdev_bonding_info_change(struct net_device *dev,
4841 void ethtool_notify(struct net_device *dev, unsigned int cmd, const void *data);
4843 static inline void ethtool_notify(struct net_device *dev, unsigned int cmd,
4875 void netdev_rx_csum_fault(struct net_device *dev, struct sk_buff *skb);
4877 static inline void netdev_rx_csum_fault(struct net_device *dev,
4886 static inline ktime_t netdev_get_tstamp(struct net_device *dev,
4899 struct sk_buff *skb, struct net_device *dev,
4911 static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_device *dev,
4931 const char *netdev_drivername(const struct net_device *dev);
4947 struct net_device *dev)
4964 int __netdev_update_features(struct net_device *dev);
4965 void netdev_update_features(struct net_device *dev);
4966 void netdev_change_features(struct net_device *dev);
4968 void netif_stacked_transfer_operstate(const struct net_device *rootdev,
4969 struct net_device *dev);
4972 struct net_device *dev,
5019 void netif_set_tso_max_size(struct net_device *dev, unsigned int size);
5020 void netif_set_tso_max_segs(struct net_device *dev, unsigned int segs);
5021 void netif_inherit_tso_max(struct net_device *to,
5022 const struct net_device *from);
5024 static inline bool netif_is_macsec(const struct net_device *dev)
5029 static inline bool netif_is_macvlan(const struct net_device *dev)
5034 static inline bool netif_is_macvlan_port(const struct net_device *dev)
5039 static inline bool netif_is_bond_master(const struct net_device *dev)
5044 static inline bool netif_is_bond_slave(const struct net_device *dev)
5049 static inline bool netif_supports_nofcs(struct net_device *dev)
5054 static inline bool netif_has_l3_rx_handler(const struct net_device *dev)
5059 static inline bool netif_is_l3_master(const struct net_device *dev)
5064 static inline bool netif_is_l3_slave(const struct net_device *dev)
5069 static inline int dev_sdif(const struct net_device *dev)
5078 static inline bool netif_is_bridge_master(const struct net_device *dev)
5083 static inline bool netif_is_bridge_port(const struct net_device *dev)
5088 static inline bool netif_is_ovs_master(const struct net_device *dev)
5093 static inline bool netif_is_ovs_port(const struct net_device *dev)
5098 static inline bool netif_is_any_bridge_master(const struct net_device *dev)
5103 static inline bool netif_is_any_bridge_port(const struct net_device *dev)
5108 static inline bool netif_is_team_master(const struct net_device *dev)
5113 static inline bool netif_is_team_port(const struct net_device *dev)
5118 static inline bool netif_is_lag_master(const struct net_device *dev)
5123 static inline bool netif_is_lag_port(const struct net_device *dev)
5128 static inline bool netif_is_rxfh_configured(const struct net_device *dev)
5133 static inline bool netif_is_failover(const struct net_device *dev)
5138 static inline bool netif_is_failover_slave(const struct net_device *dev)
5144 static inline void netif_keep_dst(struct net_device *dev)
5150 static inline bool netif_reduces_vlan_mtu(struct net_device *dev)
5162 static inline const char *netdev_name(const struct net_device *dev)
5165 return "(unnamed net_device)";
5169 static inline const char *netdev_reg_state(const struct net_device *dev)
5226 extern struct net_device *blackhole_netdev;