diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/if_link.h | 33 | ||||
-rw-r--r-- | include/linux/netdevice.h | 36 | ||||
-rw-r--r-- | include/linux/notifier.h | 4 | ||||
-rw-r--r-- | include/linux/phy.h | 12 | ||||
-rw-r--r-- | include/linux/skbuff.h | 3 |
5 files changed, 79 insertions, 9 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index c9bf92cd7653..cfd420ba72df 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -37,6 +37,38 @@ struct rtnl_link_stats { | |||
37 | __u32 tx_compressed; | 37 | __u32 tx_compressed; |
38 | }; | 38 | }; |
39 | 39 | ||
40 | struct rtnl_link_stats64 { | ||
41 | __u64 rx_packets; /* total packets received */ | ||
42 | __u64 tx_packets; /* total packets transmitted */ | ||
43 | __u64 rx_bytes; /* total bytes received */ | ||
44 | __u64 tx_bytes; /* total bytes transmitted */ | ||
45 | __u64 rx_errors; /* bad packets received */ | ||
46 | __u64 tx_errors; /* packet transmit problems */ | ||
47 | __u64 rx_dropped; /* no space in linux buffers */ | ||
48 | __u64 tx_dropped; /* no space available in linux */ | ||
49 | __u64 multicast; /* multicast packets received */ | ||
50 | __u64 collisions; | ||
51 | |||
52 | /* detailed rx_errors: */ | ||
53 | __u64 rx_length_errors; | ||
54 | __u64 rx_over_errors; /* receiver ring buff overflow */ | ||
55 | __u64 rx_crc_errors; /* recved pkt with crc error */ | ||
56 | __u64 rx_frame_errors; /* recv'd frame alignment error */ | ||
57 | __u64 rx_fifo_errors; /* recv'r fifo overrun */ | ||
58 | __u64 rx_missed_errors; /* receiver missed packet */ | ||
59 | |||
60 | /* detailed tx_errors */ | ||
61 | __u64 tx_aborted_errors; | ||
62 | __u64 tx_carrier_errors; | ||
63 | __u64 tx_fifo_errors; | ||
64 | __u64 tx_heartbeat_errors; | ||
65 | __u64 tx_window_errors; | ||
66 | |||
67 | /* for cslip etc */ | ||
68 | __u64 rx_compressed; | ||
69 | __u64 tx_compressed; | ||
70 | }; | ||
71 | |||
40 | /* The struct should be in sync with struct ifmap */ | 72 | /* The struct should be in sync with struct ifmap */ |
41 | struct rtnl_link_ifmap { | 73 | struct rtnl_link_ifmap { |
42 | __u64 mem_start; | 74 | __u64 mem_start; |
@@ -83,6 +115,7 @@ enum { | |||
83 | IFLA_VF_VLAN, | 115 | IFLA_VF_VLAN, |
84 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ | 116 | IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ |
85 | IFLA_VFINFO, | 117 | IFLA_VFINFO, |
118 | IFLA_STATS64, | ||
86 | __IFLA_MAX | 119 | __IFLA_MAX |
87 | }; | 120 | }; |
88 | 121 | ||
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index fa8b47637997..9fc6ee8e7508 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -223,6 +223,7 @@ struct netif_rx_stats { | |||
223 | unsigned dropped; | 223 | unsigned dropped; |
224 | unsigned time_squeeze; | 224 | unsigned time_squeeze; |
225 | unsigned cpu_collision; | 225 | unsigned cpu_collision; |
226 | unsigned received_rps; | ||
226 | }; | 227 | }; |
227 | 228 | ||
228 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 229 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
@@ -530,6 +531,24 @@ struct netdev_queue { | |||
530 | unsigned long tx_dropped; | 531 | unsigned long tx_dropped; |
531 | } ____cacheline_aligned_in_smp; | 532 | } ____cacheline_aligned_in_smp; |
532 | 533 | ||
534 | /* | ||
535 | * This structure holds an RPS map which can be of variable length. The | ||
536 | * map is an array of CPUs. | ||
537 | */ | ||
538 | struct rps_map { | ||
539 | unsigned int len; | ||
540 | struct rcu_head rcu; | ||
541 | u16 cpus[0]; | ||
542 | }; | ||
543 | #define RPS_MAP_SIZE(_num) (sizeof(struct rps_map) + (_num * sizeof(u16))) | ||
544 | |||
545 | /* This structure contains an instance of an RX queue. */ | ||
546 | struct netdev_rx_queue { | ||
547 | struct rps_map *rps_map; | ||
548 | struct kobject kobj; | ||
549 | struct netdev_rx_queue *first; | ||
550 | atomic_t count; | ||
551 | } ____cacheline_aligned_in_smp; | ||
533 | 552 | ||
534 | /* | 553 | /* |
535 | * This structure defines the management hooks for network devices. | 554 | * This structure defines the management hooks for network devices. |
@@ -878,6 +897,13 @@ struct net_device { | |||
878 | 897 | ||
879 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ | 898 | unsigned char broadcast[MAX_ADDR_LEN]; /* hw bcast add */ |
880 | 899 | ||
900 | struct kset *queues_kset; | ||
901 | |||
902 | struct netdev_rx_queue *_rx; | ||
903 | |||
904 | /* Number of RX queues allocated at alloc_netdev_mq() time */ | ||
905 | unsigned int num_rx_queues; | ||
906 | |||
881 | struct netdev_queue rx_queue; | 907 | struct netdev_queue rx_queue; |
882 | 908 | ||
883 | struct netdev_queue *_tx ____cacheline_aligned_in_smp; | 909 | struct netdev_queue *_tx ____cacheline_aligned_in_smp; |
@@ -1311,14 +1337,18 @@ static inline int unregister_gifconf(unsigned int family) | |||
1311 | */ | 1337 | */ |
1312 | struct softnet_data { | 1338 | struct softnet_data { |
1313 | struct Qdisc *output_queue; | 1339 | struct Qdisc *output_queue; |
1314 | struct sk_buff_head input_pkt_queue; | ||
1315 | struct list_head poll_list; | 1340 | struct list_head poll_list; |
1316 | struct sk_buff *completion_queue; | 1341 | struct sk_buff *completion_queue; |
1317 | 1342 | ||
1343 | /* Elements below can be accessed between CPUs for RPS */ | ||
1344 | #ifdef CONFIG_SMP | ||
1345 | struct call_single_data csd ____cacheline_aligned_in_smp; | ||
1346 | #endif | ||
1347 | struct sk_buff_head input_pkt_queue; | ||
1318 | struct napi_struct backlog; | 1348 | struct napi_struct backlog; |
1319 | }; | 1349 | }; |
1320 | 1350 | ||
1321 | DECLARE_PER_CPU(struct softnet_data,softnet_data); | 1351 | DECLARE_PER_CPU_ALIGNED(struct softnet_data, softnet_data); |
1322 | 1352 | ||
1323 | #define HAVE_NETIF_QUEUE | 1353 | #define HAVE_NETIF_QUEUE |
1324 | 1354 | ||
@@ -1975,7 +2005,7 @@ extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct | |||
1975 | extern int dev_set_promiscuity(struct net_device *dev, int inc); | 2005 | extern int dev_set_promiscuity(struct net_device *dev, int inc); |
1976 | extern int dev_set_allmulti(struct net_device *dev, int inc); | 2006 | extern int dev_set_allmulti(struct net_device *dev, int inc); |
1977 | extern void netdev_state_change(struct net_device *dev); | 2007 | extern void netdev_state_change(struct net_device *dev); |
1978 | extern void netdev_bonding_change(struct net_device *dev, | 2008 | extern int netdev_bonding_change(struct net_device *dev, |
1979 | unsigned long event); | 2009 | unsigned long event); |
1980 | extern void netdev_features_change(struct net_device *dev); | 2010 | extern void netdev_features_change(struct net_device *dev); |
1981 | /* Load a device via the kmod */ | 2011 | /* Load a device via the kmod */ |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index fee6c2f68075..f3635fc6e942 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -199,8 +199,8 @@ static inline int notifier_to_errno(int ret) | |||
199 | #define NETDEV_FEAT_CHANGE 0x000B | 199 | #define NETDEV_FEAT_CHANGE 0x000B |
200 | #define NETDEV_BONDING_FAILOVER 0x000C | 200 | #define NETDEV_BONDING_FAILOVER 0x000C |
201 | #define NETDEV_PRE_UP 0x000D | 201 | #define NETDEV_PRE_UP 0x000D |
202 | #define NETDEV_BONDING_OLDTYPE 0x000E | 202 | #define NETDEV_PRE_TYPE_CHANGE 0x000E |
203 | #define NETDEV_BONDING_NEWTYPE 0x000F | 203 | #define NETDEV_POST_TYPE_CHANGE 0x000F |
204 | #define NETDEV_POST_INIT 0x0010 | 204 | #define NETDEV_POST_INIT 0x0010 |
205 | #define NETDEV_UNREGISTER_BATCH 0x0011 | 205 | #define NETDEV_UNREGISTER_BATCH 0x0011 |
206 | 206 | ||
diff --git a/include/linux/phy.h b/include/linux/phy.h index 14d7fdf6a90a..d9bce4b526b4 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -81,6 +81,10 @@ typedef enum { | |||
81 | */ | 81 | */ |
82 | #define MII_BUS_ID_SIZE (20 - 3) | 82 | #define MII_BUS_ID_SIZE (20 - 3) |
83 | 83 | ||
84 | /* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit | ||
85 | IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */ | ||
86 | #define MII_ADDR_C45 (1<<30) | ||
87 | |||
84 | /* | 88 | /* |
85 | * The Bus class for PHYs. Devices which provide access to | 89 | * The Bus class for PHYs. Devices which provide access to |
86 | * PHYs should register using this structure | 90 | * PHYs should register using this structure |
@@ -127,8 +131,8 @@ int mdiobus_register(struct mii_bus *bus); | |||
127 | void mdiobus_unregister(struct mii_bus *bus); | 131 | void mdiobus_unregister(struct mii_bus *bus); |
128 | void mdiobus_free(struct mii_bus *bus); | 132 | void mdiobus_free(struct mii_bus *bus); |
129 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); | 133 | struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); |
130 | int mdiobus_read(struct mii_bus *bus, int addr, u16 regnum); | 134 | int mdiobus_read(struct mii_bus *bus, int addr, u32 regnum); |
131 | int mdiobus_write(struct mii_bus *bus, int addr, u16 regnum, u16 val); | 135 | int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val); |
132 | 136 | ||
133 | 137 | ||
134 | #define PHY_INTERRUPT_DISABLED 0x0 | 138 | #define PHY_INTERRUPT_DISABLED 0x0 |
@@ -422,7 +426,7 @@ struct phy_fixup { | |||
422 | * because the bus read/write functions may wait for an interrupt | 426 | * because the bus read/write functions may wait for an interrupt |
423 | * to conclude the operation. | 427 | * to conclude the operation. |
424 | */ | 428 | */ |
425 | static inline int phy_read(struct phy_device *phydev, u16 regnum) | 429 | static inline int phy_read(struct phy_device *phydev, u32 regnum) |
426 | { | 430 | { |
427 | return mdiobus_read(phydev->bus, phydev->addr, regnum); | 431 | return mdiobus_read(phydev->bus, phydev->addr, regnum); |
428 | } | 432 | } |
@@ -437,7 +441,7 @@ static inline int phy_read(struct phy_device *phydev, u16 regnum) | |||
437 | * because the bus read/write functions may wait for an interrupt | 441 | * because the bus read/write functions may wait for an interrupt |
438 | * to conclude the operation. | 442 | * to conclude the operation. |
439 | */ | 443 | */ |
440 | static inline int phy_write(struct phy_device *phydev, u16 regnum, u16 val) | 444 | static inline int phy_write(struct phy_device *phydev, u32 regnum, u16 val) |
441 | { | 445 | { |
442 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); | 446 | return mdiobus_write(phydev->bus, phydev->addr, regnum, val); |
443 | } | 447 | } |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 03f816a9b659..def10b064f29 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -300,6 +300,7 @@ typedef unsigned char *sk_buff_data_t; | |||
300 | * @nfct_reasm: netfilter conntrack re-assembly pointer | 300 | * @nfct_reasm: netfilter conntrack re-assembly pointer |
301 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c | 301 | * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c |
302 | * @skb_iif: ifindex of device we arrived on | 302 | * @skb_iif: ifindex of device we arrived on |
303 | * @rxhash: the packet hash computed on receive | ||
303 | * @queue_mapping: Queue mapping for multiqueue devices | 304 | * @queue_mapping: Queue mapping for multiqueue devices |
304 | * @tc_index: Traffic control index | 305 | * @tc_index: Traffic control index |
305 | * @tc_verd: traffic control verdict | 306 | * @tc_verd: traffic control verdict |
@@ -375,6 +376,8 @@ struct sk_buff { | |||
375 | #endif | 376 | #endif |
376 | #endif | 377 | #endif |
377 | 378 | ||
379 | __u32 rxhash; | ||
380 | |||
378 | kmemcheck_bitfield_begin(flags2); | 381 | kmemcheck_bitfield_begin(flags2); |
379 | __u16 queue_mapping:16; | 382 | __u16 queue_mapping:16; |
380 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 383 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |