[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <81b8bca0-6c61-966a-bac8-fecb0ad60f57@huawei.com>
Date: Fri, 1 Dec 2023 12:13:26 +0800
From: shaozhengchao <shaozhengchao@...wei.com>
To: <netdev@...r.kernel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>
CC: <luwei32@...wei.com>, <fw@...len.de>, <maheshb@...gle.com>,
<weiyongjun1@...wei.com>, <yuehaibing@...wei.com>
Subject: Re: [PATCH net,v2] ipvlan: implement .parse_protocol hook function in
ipvlan_header_ops
On 2023/12/1 10:55, Zhengchao Shao wrote:
> The .parse_protocol hook function in the ipvlan_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.
> Ipvlan is a device of type ARPHRD_ETHER (ether_setup). Therefore, use
> eth_header_parse_protocol function to obtain the protocol.
>
> Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.")
Maybe Fixes should be: 75c65772c3d1 ("net/packet: Ask driver for
protocol if not provided by user")
> Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
> Reviewed-by: Willem de Bruijn <willemb@...gle.com>
> ---
> v2: modify commit info and add Fixes tag
> ---
> drivers/net/ipvlan/ipvlan_main.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
> index 57c79f5f2991..f28fd7b6b708 100644
> --- a/drivers/net/ipvlan/ipvlan_main.c
> +++ b/drivers/net/ipvlan/ipvlan_main.c
> @@ -387,6 +387,7 @@ static const struct header_ops ipvlan_header_ops = {
> .parse = eth_header_parse,
> .cache = eth_header_cache,
> .cache_update = eth_header_cache_update,
> + .parse_protocol = eth_header_parse_protocol,
> };
>
> static void ipvlan_adjust_mtu(struct ipvl_dev *ipvlan, struct net_device *dev)
Powered by blists - more mailing lists