From: amirva@gmail.com
To: Jiri Pirko <jiri@resnulli.us>
Cc: Amir Vadai <amir@vadai.me>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org,
John Fastabend <john.r.fastabend@intel.com>,
Or Gerlitz <ogerlitz@mellanox.com>,
Hadar Har-Zion <hadarh@mellanox.com>,
Jiri Pirko <jiri@mellanox.com>,
Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: [RFC net-next 2/9] net/switchdev: Introduce hardware offload support
Date: Mon, 1 Feb 2016 11:11:38 +0200 [thread overview]
Message-ID: <56af209d.624fc20a.d8ba2.16b7@mx.google.com> (raw)
In-Reply-To: <20160201090626.GA2174@nanopsycho.orion>
On Mon, Feb 01, 2016 at 10:06:27AM +0100, Jiri Pirko wrote:
> Mon, Feb 01, 2016 at 09:34:38AM CET, amir@vadai.me wrote:
> >Extend the switchdev API with new operations: switchdev_port_flow_add()
> >and switchdev_port_flow_del().
> >It allows the user to add/del a hardware offloaded flow classification
> >and actions.
> >For every new flow object a cookie is supplied. This cookie will be
> >used later on to identify the flow when removed.
> >
> >In order to make the API as flexible as possible, flow_dissector is
> >being used to describe the flow classifier.
> >
> >Every new flow object is consists of a flow_dissector+key+mask to
> >describe the classifier and a switchdev_obj_port_flow_act to describe
> >the actions and their attributes.
> >
> >object is passed to the lower layer driver to be pushed into the
> >hardware.
> >
> >Signed-off-by: Amir Vadai <amir@vadai.me>
> >---
> > include/net/switchdev.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
> > net/switchdev/switchdev.c | 33 +++++++++++++++++++++++++++++++++
> > 2 files changed, 79 insertions(+)
> >
> >diff --git a/include/net/switchdev.h b/include/net/switchdev.h
> >index d451122..c5a5681 100644
> >--- a/include/net/switchdev.h
> >+++ b/include/net/switchdev.h
> >@@ -15,6 +15,7 @@
> > #include <linux/notifier.h>
> > #include <linux/list.h>
> > #include <net/ip_fib.h>
> >+#include <net/flow_dissector.h>
> >
> > #define SWITCHDEV_F_NO_RECURSE BIT(0)
> > #define SWITCHDEV_F_SKIP_EOPNOTSUPP BIT(1)
> >@@ -69,6 +70,7 @@ enum switchdev_obj_id {
> > SWITCHDEV_OBJ_ID_IPV4_FIB,
> > SWITCHDEV_OBJ_ID_PORT_FDB,
> > SWITCHDEV_OBJ_ID_PORT_MDB,
> >+ SWITCHDEV_OBJ_ID_PORT_FLOW,
> > };
> >
> > struct switchdev_obj {
> >@@ -124,6 +126,30 @@ struct switchdev_obj_port_mdb {
> > #define SWITCHDEV_OBJ_PORT_MDB(obj) \
> > container_of(obj, struct switchdev_obj_port_mdb, obj)
> >
> >+/* SWITCHDEV_OBJ_ID_PORT_FLOW */
> >+enum switchdev_obj_port_flow_action {
> >+ SWITCHDEV_OBJ_PORT_FLOW_ACT_DROP = 0,
> >+ SWITCHDEV_OBJ_PORT_FLOW_ACT_MARK = 1,
> >+};
> >+
> >+struct switchdev_obj_port_flow_act {
> >+ u32 actions; /* Bitmap of requested actions */
> >+ u32 mark; /* Value for mark action - if requested */
>
> This approach is certainly not correct. We need a list of actions here
> instead of bitmap.
This is what I meant in the cover letter by saying:
"2. Serialization of actions will be changed into a list instead of one
big structure to describe all actions."
next prev parent reply other threads:[~2016-02-01 9:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 8:34 [RFC net-next 0/9] TC filter HW offloads Amir Vadai
2016-02-01 8:34 ` [RFC net-next 1/9] net/flow_dissector: Make dissector_uses_key() and skb_flow_dissector_target() public Amir Vadai
2016-02-01 8:34 ` [RFC net-next 2/9] net/switchdev: Introduce hardware offload support Amir Vadai
2016-02-01 9:06 ` Jiri Pirko
2016-02-01 9:11 ` amirva [this message]
2016-02-01 9:26 ` John Fastabend
2016-02-01 8:34 ` [RFC net-next 3/9] net/act: Offload support by tc actions Amir Vadai
2016-02-01 8:34 ` [RFC net-next 4/9] net/act_skbedit: Introduce hardware offload support Amir Vadai
2016-02-01 8:34 ` [RFC net-next 5/9] net/act_gact: Introduce hardware offload support for drop Amir Vadai
2016-02-01 8:34 ` [RFC net-next 6/9] net/cls_flower: Introduce hardware offloading Amir Vadai
2016-02-01 9:31 ` John Fastabend
2016-02-01 9:47 ` John Fastabend
2016-02-01 10:43 ` Amir Vadai
2016-02-01 21:25 ` John Fastabend
2016-02-01 8:34 ` [RFC net-next 7/9] net/mlx5_core: Go to next flow table support Amir Vadai
2016-02-01 8:34 ` [RFC net-next 8/9] net/mlx5e: Introduce MLX5_FLOW_NAMESPACE_OFFLOADS Amir Vadai
2016-02-01 8:34 ` [RFC net-next 9/9] net/mlx5e: Flow steering support through switchdev Amir Vadai
2016-02-01 18:52 ` Saeed Mahameed
2016-02-01 21:45 ` Or Gerlitz
2016-02-01 9:21 ` [RFC net-next 0/9] TC filter HW offloads John Fastabend
2016-02-01 14:37 ` Amir Vadai
2016-02-01 19:59 ` Tom Herbert
2016-02-01 20:14 ` John Fastabend
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=56af209d.624fc20a.d8ba2.16b7@mx.google.com \
--to=amirva@gmail.com \
--cc=amir@vadai.me \
--cc=davem@davemloft.net \
--cc=hadarh@mellanox.com \
--cc=jhs@mojatatu.com \
--cc=jiri@mellanox.com \
--cc=jiri@resnulli.us \
--cc=john.r.fastabend@intel.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.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).