From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99C6C1F931 for ; Tue, 20 Jun 2023 18:33:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85364C433BC; Tue, 20 Jun 2023 18:33:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687286007; bh=fuvZu8TGHeYaRsGct7+ygST2f1DjIVWN0TC4J1++Nug=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oVGwdmySKN+LxbGYOpMaYc8Bt6LUP9K7oVGYJ1C+6IC4+ANVU8UzyMu+UfN8B0Rak 64/ANQCtQ59+gBO2dCXcQ3ykGLvUdb03wb/1KbqO7Y26YDtrXd0LpHGk3g1LzIha62 2SkBqQ6QVprwiligQ2sM49eR3DLJ+wKLQE2Ef3673UKyWnQwo5WbTlPoFLYxaga5Zm yr3E63/UO7uioBbk66l4uubPFJy2N/loKQMoyfj92SIDEdimlfyJRbRl9aHzP+simm ZuVpv9a6k/Rv8VFDM6dNCWQ2gGRJZVED8Df2Cuyooxw7XPxP17znuhzIUxO41FL91F k3mlMQZpgGfhQ== Date: Tue, 20 Jun 2023 11:33:25 -0700 From: Jakub Kicinski To: Cambda Zhu Cc: Simon Horman , netdev@vger.kernel.org, Eric Dumazet , Paolo Abeni , "David S. Miller" , David Ahern , Lu Wei , "t.feng" , Xin Long , Xuan Zhuo , Dust Li , Tony Lu Subject: Re: [PATCH net v1] ipvlan: Fix return value of ipvlan_queue_xmit() Message-ID: <20230620113325.3e9172e3@kernel.org> In-Reply-To: <6A7B6A47-7453-4D30-938E-B4AEC55906CE@linux.alibaba.com> References: <20230616063436.28760-1-cambda@linux.alibaba.com> <6A7B6A47-7453-4D30-938E-B4AEC55906CE@linux.alibaba.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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.