From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>
Cc: Steffen Klassert <steffen.klassert@secunet.com>,
Willem de Bruijn <willemb@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
<netdev@vger.kernel.org>
Subject: [PATCH net-next 2/4] net: Add a netdev software feature set that defaults to off.
Date: Wed, 18 Dec 2019 14:34:56 +0100 [thread overview]
Message-ID: <20191218133458.14533-3-steffen.klassert@secunet.com> (raw)
In-Reply-To: <20191218133458.14533-1-steffen.klassert@secunet.com>
The previous patch added the NETIF_F_GRO_FRAGLIST feature.
This is a software feature that should default to off.
Current software features default to on, so add a new
feature set that defaults to off.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
include/linux/netdev_features.h | 3 +++
net/core/dev.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index b239507da2a0..34d050bb1ae6 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -230,6 +230,9 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start)
/* changeable features with no special hardware requirements */
#define NETIF_F_SOFT_FEATURES (NETIF_F_GSO | NETIF_F_GRO)
+/* Changeable features with no special hardware requirements that defaults to off. */
+#define NETIF_F_SOFT_FEATURES_OFF NETIF_F_GRO_FRAGLIST
+
#define NETIF_F_VLAN_FEATURES (NETIF_F_HW_VLAN_CTAG_FILTER | \
NETIF_F_HW_VLAN_CTAG_RX | \
NETIF_F_HW_VLAN_CTAG_TX | \
diff --git a/net/core/dev.c b/net/core/dev.c
index 2c277b8aba38..092bdbcfb9f8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -9269,7 +9269,7 @@ int register_netdevice(struct net_device *dev)
/* Transfer changeable features to wanted_features and enable
* software offloads (GSO and GRO).
*/
- dev->hw_features |= NETIF_F_SOFT_FEATURES;
+ dev->hw_features |= (NETIF_F_SOFT_FEATURES | NETIF_F_SOFT_FEATURES_OFF);
dev->features |= NETIF_F_SOFT_FEATURES;
if (dev->netdev_ops->ndo_udp_tunnel_add) {
--
2.17.1
next prev parent reply other threads:[~2019-12-18 13:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 13:34 [PATCH net-next 0/4] Support fraglist GRO/GSO Steffen Klassert
2019-12-18 13:34 ` [PATCH net-next 1/4] net: Add fraglist GRO/GSO feature flags Steffen Klassert
2019-12-18 16:02 ` Willem de Bruijn
2019-12-18 13:34 ` Steffen Klassert [this message]
2019-12-18 16:02 ` [PATCH net-next 2/4] net: Add a netdev software feature set that defaults to off Willem de Bruijn
2019-12-18 13:34 ` [PATCH net-next 3/4] net: Support GRO/GSO fraglist chaining Steffen Klassert
2019-12-18 16:02 ` Willem de Bruijn
2019-12-19 8:22 ` Steffen Klassert
2019-12-19 16:28 ` Willem de Bruijn
2020-01-13 8:51 ` Steffen Klassert
2020-01-13 16:21 ` Willem de Bruijn
2020-01-15 9:47 ` Steffen Klassert
2020-01-15 15:43 ` Willem de Bruijn
2020-01-20 8:35 ` Steffen Klassert
2020-01-20 16:35 ` Willem de Bruijn
2019-12-18 13:34 ` [PATCH net-next 4/4] udp: Support UDP fraglist GRO/GSO Steffen Klassert
2019-12-18 16:03 ` Willem de Bruijn
2019-12-19 8:26 ` Steffen Klassert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191218133458.14533-3-steffen.klassert@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=marcelo.leitner@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=subashab@codeaurora.org \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).