netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Zhengchao Shao <shaozhengchao@huawei.com>,
	 netdev@vger.kernel.org,  davem@davemloft.net,
	 edumazet@google.com,  kuba@kernel.org,  pabeni@redhat.com
Cc: weiyongjun1@huawei.com,  yuehaibing@huawei.com,
	 shaozhengchao@huawei.com
Subject: Re: [PATCH net-next,v2] macvlan: implement .parse_protocol hook function in macvlan_hard_header_ops
Date: Sat, 02 Dec 2023 09:18:50 -0500	[thread overview]
Message-ID: <656b3cca535fd_1a6a2c29494@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20231202130658.2266526-1-shaozhengchao@huawei.com>

Zhengchao Shao wrote:
> The .parse_protocol hook function in the macvlan_header_ops structure is
> not implemented. As a result, when the AF_PACKET family is used to send
> packets, skb->protocol will be set to 0.
> Macvlan is a device of type ARPHRD_ETHER (ether_setup). Therefore, use
> eth_header_parse_protocol function to obtain the protocol.
> 
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>

Macvlan does not use skb->protocol in its ndo_start_xmit often. But
does use it once, in macvlan_broadcast, to not broadcast ETH_P_PAUSE
frames.

  reply	other threads:[~2023-12-02 14:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02 13:06 [PATCH net-next,v2] macvlan: implement .parse_protocol hook function in macvlan_hard_header_ops Zhengchao Shao
2023-12-02 14:18 ` Willem de Bruijn [this message]
2023-12-05 14:40 ` patchwork-bot+netdevbpf

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=656b3cca535fd_1a6a2c29494@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaozhengchao@huawei.com \
    --cc=weiyongjun1@huawei.com \
    --cc=yuehaibing@huawei.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).