From: Thomas Graf <tgraf@suug.ch>
To: John Fastabend <john.fastabend@gmail.com>
Cc: "Varlese, Marco" <marco.varlese@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Fastabend, John R" <john.r.fastabend@intel.com>,
Jiri Pirko <jiri@resnulli.us>,
"roopa@cumulusnetworks.com" <roopa@cumulusnetworks.com>,
"sfeldma@gmail.com" <sfeldma@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH net-next v3 1/1] net: Support for switch port configuration
Date: Fri, 19 Dec 2014 00:35:10 +0000 [thread overview]
Message-ID: <20141219003510.GC16239@casper.infradead.org> (raw)
In-Reply-To: <5492FAD4.7070308@gmail.com>
On 12/18/14 at 08:03am, John Fastabend wrote:
> On 12/18/2014 07:30 AM, Varlese, Marco wrote:
> Could you also document the attributes. I think they are mostly
> clear but what is IFLA_SW_LOOPBACK. It will help later when we
> try to read the code in 6months and implement drivers.
>
> I am thinking something like
>
> /* Switch Port Attributes section
> * IFLA_SW_LEARNING - turns learning on in the bridge
> * IFLA_SW_LOOPBACK - does something interesting
>
> [...]
> */
+1. I would even ask for more than that. While clear in the bridge
context, "learning" for this API targetting multi layer switches
is ambigious. The expectation towards the driver must be crystical
clear.
> >+
> >+enum {
> >+ IFLA_SW_UNSPEC,
> >+ IFLA_SW_LEARNING,
>
> Can you address Roopa's feedback. I'm also a bit confused by the
> duplication.
Agreed. Can we decide on the ndo first and then build the APIs on
top of that? While I agree that we should have a non-bridge based
Netlink API, the underlying ndo should be the same.
> >+static const struct nla_policy ifla_sw_attr_policy[IFLA_SW_ATTR_MAX+1] = {
> >+ [IFLA_SW_LEARNING] = { .type = NLA_U64 },
> >+ [IFLA_SW_LOOPBACK] = { .type = NLA_U64 },
> >+ [IFLA_SW_BCAST_FLOODING] = { .type = NLA_U64 },
> >+ [IFLA_SW_UCAST_FLOODING] = { .type = NLA_U64 },
> >+ [IFLA_SW_MCAST_FLOODING] = { .type = NLA_U64 },
> >+};
>
> Why U64 values? What would we pass in these? Are these just boolean
> bits? Maybe the annotation above will help me understand this.
I think the intent is to keep the ndo API as simple as possible
but I agree that this is wasteful. I gave this feedback on v2 already.
next prev parent reply other threads:[~2014-12-19 0:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 15:30 [RFC PATCH net-next v3 1/1] net: Support for switch port configuration Varlese, Marco
2014-12-18 16:03 ` John Fastabend
2014-12-19 0:35 ` Thomas Graf [this message]
2014-12-19 8:12 ` Jiri Pirko
2014-12-18 16:09 ` Samudrala, Sridhar
2014-12-18 16:30 ` Jiri Pirko
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=20141219003510.GC16239@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=john.r.fastabend@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marco.varlese@intel.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=sfeldma@gmail.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).