From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E9FB8C43381 for ; Tue, 19 Feb 2019 01:51:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BBEAE217F5 for ; Tue, 19 Feb 2019 01:51:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DkovAloG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733108AbfBSBvZ (ORCPT ); Mon, 18 Feb 2019 20:51:25 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:34238 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732932AbfBSBvZ (ORCPT ); Mon, 18 Feb 2019 20:51:25 -0500 Received: by mail-pf1-f195.google.com with SMTP id u9so2161237pfn.1 for ; Mon, 18 Feb 2019 17:51:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=tXnNSP6FwRsh8PTtNVczH2/yNxf2+3l6ILeo5HoHWRo=; b=DkovAloGd5bm159rFazwhppQtcBQbv3MsdkwVVO/JeiWdbZhCoJ1LW1Y030FxOUlLA pCnU43Cuq4btlAvSP2IBzPZZ8+NqiyLLTplxrG+mRdOH+T1cMuy4uL5sOxGDdzhSvD5Z CJZCZCgJePIMqj1J3b8Ai+loG3jea6PhQjC8Xt3vK0u/frA7847/qlcryV1Lhwe7imMF lzb+OcaCgsX6Gr0xBiyNP8q4LjWj9RobHH7EroyIraYhamHtYabEXr7/1i2gjah6KEWW TzyJXentr6XNtGFg9J3szkgEM/rES1RZ0Ca4nQOhzxg5plbEqHTRrx81h0rswIL8vEXV Boxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=tXnNSP6FwRsh8PTtNVczH2/yNxf2+3l6ILeo5HoHWRo=; b=tmn1qPWawA3Qc7P1HximbVxkfQNyFbj2fjWTJgfnL7Y1hVts/Uv5+edAOHoMl7HIXW CE+JOrBkBAbdUTHdWvJPRxKe5Nzxs3ZM+lbl+sTbbhUSR9ihSnokBd2CRwEe3hTxZQdR 15pT+hK/2bkXcFvaWkIqJ7ex2XddjookahewQoMe5ctPEvOLGGfnVwHGFtL1/gyxdIjx v8A6OFgp8nhIjXFXP2gDbV+R5Ica4ec7e/th30KQsCGvSTzPiWc3d/NxpBmpTS0fkANx BjXcKuSuthsdPdmZyP1wlvVLoHxvOh4PHdA9jZspzUVQitJ4XxItDFyhKmioqein0mTv 6j6A== X-Gm-Message-State: AHQUAuaSvPUsPL7Uf+9V9Qh1aXUYJSzY7IS2hlt5GefuhUULKz4bnl3D NYv83g0M20CSpcE7nVqiyz/YEk9s X-Google-Smtp-Source: AHgI3IYTliFxACu4tjjCWa16nt88Ywakz1mO7QevJFG2Gja0vtCXXiHGO2HdYSGTBK5xbTEUYSKjkg== X-Received: by 2002:a63:e051:: with SMTP id n17mr21572767pgj.258.1550541083543; Mon, 18 Feb 2019 17:51:23 -0800 (PST) Received: from ?IPv6:2601:282:800:fd80:7c6e:8868:2f8f:ef22? ([2601:282:800:fd80:7c6e:8868:2f8f:ef22]) by smtp.googlemail.com with ESMTPSA id a13sm16481581pgq.65.2019.02.18.17.51.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 17:51:22 -0800 (PST) Subject: Re: [PATCH v2] bonding: fix PACKET_ORIGDEV regression To: Michal Soltys , David Miller Cc: =?UTF-8?Q?Maciej_=c5=bbenczykowski?= , Jay Vosburgh , Vincent Bernat , Mahesh Bandewar , Chonggang Li , Linux NetDev References: <20190218165528.15575-1-soltys@ziu.info> From: David Ahern Message-ID: Date: Mon, 18 Feb 2019 18:51:20 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190218165528.15575-1-soltys@ziu.info> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2/18/19 9:55 AM, Michal Soltys wrote: > This patch fixes a subtle PACKET_ORIGDEV regression which was a side > effect of fixes introduced by: > > 6a9e461f6fe4 bonding: pass link-local packets to bonding master also. > > ... to: > > b89f04c61efe bonding: deliver link-local packets with skb->dev set to link that packets arrived on > > While 6a9e461f6fe4 restored pre-b89f04c61efe presence of link-local > packets on bonding masters (which is required e.g. by linux bridges > participating in spanning tree or needed for lab-like setups created > with group_fwd_mask) it also caused the originating device > information to be lost due to cloning. > > Maciej Żenczykowski proposed another solution that doesn't require > packet cloning and retains original device information - instead of > returning RX_HANDLER_PASS for all link-local packets it's now limited > only to packets from inactive slaves. > > At the same time, packets passed to bonding masters retain correct > information about the originating device and PACKET_ORIGDEV can be used > to determine it. > > This elegantly solves all issues so far: > > - link-local packets that were removed from bonding masters > - LLDP daemons being forced to explicitly bind to slave interfaces > - PACKET_ORIGDEV having no effect on bond interfaces > > Fixes: 6a9e461f6fe4 (bonding: pass link-local packets to bonding master also.) > Reported-by: Vincent Bernat > Signed-off-by: Michal Soltys > --- > drivers/net/bonding/bond_main.c | 35 +++++++++++++-------------------- > 1 file changed, 14 insertions(+), 21 deletions(-) > Hi Michal: Can you add test cases that shows the expectations of this API? Given the back and forth on the last set of patches -- and the impacts to lldpd users for example -- we really need test cases added to selftests.