Skip to content

Commit cdba756

Browse files
Eric Dumazetdavem330
authored andcommitted
net: move ndo_features_check() close to ndo_start_xmit()
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9e02d8c commit cdba756

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

include/linux/netdevice.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,12 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
812812
* (can also return NETDEV_TX_LOCKED iff NETIF_F_LLTX)
813813
* Required can not be NULL.
814814
*
815+
* netdev_features_t (*ndo_fix_features)(struct net_device *dev,
816+
* netdev_features_t features);
817+
* Adjusts the requested feature flags according to device-specific
818+
* constraints, and returns the resulting flags. Must not modify
819+
* the device state.
820+
*
815821
* u16 (*ndo_select_queue)(struct net_device *dev, struct sk_buff *skb,
816822
* void *accel_priv, select_queue_fallback_t fallback);
817823
* Called to decide which queue to when device supports multiple
@@ -959,12 +965,6 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
959965
* Called to release previously enslaved netdev.
960966
*
961967
* Feature/offload setting functions.
962-
* netdev_features_t (*ndo_fix_features)(struct net_device *dev,
963-
* netdev_features_t features);
964-
* Adjusts the requested feature flags according to device-specific
965-
* constraints, and returns the resulting flags. Must not modify
966-
* the device state.
967-
*
968968
* int (*ndo_set_features)(struct net_device *dev, netdev_features_t features);
969969
* Called to update device configuration to new features. Passed
970970
* feature set might be less than what was returned by ndo_fix_features()).
@@ -1081,8 +1081,11 @@ struct net_device_ops {
10811081
void (*ndo_uninit)(struct net_device *dev);
10821082
int (*ndo_open)(struct net_device *dev);
10831083
int (*ndo_stop)(struct net_device *dev);
1084-
netdev_tx_t (*ndo_start_xmit) (struct sk_buff *skb,
1085-
struct net_device *dev);
1084+
netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb,
1085+
struct net_device *dev);
1086+
netdev_features_t (*ndo_features_check)(struct sk_buff *skb,
1087+
struct net_device *dev,
1088+
netdev_features_t features);
10861089
u16 (*ndo_select_queue)(struct net_device *dev,
10871090
struct sk_buff *skb,
10881091
void *accel_priv,
@@ -1245,9 +1248,6 @@ struct net_device_ops {
12451248
struct net_device *dev,
12461249
void *priv);
12471250
int (*ndo_get_lock_subclass)(struct net_device *dev);
1248-
netdev_features_t (*ndo_features_check) (struct sk_buff *skb,
1249-
struct net_device *dev,
1250-
netdev_features_t features);
12511251
int (*ndo_set_tx_maxrate)(struct net_device *dev,
12521252
int queue_index,
12531253
u32 maxrate);

0 commit comments

Comments
 (0)