From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] net: skb_scrub_packet(): Scrub offload_fwd_mark Date: Wed, 21 Nov 2018 15:40:24 -0800 (PST) Message-ID: <20181121.154024.418431224426869492.davem@davemloft.net> References: <1bc608bd028b41a21c99c982f459b7434f0948ed.1542712365.git.petrm@mellanox.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, idosch@mellanox.com To: petrm@mellanox.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:47738 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387885AbeKVKRB (ORCPT ); Thu, 22 Nov 2018 05:17:01 -0500 In-Reply-To: <1bc608bd028b41a21c99c982f459b7434f0948ed.1542712365.git.petrm@mellanox.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Petr Machata Date: Tue, 20 Nov 2018 11:39:56 +0000 > When a packet is trapped and the corresponding SKB marked as > already-forwarded, it retains this marking even after it is forwarded > across veth links into another bridge. There, since it ingresses the > bridge over veth, which doesn't have offload_fwd_mark, it triggers a > warning in nbp_switchdev_frame_mark(). > > Then nbp_switchdev_allowed_egress() decides not to allow egress from > this bridge through another veth, because the SKB is already marked, and > the mark (of 0) of course matches. Thus the packet is incorrectly > blocked. > > Solve by resetting offload_fwd_mark() in skb_scrub_packet(). That > function is called from tunnels and also from veth, and thus catches the > cases where traffic is forwarded between bridges and transformed in a > way that invalidates the marking. > > Fixes: 6bc506b4fb06 ("bridge: switchdev: Add forward mark support for stacked devices") > Fixes: abf4bb6b63d0 ("skbuff: Add the offload_mr_fwd_mark field") > Signed-off-by: Petr Machata > Suggested-by: Ido Schimmel Applied and queued up for -stable, thanks.