From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>, davem@davemloft.net
Cc: netdev@vger.kernel.org, Alexander Duyck <alexander.h.duyck@redhat.com>
Subject: Re: [PATCH v2 1/2] net: dsa: Error out on tagging protocol mismatches
Date: Fri, 24 Oct 2014 15:42:24 -0700 [thread overview]
Message-ID: <544AD5D0.4070908@gmail.com> (raw)
In-Reply-To: <1414187045-8326-2-git-send-email-andrew@lunn.ch>
On 10/24/2014 02:44 PM, Andrew Lunn wrote:
> If there is a mismatch between enabled tagging protocols and the
> protocol the switch supports, error out, rather than continue with a
> situation which is unlikely to work.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
> cc: alexander.h.duyck@intel.com
> ---
>
> v2: Handle the use case of DSA_TAG_PROTO_NONE
>
> net/dsa/dsa.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> index 22f34cf4cb27..6317b41c99b0 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> @@ -174,8 +174,11 @@ dsa_switch_setup(struct dsa_switch_tree *dst, int index,
> dst->rcv = brcm_netdev_ops.rcv;
> break;
> #endif
> - default:
> + case DSA_TAG_PROTO_NONE:
> break;
> + default:
> + ret = -ENOPROTOOPT;
> + goto out;
> }
>
> dst->tag_protocol = drv->tag_protocol;
>
next prev parent reply other threads:[~2014-10-24 22:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 21:44 [PATCH v2 0/2] DSA tagging mismatches Andrew Lunn
2014-10-24 21:44 ` [PATCH v2 1/2] net: dsa: Error out on tagging protocol mismatches Andrew Lunn
2014-10-24 22:42 ` Florian Fainelli [this message]
2014-10-24 21:44 ` [PATCH v2 2/2] dsa: mv88e6171: Fix tagging protocol/Kconfig Andrew Lunn
2014-10-24 22:45 ` Florian Fainelli
2014-10-28 19:28 ` [PATCH v2 0/2] DSA tagging mismatches David Miller
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=544AD5D0.4070908@gmail.com \
--to=f.fainelli@gmail.com \
--cc=alexander.h.duyck@redhat.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).