mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
netdev_features: convert NETIF_F_LLTX to dev->lltx
NETIF_F_LLTX can't be changed via Ethtool and is not a feature, rather an attribute, very similar to IFF_NO_QUEUE (and hot). Free one netdev_features_t bit and make it a "hot" private flag. Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
beb5a9bea8
commit
00d066a4d4
@@ -1720,6 +1720,9 @@ enum netdev_reg_state {
|
||||
*
|
||||
* @priv_flags: flags invisible to userspace defined as bits, see
|
||||
* enum netdev_priv_flags for the definitions
|
||||
* @lltx: device supports lockless Tx. Deprecated for real HW
|
||||
* drivers. Mainly used by logical interfaces, such as
|
||||
* bonding and tunnels
|
||||
*
|
||||
* @name: This is the first field of the "visible" part of this structure
|
||||
* (i.e. as seen by users in the "Space.c" file). It is the name
|
||||
@@ -2018,6 +2021,7 @@ struct net_device {
|
||||
__cacheline_group_begin(net_device_read_tx);
|
||||
struct_group(priv_flags_fast,
|
||||
unsigned long priv_flags:32;
|
||||
unsigned long lltx:1;
|
||||
);
|
||||
const struct net_device_ops *netdev_ops;
|
||||
const struct header_ops *header_ops;
|
||||
@@ -4433,7 +4437,7 @@ static inline void netif_tx_unlock_bh(struct net_device *dev)
|
||||
}
|
||||
|
||||
#define HARD_TX_LOCK(dev, txq, cpu) { \
|
||||
if ((dev->features & NETIF_F_LLTX) == 0) { \
|
||||
if (!(dev)->lltx) { \
|
||||
__netif_tx_lock(txq, cpu); \
|
||||
} else { \
|
||||
__netif_tx_acquire(txq); \
|
||||
@@ -4441,12 +4445,12 @@ static inline void netif_tx_unlock_bh(struct net_device *dev)
|
||||
}
|
||||
|
||||
#define HARD_TX_TRYLOCK(dev, txq) \
|
||||
(((dev->features & NETIF_F_LLTX) == 0) ? \
|
||||
(!(dev)->lltx ? \
|
||||
__netif_tx_trylock(txq) : \
|
||||
__netif_tx_acquire(txq))
|
||||
|
||||
#define HARD_TX_UNLOCK(dev, txq) { \
|
||||
if ((dev->features & NETIF_F_LLTX) == 0) { \
|
||||
if (!(dev)->lltx) { \
|
||||
__netif_tx_unlock(txq); \
|
||||
} else { \
|
||||
__netif_tx_release(txq); \
|
||||
|
||||
Reference in New Issue
Block a user