From: "Tobias Waldekranz" <tobias@waldekranz.com>
To: "Vladimir Oltean" <olteanv@gmail.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <andrew@lunn.ch>,
<vivien.didelot@gmail.com>, <f.fainelli@gmail.com>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH] net: dsa: tag_dsa: Unify regular and ethertype DSA taggers
Date: Tue, 10 Nov 2020 17:57:54 +0100 [thread overview]
Message-ID: <C6ZQR6IP6FDI.19PS7RY5FUQIG@wkz-x280> (raw)
In-Reply-To: <20201110125906.djgj2nnzdlnudt3w@skbuf>
On Tue Nov 10, 2020 at 3:59 PM CET, Vladimir Oltean wrote:
> On Tue, Nov 10, 2020 at 10:13:25AM +0100, Tobias Waldekranz wrote:
> > +config NET_DSA_TAG_DSA_COMMON
> > + tristate
> > + default n
>
> I think that "default n" is implicit and should be omitted.
Correct, will fix!
> > +/**
> > + * enum dsa_cmd - DSA Command
> > + * @DSA_CMD_TO_CPU: Set on packets that where trapped or mirrored to
>
> s/where/were/
ACK
> > + /* Construct tagged FROM_CPU DSA tag from 802.1Q tag. */
> > + dsa_header = skb->data + 2 * ETH_ALEN + extra;
> > + dsa_header[0] = (DSA_CMD_FROM_CPU << 6) | 0x20 | dp->ds->index;
>
> What is 0x20, BIT(5)? To denote that it's an 802.1Q tagged frame I
> suppose?
> Could it have a macro?
It could, there are loads of bare shifts and masks inherited from the
old taggers though. I suppose it would be nice to replace them with
symbolic names. Then again they are never used for anything else so
I'm not sure it adds that much. Andrew?
> > - /*
> > - * The ethertype field is part of the DSA header.
> > - */
> > + /* The ethertype field is part of the DSA header. */
>
> Could these comment style changes be a separate patch?
Sure, I'll separate them in v2.
> > +static const struct dsa_device_ops edsa_netdev_ops = {
> > + .name = "edsa",
> > + .proto = DSA_TAG_PROTO_EDSA,
> > + .xmit = edsa_xmit,
> > + .rcv = edsa_rcv,
> > + .overhead = EDSA_HLEN,
>
> Could you reindent these to be aligned?
Yeah, absolutely.
Thanks for the review!
next prev parent reply other threads:[~2020-11-10 17:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 9:13 [PATCH] net: dsa: tag_dsa: Unify regular and ethertype DSA taggers Tobias Waldekranz
2020-11-10 12:59 ` Vladimir Oltean
2020-11-10 16:57 ` Tobias Waldekranz [this message]
2020-11-10 13:49 ` Andrew Lunn
2020-11-11 0:24 ` Jakub Kicinski
2020-11-11 3:41 ` Florian Fainelli
2020-11-11 13:14 ` Tobias Waldekranz
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=C6ZQR6IP6FDI.19PS7RY5FUQIG@wkz-x280 \
--to=tobias@waldekranz.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@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