Skip to content

Commit

Permalink
netdev_features: remove NETIF_F_ALL_FCOE
Browse files Browse the repository at this point in the history
NETIF_F_ALL_FCOE is used only in vlan_dev.c, 2 times. Now that it's only
2 bits, open-code it and remove the definition from netdev_features.h.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Alexander Lobakin authored and Paolo Abeni committed Sep 3, 2024
1 parent 782dbbf commit a61fec1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions include/linux/netdev_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start)
#define NETIF_F_ALL_TSO (NETIF_F_TSO | NETIF_F_TSO6 | \
NETIF_F_TSO_ECN | NETIF_F_TSO_MANGLEID)

#define NETIF_F_ALL_FCOE (NETIF_F_FCOE_CRC | NETIF_F_FSO)

/* List of features with software fallbacks. */
#define NETIF_F_GSO_SOFTWARE (NETIF_F_ALL_TSO | NETIF_F_GSO_SCTP | \
NETIF_F_GSO_UDP_L4 | NETIF_F_GSO_FRAGLIST)
Expand Down
5 changes: 3 additions & 2 deletions net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ static int vlan_dev_init(struct net_device *dev)
NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE |
NETIF_F_GSO_ENCAP_ALL |
NETIF_F_HIGHDMA | NETIF_F_SCTP_CRC |
NETIF_F_ALL_FCOE;
NETIF_F_FCOE_CRC | NETIF_F_FSO;

if (real_dev->vlan_features & NETIF_F_HW_MACSEC)
dev->hw_features |= NETIF_F_HW_MACSEC;
Expand All @@ -576,7 +576,8 @@ static int vlan_dev_init(struct net_device *dev)
if (dev->features & NETIF_F_VLAN_FEATURES)
netdev_warn(real_dev, "VLAN features are set incorrectly. Q-in-Q configurations may not work correctly.\n");

dev->vlan_features = real_dev->vlan_features & ~NETIF_F_ALL_FCOE;
dev->vlan_features = real_dev->vlan_features &
~(NETIF_F_FCOE_CRC | NETIF_F_FSO);
dev->hw_enc_features = vlan_tnl_features(real_dev);
dev->mpls_features = real_dev->mpls_features;

Expand Down

0 comments on commit a61fec1

Please sign in to comment.