aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-02 16:38:27 -0400
commitaecdc33e111b2c447b622e287c6003726daa1426 (patch)
tree3e7657eae4b785e1a1fb5dfb225dbae0b2f0cfc6 /include/linux/netdevice.h
parenta20acf99f75e49271381d65db097c9763060a1e8 (diff)
parenta3a6cab5ea10cca64d036851fe0d932448f2fe4f (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller: 1) GRE now works over ipv6, from Dmitry Kozlov. 2) Make SCTP more network namespace aware, from Eric Biederman. 3) TEAM driver now works with non-ethernet devices, from Jiri Pirko. 4) Make openvswitch network namespace aware, from Pravin B Shelar. 5) IPV6 NAT implementation, from Patrick McHardy. 6) Server side support for TCP Fast Open, from Jerry Chu and others. 7) Packet BPF filter supports MOD and XOR, from Eric Dumazet and Daniel Borkmann. 8) Increate the loopback default MTU to 64K, from Eric Dumazet. 9) Use a per-task rather than per-socket page fragment allocator for outgoing networking traffic. This benefits processes that have very many mostly idle sockets, which is quite common. From Eric Dumazet. 10) Use up to 32K for page fragment allocations, with fallbacks to smaller sizes when higher order page allocations fail. Benefits are a) less segments for driver to process b) less calls to page allocator c) less waste of space. From Eric Dumazet. 11) Allow GRO to be used on GRE tunnels, from Eric Dumazet. 12) VXLAN device driver, one way to handle VLAN issues such as the limitation of 4096 VLAN IDs yet still have some level of isolation. From Stephen Hemminger. 13) As usual there is a large boatload of driver changes, with the scale perhaps tilted towards the wireless side this time around. Fix up various fairly trivial conflicts, mostly caused by the user namespace changes. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1012 commits) hyperv: Add buffer for extended info after the RNDIS response message. hyperv: Report actual status in receive completion packet hyperv: Remove extra allocated space for recv_pkt_list elements hyperv: Fix page buffer handling in rndis_filter_send_request() hyperv: Fix the missing return value in rndis_filter_set_packet_filter() hyperv: Fix the max_xfer_size in RNDIS initialization vxlan: put UDP socket in correct namespace vxlan: Depend on CONFIG_INET sfc: Fix the reported priorities of different filter types sfc: Remove EFX_FILTER_FLAG_RX_OVERRIDE_IP sfc: Fix loopback self-test with separate_tx_channels=1 sfc: Fix MCDI structure field lookup sfc: Add parentheses around use of bitfield macro arguments sfc: Fix null function pointer in efx_sriov_channel_type vxlan: virtual extensible lan igmp: export symbol ip_mc_leave_group netlink: add attributes to fdb interface tg3: unconditionally select HWMON support when tg3 is enabled. Revert "net: ti cpsw ethernet: allow reading phy interface mode from DT" gre: fix sparse warning ...
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h51
1 files changed, 27 insertions, 24 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5f49cc0a107e..01646aa53b0e 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -338,18 +338,16 @@ struct napi_struct {
338 338
339 unsigned long state; 339 unsigned long state;
340 int weight; 340 int weight;
341 unsigned int gro_count;
341 int (*poll)(struct napi_struct *, int); 342 int (*poll)(struct napi_struct *, int);
342#ifdef CONFIG_NETPOLL 343#ifdef CONFIG_NETPOLL
343 spinlock_t poll_lock; 344 spinlock_t poll_lock;
344 int poll_owner; 345 int poll_owner;
345#endif 346#endif
346
347 unsigned int gro_count;
348
349 struct net_device *dev; 347 struct net_device *dev;
350 struct list_head dev_list;
351 struct sk_buff *gro_list; 348 struct sk_buff *gro_list;
352 struct sk_buff *skb; 349 struct sk_buff *skb;
350 struct list_head dev_list;
353}; 351};
354 352
355enum { 353enum {
@@ -906,11 +904,12 @@ struct netdev_fcoe_hbainfo {
906 * feature set might be less than what was returned by ndo_fix_features()). 904 * feature set might be less than what was returned by ndo_fix_features()).
907 * Must return >0 or -errno if it changed dev->features itself. 905 * Must return >0 or -errno if it changed dev->features itself.
908 * 906 *
909 * int (*ndo_fdb_add)(struct ndmsg *ndm, struct net_device *dev, 907 * int (*ndo_fdb_add)(struct ndmsg *ndm, struct nlattr *tb[],
910 * unsigned char *addr, u16 flags) 908 * struct net_device *dev,
909 * const unsigned char *addr, u16 flags)
911 * Adds an FDB entry to dev for addr. 910 * Adds an FDB entry to dev for addr.
912 * int (*ndo_fdb_del)(struct ndmsg *ndm, struct net_device *dev, 911 * int (*ndo_fdb_del)(struct ndmsg *ndm, struct net_device *dev,
913 * unsigned char *addr) 912 * const unsigned char *addr)
914 * Deletes the FDB entry from dev coresponding to addr. 913 * Deletes the FDB entry from dev coresponding to addr.
915 * int (*ndo_fdb_dump)(struct sk_buff *skb, struct netlink_callback *cb, 914 * int (*ndo_fdb_dump)(struct sk_buff *skb, struct netlink_callback *cb,
916 * struct net_device *dev, int idx) 915 * struct net_device *dev, int idx)
@@ -1016,12 +1015,13 @@ struct net_device_ops {
1016 void (*ndo_neigh_destroy)(struct neighbour *n); 1015 void (*ndo_neigh_destroy)(struct neighbour *n);
1017 1016
1018 int (*ndo_fdb_add)(struct ndmsg *ndm, 1017 int (*ndo_fdb_add)(struct ndmsg *ndm,
1018 struct nlattr *tb[],
1019 struct net_device *dev, 1019 struct net_device *dev,
1020 unsigned char *addr, 1020 const unsigned char *addr,
1021 u16 flags); 1021 u16 flags);
1022 int (*ndo_fdb_del)(struct ndmsg *ndm, 1022 int (*ndo_fdb_del)(struct ndmsg *ndm,
1023 struct net_device *dev, 1023 struct net_device *dev,
1024 unsigned char *addr); 1024 const unsigned char *addr);
1025 int (*ndo_fdb_dump)(struct sk_buff *skb, 1025 int (*ndo_fdb_dump)(struct sk_buff *skb,
1026 struct netlink_callback *cb, 1026 struct netlink_callback *cb,
1027 struct net_device *dev, 1027 struct net_device *dev,
@@ -1322,6 +1322,8 @@ struct net_device {
1322 /* phy device may attach itself for hardware timestamping */ 1322 /* phy device may attach itself for hardware timestamping */
1323 struct phy_device *phydev; 1323 struct phy_device *phydev;
1324 1324
1325 struct lock_class_key *qdisc_tx_busylock;
1326
1325 /* group the device belongs to */ 1327 /* group the device belongs to */
1326 int group; 1328 int group;
1327 1329
@@ -1401,6 +1403,9 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev,
1401 f(dev, &dev->_tx[i], arg); 1403 f(dev, &dev->_tx[i], arg);
1402} 1404}
1403 1405
1406extern struct netdev_queue *netdev_pick_tx(struct net_device *dev,
1407 struct sk_buff *skb);
1408
1404/* 1409/*
1405 * Net namespace inlines 1410 * Net namespace inlines
1406 */ 1411 */
@@ -1553,7 +1558,7 @@ struct packet_type {
1553#define NETDEV_PRE_TYPE_CHANGE 0x000E 1558#define NETDEV_PRE_TYPE_CHANGE 0x000E
1554#define NETDEV_POST_TYPE_CHANGE 0x000F 1559#define NETDEV_POST_TYPE_CHANGE 0x000F
1555#define NETDEV_POST_INIT 0x0010 1560#define NETDEV_POST_INIT 0x0010
1556#define NETDEV_UNREGISTER_BATCH 0x0011 1561#define NETDEV_UNREGISTER_FINAL 0x0011
1557#define NETDEV_RELEASE 0x0012 1562#define NETDEV_RELEASE 0x0012
1558#define NETDEV_NOTIFY_PEERS 0x0013 1563#define NETDEV_NOTIFY_PEERS 0x0013
1559#define NETDEV_JOIN 0x0014 1564#define NETDEV_JOIN 0x0014
@@ -2227,6 +2232,7 @@ static inline void dev_hold(struct net_device *dev)
2227 * kind of lower layer not just hardware media. 2232 * kind of lower layer not just hardware media.
2228 */ 2233 */
2229 2234
2235extern void linkwatch_init_dev(struct net_device *dev);
2230extern void linkwatch_fire_event(struct net_device *dev); 2236extern void linkwatch_fire_event(struct net_device *dev);
2231extern void linkwatch_forget_dev(struct net_device *dev); 2237extern void linkwatch_forget_dev(struct net_device *dev);
2232 2238
@@ -2249,8 +2255,6 @@ extern void netif_carrier_on(struct net_device *dev);
2249 2255
2250extern void netif_carrier_off(struct net_device *dev); 2256extern void netif_carrier_off(struct net_device *dev);
2251 2257
2252extern void netif_notify_peers(struct net_device *dev);
2253
2254/** 2258/**
2255 * netif_dormant_on - mark device as dormant. 2259 * netif_dormant_on - mark device as dormant.
2256 * @dev: network device 2260 * @dev: network device
@@ -2560,9 +2564,9 @@ extern void __hw_addr_flush(struct netdev_hw_addr_list *list);
2560extern void __hw_addr_init(struct netdev_hw_addr_list *list); 2564extern void __hw_addr_init(struct netdev_hw_addr_list *list);
2561 2565
2562/* Functions used for device addresses handling */ 2566/* Functions used for device addresses handling */
2563extern int dev_addr_add(struct net_device *dev, unsigned char *addr, 2567extern int dev_addr_add(struct net_device *dev, const unsigned char *addr,
2564 unsigned char addr_type); 2568 unsigned char addr_type);
2565extern int dev_addr_del(struct net_device *dev, unsigned char *addr, 2569extern int dev_addr_del(struct net_device *dev, const unsigned char *addr,
2566 unsigned char addr_type); 2570 unsigned char addr_type);
2567extern int dev_addr_add_multiple(struct net_device *to_dev, 2571extern int dev_addr_add_multiple(struct net_device *to_dev,
2568 struct net_device *from_dev, 2572 struct net_device *from_dev,
@@ -2574,20 +2578,20 @@ extern void dev_addr_flush(struct net_device *dev);
2574extern int dev_addr_init(struct net_device *dev); 2578extern int dev_addr_init(struct net_device *dev);
2575 2579
2576/* Functions used for unicast addresses handling */ 2580/* Functions used for unicast addresses handling */
2577extern int dev_uc_add(struct net_device *dev, unsigned char *addr); 2581extern int dev_uc_add(struct net_device *dev, const unsigned char *addr);
2578extern int dev_uc_add_excl(struct net_device *dev, unsigned char *addr); 2582extern int dev_uc_add_excl(struct net_device *dev, const unsigned char *addr);
2579extern int dev_uc_del(struct net_device *dev, unsigned char *addr); 2583extern int dev_uc_del(struct net_device *dev, const unsigned char *addr);
2580extern int dev_uc_sync(struct net_device *to, struct net_device *from); 2584extern int dev_uc_sync(struct net_device *to, struct net_device *from);
2581extern void dev_uc_unsync(struct net_device *to, struct net_device *from); 2585extern void dev_uc_unsync(struct net_device *to, struct net_device *from);
2582extern void dev_uc_flush(struct net_device *dev); 2586extern void dev_uc_flush(struct net_device *dev);
2583extern void dev_uc_init(struct net_device *dev); 2587extern void dev_uc_init(struct net_device *dev);
2584 2588
2585/* Functions used for multicast addresses handling */ 2589/* Functions used for multicast addresses handling */
2586extern int dev_mc_add(struct net_device *dev, unsigned char *addr); 2590extern int dev_mc_add(struct net_device *dev, const unsigned char *addr);
2587extern int dev_mc_add_global(struct net_device *dev, unsigned char *addr); 2591extern int dev_mc_add_global(struct net_device *dev, const unsigned char *addr);
2588extern int dev_mc_add_excl(struct net_device *dev, unsigned char *addr); 2592extern int dev_mc_add_excl(struct net_device *dev, const unsigned char *addr);
2589extern int dev_mc_del(struct net_device *dev, unsigned char *addr); 2593extern int dev_mc_del(struct net_device *dev, const unsigned char *addr);
2590extern int dev_mc_del_global(struct net_device *dev, unsigned char *addr); 2594extern int dev_mc_del_global(struct net_device *dev, const unsigned char *addr);
2591extern int dev_mc_sync(struct net_device *to, struct net_device *from); 2595extern int dev_mc_sync(struct net_device *to, struct net_device *from);
2592extern void dev_mc_unsync(struct net_device *to, struct net_device *from); 2596extern void dev_mc_unsync(struct net_device *to, struct net_device *from);
2593extern void dev_mc_flush(struct net_device *dev); 2597extern void dev_mc_flush(struct net_device *dev);
@@ -2599,8 +2603,7 @@ extern void __dev_set_rx_mode(struct net_device *dev);
2599extern int dev_set_promiscuity(struct net_device *dev, int inc); 2603extern int dev_set_promiscuity(struct net_device *dev, int inc);
2600extern int dev_set_allmulti(struct net_device *dev, int inc); 2604extern int dev_set_allmulti(struct net_device *dev, int inc);
2601extern void netdev_state_change(struct net_device *dev); 2605extern void netdev_state_change(struct net_device *dev);
2602extern int netdev_bonding_change(struct net_device *dev, 2606extern void netdev_notify_peers(struct net_device *dev);
2603 unsigned long event);
2604extern void netdev_features_change(struct net_device *dev); 2607extern void netdev_features_change(struct net_device *dev);
2605/* Load a device via the kmod */ 2608/* Load a device via the kmod */
2606extern void dev_load(struct net *net, const char *name); 2609extern void dev_load(struct net *net, const char *name);