aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-04-19 21:32:26 -0400
committerDave Airlie <airlied@redhat.com>2015-04-19 23:05:20 -0400
commit2c33ce009ca2389dbf0535d0672214d09738e35e (patch)
tree6186a6458c3c160385d794a23eaf07c786a9e61b /include/linux/netdevice.h
parentcec32a47010647e8b0603726ebb75b990a4057a4 (diff)
parent09d51602cf84a1264946711dd4ea0dddbac599a1 (diff)
Merge Linus master into drm-next
The merge is clean, but the arm build fails afterwards, due to API changes in the regulator tree. I've included the patch into the merge to fix the build. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h142
1 files changed, 73 insertions, 69 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 278738873703..bcbde799ec69 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -261,7 +261,6 @@ struct header_ops {
261 unsigned short type, const void *daddr, 261 unsigned short type, const void *daddr,
262 const void *saddr, unsigned int len); 262 const void *saddr, unsigned int len);
263 int (*parse)(const struct sk_buff *skb, unsigned char *haddr); 263 int (*parse)(const struct sk_buff *skb, unsigned char *haddr);
264 int (*rebuild)(struct sk_buff *skb);
265 int (*cache)(const struct neighbour *neigh, struct hh_cache *hh, __be16 type); 264 int (*cache)(const struct neighbour *neigh, struct hh_cache *hh, __be16 type);
266 void (*cache_update)(struct hh_cache *hh, 265 void (*cache_update)(struct hh_cache *hh,
267 const struct net_device *dev, 266 const struct net_device *dev,
@@ -588,6 +587,7 @@ struct netdev_queue {
588#ifdef CONFIG_BQL 587#ifdef CONFIG_BQL
589 struct dql dql; 588 struct dql dql;
590#endif 589#endif
590 unsigned long tx_maxrate;
591} ____cacheline_aligned_in_smp; 591} ____cacheline_aligned_in_smp;
592 592
593static inline int netdev_queue_numa_node_read(const struct netdev_queue *q) 593static inline int netdev_queue_numa_node_read(const struct netdev_queue *q)
@@ -795,7 +795,10 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
795 * netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, 795 * netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb,
796 * struct net_device *dev); 796 * struct net_device *dev);
797 * Called when a packet needs to be transmitted. 797 * Called when a packet needs to be transmitted.
798 * Must return NETDEV_TX_OK , NETDEV_TX_BUSY. 798 * Returns NETDEV_TX_OK. Can return NETDEV_TX_BUSY, but you should stop
799 * the queue before that can happen; it's for obsolete devices and weird
800 * corner cases, but the stack really does a non-trivial amount
801 * of useless work if you return NETDEV_TX_BUSY.
799 * (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX) 802 * (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX)
800 * Required can not be NULL. 803 * Required can not be NULL.
801 * 804 *
@@ -875,6 +878,11 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
875 * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state); 878 * int (*ndo_set_vf_link_state)(struct net_device *dev, int vf, int link_state);
876 * int (*ndo_set_vf_port)(struct net_device *dev, int vf, 879 * int (*ndo_set_vf_port)(struct net_device *dev, int vf,
877 * struct nlattr *port[]); 880 * struct nlattr *port[]);
881 *
882 * Enable or disable the VF ability to query its RSS Redirection Table and
883 * Hash Key. This is needed since on some devices VF share this information
884 * with PF and querying it may adduce a theoretical security risk.
885 * int (*ndo_set_vf_rss_query_en)(struct net_device *dev, int vf, bool setting);
878 * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb); 886 * int (*ndo_get_vf_port)(struct net_device *dev, int vf, struct sk_buff *skb);
879 * int (*ndo_setup_tc)(struct net_device *dev, u8 tc) 887 * int (*ndo_setup_tc)(struct net_device *dev, u8 tc)
880 * Called to setup 'tc' number of traffic classes in the net device. This 888 * Called to setup 'tc' number of traffic classes in the net device. This
@@ -1026,15 +1034,12 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
1026 * be otherwise expressed by feature flags. The check is called with 1034 * be otherwise expressed by feature flags. The check is called with
1027 * the set of features that the stack has calculated and it returns 1035 * the set of features that the stack has calculated and it returns
1028 * those the driver believes to be appropriate. 1036 * those the driver believes to be appropriate.
1029 * 1037 * int (*ndo_set_tx_maxrate)(struct net_device *dev,
1030 * int (*ndo_switch_parent_id_get)(struct net_device *dev, 1038 * int queue_index, u32 maxrate);
1031 * struct netdev_phys_item_id *psid); 1039 * Called when a user wants to set a max-rate limitation of specific
1032 * Called to get an ID of the switch chip this port is part of. 1040 * TX queue.
1033 * If driver implements this, it indicates that it represents a port 1041 * int (*ndo_get_iflink)(const struct net_device *dev);
1034 * of a switch chip. 1042 * Called to get the iflink value of this device.
1035 * int (*ndo_switch_port_stp_update)(struct net_device *dev, u8 state);
1036 * Called to notify switch device port of bridge port STP
1037 * state change.
1038 */ 1043 */
1039struct net_device_ops { 1044struct net_device_ops {
1040 int (*ndo_init)(struct net_device *dev); 1045 int (*ndo_init)(struct net_device *dev);
@@ -1099,6 +1104,9 @@ struct net_device_ops {
1099 struct nlattr *port[]); 1104 struct nlattr *port[]);
1100 int (*ndo_get_vf_port)(struct net_device *dev, 1105 int (*ndo_get_vf_port)(struct net_device *dev,
1101 int vf, struct sk_buff *skb); 1106 int vf, struct sk_buff *skb);
1107 int (*ndo_set_vf_rss_query_en)(
1108 struct net_device *dev,
1109 int vf, bool setting);
1102 int (*ndo_setup_tc)(struct net_device *dev, u8 tc); 1110 int (*ndo_setup_tc)(struct net_device *dev, u8 tc);
1103#if IS_ENABLED(CONFIG_FCOE) 1111#if IS_ENABLED(CONFIG_FCOE)
1104 int (*ndo_fcoe_enable)(struct net_device *dev); 1112 int (*ndo_fcoe_enable)(struct net_device *dev);
@@ -1172,6 +1180,8 @@ struct net_device_ops {
1172 bool new_carrier); 1180 bool new_carrier);
1173 int (*ndo_get_phys_port_id)(struct net_device *dev, 1181 int (*ndo_get_phys_port_id)(struct net_device *dev,
1174 struct netdev_phys_item_id *ppid); 1182 struct netdev_phys_item_id *ppid);
1183 int (*ndo_get_phys_port_name)(struct net_device *dev,
1184 char *name, size_t len);
1175 void (*ndo_add_vxlan_port)(struct net_device *dev, 1185 void (*ndo_add_vxlan_port)(struct net_device *dev,
1176 sa_family_t sa_family, 1186 sa_family_t sa_family,
1177 __be16 port); 1187 __be16 port);
@@ -1191,12 +1201,10 @@ struct net_device_ops {
1191 netdev_features_t (*ndo_features_check) (struct sk_buff *skb, 1201 netdev_features_t (*ndo_features_check) (struct sk_buff *skb,
1192 struct net_device *dev, 1202 struct net_device *dev,
1193 netdev_features_t features); 1203 netdev_features_t features);
1194#ifdef CONFIG_NET_SWITCHDEV 1204 int (*ndo_set_tx_maxrate)(struct net_device *dev,
1195 int (*ndo_switch_parent_id_get)(struct net_device *dev, 1205 int queue_index,
1196 struct netdev_phys_item_id *psid); 1206 u32 maxrate);
1197 int (*ndo_switch_port_stp_update)(struct net_device *dev, 1207 int (*ndo_get_iflink)(const struct net_device *dev);
1198 u8 state);
1199#endif
1200}; 1208};
1201 1209
1202/** 1210/**
@@ -1305,6 +1313,8 @@ enum netdev_priv_flags {
1305 * @base_addr: Device I/O address 1313 * @base_addr: Device I/O address
1306 * @irq: Device IRQ number 1314 * @irq: Device IRQ number
1307 * 1315 *
1316 * @carrier_changes: Stats to monitor carrier on<->off transitions
1317 *
1308 * @state: Generic network queuing layer state, see netdev_state_t 1318 * @state: Generic network queuing layer state, see netdev_state_t
1309 * @dev_list: The global list of network devices 1319 * @dev_list: The global list of network devices
1310 * @napi_list: List entry, that is used for polling napi devices 1320 * @napi_list: List entry, that is used for polling napi devices
@@ -1328,7 +1338,7 @@ enum netdev_priv_flags {
1328 * @mpls_features: Mask of features inheritable by MPLS 1338 * @mpls_features: Mask of features inheritable by MPLS
1329 * 1339 *
1330 * @ifindex: interface index 1340 * @ifindex: interface index
1331 * @iflink: unique device identifier 1341 * @group: The group, that the device belongs to
1332 * 1342 *
1333 * @stats: Statistics struct, which was left as a legacy, use 1343 * @stats: Statistics struct, which was left as a legacy, use
1334 * rtnl_link_stats64 instead 1344 * rtnl_link_stats64 instead
@@ -1338,8 +1348,6 @@ enum netdev_priv_flags {
1338 * @tx_dropped: Dropped packets by core network, 1348 * @tx_dropped: Dropped packets by core network,
1339 * do not use this in drivers 1349 * do not use this in drivers
1340 * 1350 *
1341 * @carrier_changes: Stats to monitor carrier on<->off transitions
1342 *
1343 * @wireless_handlers: List of functions to handle Wireless Extensions, 1351 * @wireless_handlers: List of functions to handle Wireless Extensions,
1344 * instead of ioctl, 1352 * instead of ioctl,
1345 * see <net/iw_handler.h> for details. 1353 * see <net/iw_handler.h> for details.
@@ -1348,8 +1356,7 @@ enum netdev_priv_flags {
1348 * @netdev_ops: Includes several pointers to callbacks, 1356 * @netdev_ops: Includes several pointers to callbacks,
1349 * if one wants to override the ndo_*() functions 1357 * if one wants to override the ndo_*() functions
1350 * @ethtool_ops: Management operations 1358 * @ethtool_ops: Management operations
1351 * @fwd_ops: Management operations 1359 * @header_ops: Includes callbacks for creating,parsing,caching,etc
1352 * @header_ops: Includes callbacks for creating,parsing,rebuilding,etc
1353 * of Layer 2 headers. 1360 * of Layer 2 headers.
1354 * 1361 *
1355 * @flags: Interface flags (a la BSD) 1362 * @flags: Interface flags (a la BSD)
@@ -1383,14 +1390,14 @@ enum netdev_priv_flags {
1383 * @dev_port: Used to differentiate devices that share 1390 * @dev_port: Used to differentiate devices that share
1384 * the same function 1391 * the same function
1385 * @addr_list_lock: XXX: need comments on this one 1392 * @addr_list_lock: XXX: need comments on this one
1386 * @uc: unicast mac addresses
1387 * @mc: multicast mac addresses
1388 * @dev_addrs: list of device hw addresses
1389 * @queues_kset: Group of all Kobjects in the Tx and RX queues
1390 * @uc_promisc: Counter, that indicates, that promiscuous mode 1393 * @uc_promisc: Counter, that indicates, that promiscuous mode
1391 * has been enabled due to the need to listen to 1394 * has been enabled due to the need to listen to
1392 * additional unicast addresses in a device that 1395 * additional unicast addresses in a device that
1393 * does not implement ndo_set_rx_mode() 1396 * does not implement ndo_set_rx_mode()
1397 * @uc: unicast mac addresses
1398 * @mc: multicast mac addresses
1399 * @dev_addrs: list of device hw addresses
1400 * @queues_kset: Group of all Kobjects in the Tx and RX queues
1394 * @promiscuity: Number of times, the NIC is told to work in 1401 * @promiscuity: Number of times, the NIC is told to work in
1395 * Promiscuous mode, if it becomes 0 the NIC will 1402 * Promiscuous mode, if it becomes 0 the NIC will
1396 * exit from working in Promiscuous mode 1403 * exit from working in Promiscuous mode
@@ -1420,6 +1427,12 @@ enum netdev_priv_flags {
1420 * @ingress_queue: XXX: need comments on this one 1427 * @ingress_queue: XXX: need comments on this one
1421 * @broadcast: hw bcast address 1428 * @broadcast: hw bcast address
1422 * 1429 *
1430 * @rx_cpu_rmap: CPU reverse-mapping for RX completion interrupts,
1431 * indexed by RX queue number. Assigned by driver.
1432 * This must only be set if the ndo_rx_flow_steer
1433 * operation is defined
1434 * @index_hlist: Device index hash chain
1435 *
1423 * @_tx: Array of TX queues 1436 * @_tx: Array of TX queues
1424 * @num_tx_queues: Number of TX queues allocated at alloc_netdev_mq() time 1437 * @num_tx_queues: Number of TX queues allocated at alloc_netdev_mq() time
1425 * @real_num_tx_queues: Number of TX queues currently active in device 1438 * @real_num_tx_queues: Number of TX queues currently active in device
@@ -1429,11 +1442,6 @@ enum netdev_priv_flags {
1429 * 1442 *
1430 * @xps_maps: XXX: need comments on this one 1443 * @xps_maps: XXX: need comments on this one
1431 * 1444 *
1432 * @rx_cpu_rmap: CPU reverse-mapping for RX completion interrupts,
1433 * indexed by RX queue number. Assigned by driver.
1434 * This must only be set if the ndo_rx_flow_steer
1435 * operation is defined
1436 *
1437 * @trans_start: Time (in jiffies) of last Tx 1445 * @trans_start: Time (in jiffies) of last Tx
1438 * @watchdog_timeo: Represents the timeout that is used by 1446 * @watchdog_timeo: Represents the timeout that is used by
1439 * the watchdog ( see dev_watchdog() ) 1447 * the watchdog ( see dev_watchdog() )
@@ -1441,7 +1449,6 @@ enum netdev_priv_flags {
1441 * 1449 *
1442 * @pcpu_refcnt: Number of references to this device 1450 * @pcpu_refcnt: Number of references to this device
1443 * @todo_list: Delayed register/unregister 1451 * @todo_list: Delayed register/unregister
1444 * @index_hlist: Device index hash chain
1445 * @link_watch_list: XXX: need comments on this one 1452 * @link_watch_list: XXX: need comments on this one
1446 * 1453 *
1447 * @reg_state: Register/unregister state machine 1454 * @reg_state: Register/unregister state machine
@@ -1489,7 +1496,6 @@ enum netdev_priv_flags {
1489 * 1496 *
1490 * @qdisc_tx_busylock: XXX: need comments on this one 1497 * @qdisc_tx_busylock: XXX: need comments on this one
1491 * 1498 *
1492 * @group: The group, that the device belongs to
1493 * @pm_qos_req: Power Management QoS object 1499 * @pm_qos_req: Power Management QoS object
1494 * 1500 *
1495 * FIXME: cleanup struct net_device such that network protocol info 1501 * FIXME: cleanup struct net_device such that network protocol info
@@ -1509,6 +1515,8 @@ struct net_device {
1509 unsigned long base_addr; 1515 unsigned long base_addr;
1510 int irq; 1516 int irq;
1511 1517
1518 atomic_t carrier_changes;
1519
1512 /* 1520 /*
1513 * Some hardware also needs these fields (state,dev_list, 1521 * Some hardware also needs these fields (state,dev_list,
1514 * napi_list,unreg_list,close_list) but they are not 1522 * napi_list,unreg_list,close_list) but they are not
@@ -1542,22 +1550,22 @@ struct net_device {
1542 netdev_features_t mpls_features; 1550 netdev_features_t mpls_features;
1543 1551
1544 int ifindex; 1552 int ifindex;
1545 int iflink; 1553 int group;
1546 1554
1547 struct net_device_stats stats; 1555 struct net_device_stats stats;
1548 1556
1549 atomic_long_t rx_dropped; 1557 atomic_long_t rx_dropped;
1550 atomic_long_t tx_dropped; 1558 atomic_long_t tx_dropped;
1551 1559
1552 atomic_t carrier_changes;
1553
1554#ifdef CONFIG_WIRELESS_EXT 1560#ifdef CONFIG_WIRELESS_EXT
1555 const struct iw_handler_def * wireless_handlers; 1561 const struct iw_handler_def * wireless_handlers;
1556 struct iw_public_data * wireless_data; 1562 struct iw_public_data * wireless_data;
1557#endif 1563#endif
1558 const struct net_device_ops *netdev_ops; 1564 const struct net_device_ops *netdev_ops;
1559 const struct ethtool_ops *ethtool_ops; 1565 const struct ethtool_ops *ethtool_ops;
1560 const struct forwarding_accel_ops *fwd_ops; 1566#ifdef CONFIG_NET_SWITCHDEV
1567 const struct swdev_ops *swdev_ops;
1568#endif
1561 1569
1562 const struct header_ops *header_ops; 1570 const struct header_ops *header_ops;
1563 1571
@@ -1588,6 +1596,8 @@ struct net_device {
1588 unsigned short dev_id; 1596 unsigned short dev_id;
1589 unsigned short dev_port; 1597 unsigned short dev_port;
1590 spinlock_t addr_list_lock; 1598 spinlock_t addr_list_lock;
1599 unsigned char name_assign_type;
1600 bool uc_promisc;
1591 struct netdev_hw_addr_list uc; 1601 struct netdev_hw_addr_list uc;
1592 struct netdev_hw_addr_list mc; 1602 struct netdev_hw_addr_list mc;
1593 struct netdev_hw_addr_list dev_addrs; 1603 struct netdev_hw_addr_list dev_addrs;
@@ -1595,10 +1605,6 @@ struct net_device {
1595#ifdef CONFIG_SYSFS 1605#ifdef CONFIG_SYSFS
1596 struct kset *queues_kset; 1606 struct kset *queues_kset;
1597#endif 1607#endif
1598
1599 unsigned char name_assign_type;
1600
1601 bool uc_promisc;
1602 unsigned int promiscuity; 1608 unsigned int promiscuity;
1603 unsigned int allmulti; 1609 unsigned int allmulti;
1604 1610
@@ -1645,7 +1651,10 @@ struct net_device {
1645 1651
1646 struct netdev_queue __rcu *ingress_queue; 1652 struct netdev_queue __rcu *ingress_queue;
1647 unsigned char broadcast[MAX_ADDR_LEN]; 1653 unsigned char broadcast[MAX_ADDR_LEN];
1648 1654#ifdef CONFIG_RFS_ACCEL
1655 struct cpu_rmap *rx_cpu_rmap;
1656#endif
1657 struct hlist_node index_hlist;
1649 1658
1650/* 1659/*
1651 * Cache lines mostly used on transmit path 1660 * Cache lines mostly used on transmit path
@@ -1656,13 +1665,11 @@ struct net_device {
1656 struct Qdisc *qdisc; 1665 struct Qdisc *qdisc;
1657 unsigned long tx_queue_len; 1666 unsigned long tx_queue_len;
1658 spinlock_t tx_global_lock; 1667 spinlock_t tx_global_lock;
1668 int watchdog_timeo;
1659 1669
1660#ifdef CONFIG_XPS 1670#ifdef CONFIG_XPS
1661 struct xps_dev_maps __rcu *xps_maps; 1671 struct xps_dev_maps __rcu *xps_maps;
1662#endif 1672#endif
1663#ifdef CONFIG_RFS_ACCEL
1664 struct cpu_rmap *rx_cpu_rmap;
1665#endif
1666 1673
1667 /* These may be needed for future network-power-down code. */ 1674 /* These may be needed for future network-power-down code. */
1668 1675
@@ -1672,13 +1679,11 @@ struct net_device {
1672 */ 1679 */
1673 unsigned long trans_start; 1680 unsigned long trans_start;
1674 1681
1675 int watchdog_timeo;
1676 struct timer_list watchdog_timer; 1682 struct timer_list watchdog_timer;
1677 1683
1678 int __percpu *pcpu_refcnt; 1684 int __percpu *pcpu_refcnt;
1679 struct list_head todo_list; 1685 struct list_head todo_list;
1680 1686
1681 struct hlist_node index_hlist;
1682 struct list_head link_watch_list; 1687 struct list_head link_watch_list;
1683 1688
1684 enum { NETREG_UNINITIALIZED=0, 1689 enum { NETREG_UNINITIALIZED=0,
@@ -1702,9 +1707,7 @@ struct net_device {
1702 struct netpoll_info __rcu *npinfo; 1707 struct netpoll_info __rcu *npinfo;
1703#endif 1708#endif
1704 1709
1705#ifdef CONFIG_NET_NS 1710 possible_net_t nd_net;
1706 struct net *nd_net;
1707#endif
1708 1711
1709 /* mid-layer private */ 1712 /* mid-layer private */
1710 union { 1713 union {
@@ -1745,8 +1748,6 @@ struct net_device {
1745#endif 1748#endif
1746 struct phy_device *phydev; 1749 struct phy_device *phydev;
1747 struct lock_class_key *qdisc_tx_busylock; 1750 struct lock_class_key *qdisc_tx_busylock;
1748 int group;
1749 struct pm_qos_request pm_qos_req;
1750}; 1751};
1751#define to_net_dev(d) container_of(d, struct net_device, dev) 1752#define to_net_dev(d) container_of(d, struct net_device, dev)
1752 1753
@@ -1844,10 +1845,7 @@ struct net *dev_net(const struct net_device *dev)
1844static inline 1845static inline
1845void dev_net_set(struct net_device *dev, struct net *net) 1846void dev_net_set(struct net_device *dev, struct net *net)
1846{ 1847{
1847#ifdef CONFIG_NET_NS 1848 write_pnet(&dev->nd_net, net);
1848 release_net(dev->nd_net);
1849 dev->nd_net = hold_net(net);
1850#endif
1851} 1849}
1852 1850
1853static inline bool netdev_uses_dsa(struct net_device *dev) 1851static inline bool netdev_uses_dsa(struct net_device *dev)
@@ -2159,6 +2157,7 @@ void __dev_remove_pack(struct packet_type *pt);
2159void dev_add_offload(struct packet_offload *po); 2157void dev_add_offload(struct packet_offload *po);
2160void dev_remove_offload(struct packet_offload *po); 2158void dev_remove_offload(struct packet_offload *po);
2161 2159
2160int dev_get_iflink(const struct net_device *dev);
2162struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags, 2161struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,
2163 unsigned short mask); 2162 unsigned short mask);
2164struct net_device *dev_get_by_name(struct net *net, const char *name); 2163struct net_device *dev_get_by_name(struct net *net, const char *name);
@@ -2167,9 +2166,14 @@ struct net_device *__dev_get_by_name(struct net *net, const char *name);
2167int dev_alloc_name(struct net_device *dev, const char *name); 2166int dev_alloc_name(struct net_device *dev, const char *name);
2168int dev_open(struct net_device *dev); 2167int dev_open(struct net_device *dev);
2169int dev_close(struct net_device *dev); 2168int dev_close(struct net_device *dev);
2169int dev_close_many(struct list_head *head, bool unlink);
2170void dev_disable_lro(struct net_device *dev); 2170void dev_disable_lro(struct net_device *dev);
2171int dev_loopback_xmit(struct sk_buff *newskb); 2171int dev_loopback_xmit(struct sock *sk, struct sk_buff *newskb);
2172int dev_queue_xmit(struct sk_buff *skb); 2172int dev_queue_xmit_sk(struct sock *sk, struct sk_buff *skb);
2173static inline int dev_queue_xmit(struct sk_buff *skb)
2174{
2175 return dev_queue_xmit_sk(skb->sk, skb);
2176}
2173int dev_queue_xmit_accel(struct sk_buff *skb, void *accel_priv); 2177int dev_queue_xmit_accel(struct sk_buff *skb, void *accel_priv);
2174int register_netdevice(struct net_device *dev); 2178int register_netdevice(struct net_device *dev);
2175void unregister_netdevice_queue(struct net_device *dev, struct list_head *head); 2179void unregister_netdevice_queue(struct net_device *dev, struct list_head *head);
@@ -2409,15 +2413,6 @@ static inline int dev_parse_header(const struct sk_buff *skb,
2409 return dev->header_ops->parse(skb, haddr); 2413 return dev->header_ops->parse(skb, haddr);
2410} 2414}
2411 2415
2412static inline int dev_rebuild_header(struct sk_buff *skb)
2413{
2414 const struct net_device *dev = skb->dev;
2415
2416 if (!dev->header_ops || !dev->header_ops->rebuild)
2417 return 0;
2418 return dev->header_ops->rebuild(skb);
2419}
2420
2421typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len); 2416typedef int gifconf_func_t(struct net_device * dev, char __user * bufptr, int len);
2422int register_gifconf(unsigned int family, gifconf_func_t *gifconf); 2417int register_gifconf(unsigned int family, gifconf_func_t *gifconf);
2423static inline int unregister_gifconf(unsigned int family) 2418static inline int unregister_gifconf(unsigned int family)
@@ -2939,7 +2934,11 @@ static inline void dev_consume_skb_any(struct sk_buff *skb)
2939 2934
2940int netif_rx(struct sk_buff *skb); 2935int netif_rx(struct sk_buff *skb);
2941int netif_rx_ni(struct sk_buff *skb); 2936int netif_rx_ni(struct sk_buff *skb);
2942int netif_receive_skb(struct sk_buff *skb); 2937int netif_receive_skb_sk(struct sock *sk, struct sk_buff *skb);
2938static inline int netif_receive_skb(struct sk_buff *skb)
2939{
2940 return netif_receive_skb_sk(skb->sk, skb);
2941}
2943gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb); 2942gro_result_t napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb);
2944void napi_gro_flush(struct napi_struct *napi, bool flush_old); 2943void napi_gro_flush(struct napi_struct *napi, bool flush_old);
2945struct sk_buff *napi_get_frags(struct napi_struct *napi); 2944struct sk_buff *napi_get_frags(struct napi_struct *napi);
@@ -2975,6 +2974,8 @@ int dev_set_mac_address(struct net_device *, struct sockaddr *);
2975int dev_change_carrier(struct net_device *, bool new_carrier); 2974int dev_change_carrier(struct net_device *, bool new_carrier);
2976int dev_get_phys_port_id(struct net_device *dev, 2975int dev_get_phys_port_id(struct net_device *dev,
2977 struct netdev_phys_item_id *ppid); 2976 struct netdev_phys_item_id *ppid);
2977int dev_get_phys_port_name(struct net_device *dev,
2978 char *name, size_t len);
2978struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev); 2979struct sk_buff *validate_xmit_skb_list(struct sk_buff *skb, struct net_device *dev);
2979struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, 2980struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
2980 struct netdev_queue *txq, int *ret); 2981 struct netdev_queue *txq, int *ret);
@@ -3679,6 +3680,9 @@ void netdev_change_features(struct net_device *dev);
3679void netif_stacked_transfer_operstate(const struct net_device *rootdev, 3680void netif_stacked_transfer_operstate(const struct net_device *rootdev,
3680 struct net_device *dev); 3681 struct net_device *dev);
3681 3682
3683netdev_features_t passthru_features_check(struct sk_buff *skb,
3684 struct net_device *dev,
3685 netdev_features_t features);
3682netdev_features_t netif_skb_features(struct sk_buff *skb); 3686netdev_features_t netif_skb_features(struct sk_buff *skb);
3683 3687
3684static inline bool net_gso_ok(netdev_features_t features, int gso_type) 3688static inline bool net_gso_ok(netdev_features_t features, int gso_type)
@@ -3709,7 +3713,7 @@ static inline bool skb_gso_ok(struct sk_buff *skb, netdev_features_t features)
3709 (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); 3713 (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST));
3710} 3714}
3711 3715
3712static inline bool netif_needs_gso(struct net_device *dev, struct sk_buff *skb, 3716static inline bool netif_needs_gso(struct sk_buff *skb,
3713 netdev_features_t features) 3717 netdev_features_t features)
3714{ 3718{
3715 return skb_is_gso(skb) && (!skb_gso_ok(skb, features) || 3719 return skb_is_gso(skb) && (!skb_gso_ok(skb, features) ||