From: roopa@cumulusnetworks.com
To: jiri@resnulli.us, sfeldma@gmail.com, jhs@mojatatu.com,
bcrl@kvack.org, tgraf@suug.ch, john.fastabend@gmail.com,
stephen@networkplumber.org, linville@tuxdriver.com,
nhorman@tuxdriver.com, nicolas.dichtel@6wind.com,
vyasevic@redhat.com, f.fainelli@gmail.com,
buytenh@wantstofly.org, aviadr@mellanox.com
Cc: netdev@vger.kernel.org, davem@davemloft.net,
shrijeet@cumulusnetworks.com, gospo@cumulusnetworks.com,
Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: [RFC PATCH 2/4] netdev: new feature flag NETIF_F_HW_OFFLOAD to indicate netdev object offload to hardware
Date: Fri, 21 Nov 2014 14:49:28 -0800 [thread overview]
Message-ID: <1416610170-21224-3-git-send-email-roopa@cumulusnetworks.com> (raw)
From: Roopa Prabhu <roopa@cumulusnetworks.com>
This patch adds a new NETIF_F_HW_OFFLOAD feature flag to offload logical
interfaces to hw.
Useful in cases of bridges, bonds etc where you want to offload the
logical interface attributes to hw.
---
include/linux/netdev_features.h | 1 +
net/core/rtnetlink.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 8e30685..09da213 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -66,6 +66,7 @@ enum {
NETIF_F_HW_VLAN_STAG_FILTER_BIT,/* Receive filtering on VLAN STAGs */
NETIF_F_HW_L2FW_DOFFLOAD_BIT, /* Allow L2 Forwarding in Hardware */
NETIF_F_BUSY_POLL_BIT, /* Busy poll */
+ NETIF_F_HW_OFFLOAD, /* generic hw offload */
/*
* Add your fresh new feature above and remember to update
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index f839354..97b8f48 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2106,6 +2106,13 @@ replay:
goto out;
}
+ /*
+ * If the newlink request came in with a HW_OFFLOAD
+ * flag, then set hw offload feature flag
+ */
+ if (nlh->nlmsg_flags & NLM_F_HW_OFFLOAD)
+ dev->features |= NETIF_F_HW_OFFLOAD;
+
dev->ifindex = ifm->ifi_index;
if (ops->newlink) {
--
1.7.10.4
reply other threads:[~2014-11-21 22:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1416610170-21224-3-git-send-email-roopa@cumulusnetworks.com \
--to=roopa@cumulusnetworks.com \
--cc=aviadr@mellanox.com \
--cc=bcrl@kvack.org \
--cc=buytenh@wantstofly.org \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=gospo@cumulusnetworks.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=nicolas.dichtel@6wind.com \
--cc=sfeldma@gmail.com \
--cc=shrijeet@cumulusnetworks.com \
--cc=stephen@networkplumber.org \
--cc=tgraf@suug.ch \
--cc=vyasevic@redhat.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