Netdev List
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Linus Walleij <linusw@kernel.org>
Cc: Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] net: dsa: tag_ks8995: Add the KS8995 tag handling
Date: Wed, 7 Jan 2026 17:01:16 +0100	[thread overview]
Message-ID: <1fc53a59-a4f2-4376-ae06-5947e366ccc4@lunn.ch> (raw)
In-Reply-To: <20260107-ks8995-dsa-tagging-v1-1-1a92832c1540@kernel.org>

> +static struct sk_buff *ks8995_rcv(struct sk_buff *skb, struct net_device *dev)
> +{
> +	unsigned int port;
> +	__be16 *p;
> +	u16 etype;
> +	u16 tci;
> +
> +	if (unlikely(!pskb_may_pull(skb, KS8995_TAG_LEN))) {
> +		netdev_err(dev, "dropping packet, cannot pull\n");
> +		return NULL;
> +	}
> +
> +	p = dsa_etype_header_pos_rx(skb);
> +	etype = ntohs(p[0]);
> +
> +	if (etype == ETH_P_8021Q) {
> +		/* That's just an ordinary VLAN tag, pass through */
> +		return skb;

Should that actually happen? Normally all frames use the tag, and
anything without a tag we drop because we don't expect it.

> +	}
> +
> +	if ((etype & 0xFFF0U) != ETH_P_8021Q) {
> +		/* Not custom, just pass through */
> +		netdev_dbg(dev, "non-KS8995 ethertype 0x%04x\n", etype);
> +		return skb;
> +	}

Same here.

     Andrew

  reply	other threads:[~2026-01-07 16:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07 12:57 [PATCH net-next 0/2] Add DSA tag handling for KS8995 Linus Walleij
2026-01-07 12:57 ` [PATCH net-next 1/2] net: dsa: tag_ks8995: Add the KS8995 tag handling Linus Walleij
2026-01-07 16:01   ` Andrew Lunn [this message]
2026-01-12 21:07   ` Vladimir Oltean
2026-01-07 12:57 ` [PATCH net-next 2/2] net: dsa: ks8995: Add DSA tagging to KS8995 Linus Walleij
2026-01-12 21:31   ` Vladimir Oltean

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=1fc53a59-a4f2-4376-ae06-5947e366ccc4@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linusw@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@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