Subject: Re: [PATCH net v1] ipvlan: Fix return value of ipvlan_queue_xmit()

From: Jakub Kicinski <[email-masked]>
Date: Tue, 20 Jun 2023 11:33:25 -0700

On Fri, 16 Jun 2023 17:40:29 +0800 Cambda Zhu wrote:
> > ipvlan_rcv_frame can return two distinct values - RX_HANDLER_CONSUMED and
> > RX_HANDLER_ANOTHER. Is it correct to treat these both as NET_XMIT_SUCCESS
> > in the xmit path? If so, perhaps it would be useful to explain why
> > in the commit message.  
> 
> The ipvlan_rcv_frame() will only return RX_HANDLER_CONSUMED in
> ipvlan_xmit_mode_l2/l3() for local is true. It's equal to NET_XMIT_SUCCESS.
> The dev_forward_skb() can return NET_RX_SUCCESS and NET_RX_DROP, and
> returning NET_RX_DROP(NET_XMIT_DROP) will increase both ipvlan and
> ipvlan->phy_dev drops counter. I think the drops should belong to
> the rcv side, and the xmit side should return NET_XMIT_SUCCESS even
> if rcv failed. However, I'm not sure if my opinion is right.

Please add the explanation to the commit msg and CC Mahesh on the v2.