diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-11 05:55:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-03-11 05:55:49 -0400 |
commit | c897df0e2dbc81bcc09c11425658d69830825364 (patch) | |
tree | 04c268e4951f2b75acb6873307673e45d05a635e /include/linux/netdevice.h | |
parent | 1e9c4d49020996a645a535cbb8f1ff78b9b120f3 (diff) | |
parent | 0414855fdc4a40da05221fc6062cccbc0c30f169 (diff) |
Merge tag 'v3.14-rc5' into patchwork
Linux 3.14-rc5
* tag 'v3.14-rc5': (1117 commits)
Linux 3.14-rc5
drm/vmwgfx: avoid null pointer dereference at failure paths
drm/vmwgfx: Make sure backing mobs are cleared when allocated. Update driver date.
drm/vmwgfx: Remove some unused surface formats
MAINTAINERS: add maintainer entry for Armada DRM driver
arm64: Fix !CONFIG_SMP kernel build
arm64: mm: Add double logical invert to pte accessors
dm cache: fix truncation bug when mapping I/O to >2TB fast device
perf tools: Fix strict alias issue for find_first_bit
powerpc/powernv: Fix indirect XSCOM unmangling
powerpc/powernv: Fix opal_xscom_{read,write} prototype
powerpc/powernv: Refactor PHB diag-data dump
powerpc/powernv: Dump PHB diag-data immediately
powerpc: Increase stack redzone for 64-bit userspace to 512 bytes
powerpc/ftrace: bugfix for test_24bit_addr
powerpc/crashdump : Fix page frame number check in copy_oldmem_page
powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
kvm, vmx: Really fix lazy FPU on nested guest
perf tools: fix BFD detection on opensuse
drm/radeon: enable speaker allocation setup on dce3.2
...
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 440a02ee6f92..e8eeebd49a98 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -752,6 +752,9 @@ struct netdev_phys_port_id { | |||
752 | unsigned char id_len; | 752 | unsigned char id_len; |
753 | }; | 753 | }; |
754 | 754 | ||
755 | typedef u16 (*select_queue_fallback_t)(struct net_device *dev, | ||
756 | struct sk_buff *skb); | ||
757 | |||
755 | /* | 758 | /* |
756 | * This structure defines the management hooks for network devices. | 759 | * This structure defines the management hooks for network devices. |
757 | * The following hooks can be defined; unless noted otherwise, they are | 760 | * The following hooks can be defined; unless noted otherwise, they are |
@@ -783,7 +786,7 @@ struct netdev_phys_port_id { | |||
783 | * Required can not be NULL. | 786 | * Required can not be NULL. |
784 | * | 787 | * |
785 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb, | 788 | * u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb, |
786 | * void *accel_priv); | 789 | * void *accel_priv, select_queue_fallback_t fallback); |
787 | * Called to decide which queue to when device supports multiple | 790 | * Called to decide which queue to when device supports multiple |
788 | * transmit queues. | 791 | * transmit queues. |
789 | * | 792 | * |
@@ -1005,7 +1008,8 @@ struct net_device_ops { | |||
1005 | struct net_device *dev); | 1008 | struct net_device *dev); |
1006 | u16 (*ndo_select_queue)(struct net_device *dev, | 1009 | u16 (*ndo_select_queue)(struct net_device *dev, |
1007 | struct sk_buff *skb, | 1010 | struct sk_buff *skb, |
1008 | void *accel_priv); | 1011 | void *accel_priv, |
1012 | select_queue_fallback_t fallback); | ||
1009 | void (*ndo_change_rx_flags)(struct net_device *dev, | 1013 | void (*ndo_change_rx_flags)(struct net_device *dev, |
1010 | int flags); | 1014 | int flags); |
1011 | void (*ndo_set_rx_mode)(struct net_device *dev); | 1015 | void (*ndo_set_rx_mode)(struct net_device *dev); |
@@ -1551,7 +1555,6 @@ static inline void netdev_for_each_tx_queue(struct net_device *dev, | |||
1551 | struct netdev_queue *netdev_pick_tx(struct net_device *dev, | 1555 | struct netdev_queue *netdev_pick_tx(struct net_device *dev, |
1552 | struct sk_buff *skb, | 1556 | struct sk_buff *skb, |
1553 | void *accel_priv); | 1557 | void *accel_priv); |
1554 | u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb); | ||
1555 | 1558 | ||
1556 | /* | 1559 | /* |
1557 | * Net namespace inlines | 1560 | * Net namespace inlines |
@@ -2276,6 +2279,26 @@ static inline void netdev_reset_queue(struct net_device *dev_queue) | |||
2276 | } | 2279 | } |
2277 | 2280 | ||
2278 | /** | 2281 | /** |
2282 | * netdev_cap_txqueue - check if selected tx queue exceeds device queues | ||
2283 | * @dev: network device | ||
2284 | * @queue_index: given tx queue index | ||
2285 | * | ||
2286 | * Returns 0 if given tx queue index >= number of device tx queues, | ||
2287 | * otherwise returns the originally passed tx queue index. | ||
2288 | */ | ||
2289 | static inline u16 netdev_cap_txqueue(struct net_device *dev, u16 queue_index) | ||
2290 | { | ||
2291 | if (unlikely(queue_index >= dev->real_num_tx_queues)) { | ||
2292 | net_warn_ratelimited("%s selects TX queue %d, but real number of TX queues is %d\n", | ||
2293 | dev->name, queue_index, | ||
2294 | dev->real_num_tx_queues); | ||
2295 | return 0; | ||
2296 | } | ||
2297 | |||
2298 | return queue_index; | ||
2299 | } | ||
2300 | |||
2301 | /** | ||
2279 | * netif_running - test if up | 2302 | * netif_running - test if up |
2280 | * @dev: network device | 2303 | * @dev: network device |
2281 | * | 2304 | * |
@@ -3068,7 +3091,12 @@ void netdev_change_features(struct net_device *dev); | |||
3068 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 3091 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
3069 | struct net_device *dev); | 3092 | struct net_device *dev); |
3070 | 3093 | ||
3071 | netdev_features_t netif_skb_features(struct sk_buff *skb); | 3094 | netdev_features_t netif_skb_dev_features(struct sk_buff *skb, |
3095 | const struct net_device *dev); | ||
3096 | static inline netdev_features_t netif_skb_features(struct sk_buff *skb) | ||
3097 | { | ||
3098 | return netif_skb_dev_features(skb, skb->dev); | ||
3099 | } | ||
3072 | 3100 | ||
3073 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) | 3101 | static inline bool net_gso_ok(netdev_features_t features, int gso_type) |
3074 | { | 3102 | { |