* [PATCH net-next] net: move ndo_features_check() close to ndo_start_xmit()
@ 2016-01-06 14:53 Eric Dumazet
2016-01-06 21:00 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2016-01-06 14:53 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
TX fast path uses ndo_start_xmit(), ndo_features_check() and
ndo_select_queue().
Move ndo_features_check() close to ndo_start_xmit() to increase
data locality.
All "struct net_device_ops" should now be using C99 initializers.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
include/linux/netdevice.h | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index c20b814e46a0..8d8e5ca951b4 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -812,6 +812,12 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
* (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX)
* Required can not be NULL.
*
+ * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
+ * netdev_features_t features);
+ * Adjusts the requested feature flags according to device-specific
+ * constraints, and returns the resulting flags. Must not modify
+ * the device state.
+ *
* u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
* void *accel_priv, select_queue_fallback_t fallback);
* Called to decide which queue to when device supports multiple
@@ -959,12 +965,6 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
* Called to release previously enslaved netdev.
*
* Feature/offload setting functions.
- * netdev_features_t (*ndo_fix_features)(struct net_device *dev,
- * netdev_features_t features);
- * Adjusts the requested feature flags according to device-specific
- * constraints, and returns the resulting flags. Must not modify
- * the device state.
- *
* int (*ndo_set_features)(struct net_device *dev, netdev_features_t features);
* Called to update device configuration to new features. Passed
* feature set might be less than what was returned by ndo_fix_features()).
@@ -1081,8 +1081,11 @@ struct net_device_ops {
void (*ndo_uninit)(struct net_device *dev);
int (*ndo_open)(struct net_device *dev);
int (*ndo_stop)(struct net_device *dev);
- netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb,
- struct net_device *dev);
+ netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb,
+ struct net_device *dev);
+ netdev_features_t (*ndo_features_check)(struct sk_buff *skb,
+ struct net_device *dev,
+ netdev_features_t features);
u16 (*ndo_select_queue)(struct net_device *dev,
struct sk_buff *skb,
void *accel_priv,
@@ -1245,9 +1248,6 @@ struct net_device_ops {
struct net_device *dev,
void *priv);
int (*ndo_get_lock_subclass)(struct net_device *dev);
- netdev_features_t (*ndo_features_check) (struct sk_buff *skb,
- struct net_device *dev,
- netdev_features_t features);
int (*ndo_set_tx_maxrate)(struct net_device *dev,
int queue_index,
u32 maxrate);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: move ndo_features_check() close to ndo_start_xmit()
2016-01-06 14:53 [PATCH net-next] net: move ndo_features_check() close to ndo_start_xmit() Eric Dumazet
@ 2016-01-06 21:00 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-01-06 21:00 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 06 Jan 2016 06:53:50 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> TX fast path uses ndo_start_xmit(), ndo_features_check() and
> ndo_select_queue().
>
> Move ndo_features_check() close to ndo_start_xmit() to increase
> data locality.
>
> All "struct net_device_ops" should now be using C99 initializers.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Looks good, applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-06 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 14:53 [PATCH net-next] net: move ndo_features_check() close to ndo_start_xmit() Eric Dumazet
2016-01-06 21:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).