netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Mahesh Bandewar <mahesh@bandewar.net>
Cc: Andy Gospodarek <andy@greyhouse.net>,
	Veaceslav Falico <vfalico@gmail.com>,
	David Miller <davem@davemloft.net>,
	Netdev <netdev@vger.kernel.org>, Michal Soltys <soltys@ziu.info>,
	Mahesh Bandewar <maheshb@google.com>
Subject: Re: [PATCH next] bonding: pass link-local packets to bonding master also.
Date: Mon, 16 Jul 2018 17:24:33 -0400	[thread overview]
Message-ID: <12404.1531776273@nyx> (raw)
In-Reply-To: <20180716011246.225647-1-mahesh@bandewar.net>

Mahesh Bandewar <mahesh@bandewar.net> wrote:

>From: Mahesh Bandewar <maheshb@google.com>
>
>Commit b89f04c61efe ("bonding: deliver link-local packets with
>skb->dev set to link that packets arrived on") changed the behavior
>of how link-local-multicast packets are processed. The change in
>the behavior broke some legacy use cases where these packets are
>expected to arrive on bonding master device also.
>
>This patch passes the packet to the stack with the link it arrived
>on as well as passes to the bonding-master device to preserve the
>legacy use case.

	Michal, can you test this?  I'm travelling this week and won't
be able to run the patch.

	Mahesh, will this confuse LLDP, et al, daemons that, e.g., bind
to every possible interface and now see the same LLDP PDU (identical
Chassis ID, Port ID, et al, TLVs) on multiple interfaces?

	Thanks,

	-J

>Reported-by: Michal Soltys <soltys@ziu.info>
>Signed-off-by: Mahesh Bandewar <maheshb@google.com>
>---
> drivers/net/bonding/bond_main.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>index 9a2ea3c1f949..1d3b7d8448f2 100644
>--- a/drivers/net/bonding/bond_main.c
>+++ b/drivers/net/bonding/bond_main.c
>@@ -1177,9 +1177,22 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
> 		}
> 	}
> 
>-	/* don't change skb->dev for link-local packets */
>-	if (is_link_local_ether_addr(eth_hdr(skb)->h_dest))
>+	/* Link-local multicast packets should be passed to the
>+	 * stack on the link they arrive as well as pass them to the
>+	 * bond-master device. These packets are mostly usable when
>+	 * stack receives it with the link on which they arrive
>+	 * (e.g. LLDP) but there may be some legacy behavior that
>+	 * expects these packets to appear on bonding master too.
>+	 */
>+	if (is_link_local_ether_addr(eth_hdr(skb)->h_dest)) {
>+		struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC);
>+
>+		if (nskb) {
>+			nskb->dev = bond->dev;
>+			netif_rx(nskb);
>+		}
> 		return RX_HANDLER_PASS;
>+	}
> 	if (bond_should_deliver_exact_match(skb, slave, bond))
> 		return RX_HANDLER_EXACT;
> 
>-- 
>2.18.0.203.gfac676dfb9-goog

---
	-Jay Vosburgh, jay.vosburgh@canonical.com

  reply	other threads:[~2018-07-16 21:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16  1:12 [PATCH next] bonding: pass link-local packets to bonding master also Mahesh Bandewar
2018-07-16 21:24 ` Jay Vosburgh [this message]
2018-07-16 23:53   ` Mahesh Bandewar (महेश बंडेवार)
2018-07-17  9:32     ` Michal Soltys
2018-07-17 22:17       ` Michal Soltys
2018-07-16 23:33 ` Stephen Hemminger
2018-07-16 23:57   ` Mahesh Bandewar (महेश बंडेवार)
2018-07-17  0:43     ` Stephen Hemminger
2018-07-17  9:55     ` Michal Soltys
2018-11-30 21:32 ` [next] " Vincent Bernat
2018-12-09  8:30   ` Vincent Bernat
2018-12-19 22:57   ` Michal Soltys
2018-12-20  5:55     ` Vincent Bernat
2018-12-23 13:06       ` Michal Soltys
2018-12-23 13:16         ` Vincent Bernat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12404.1531776273@nyx \
    --to=jay.vosburgh@canonical.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=mahesh@bandewar.net \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=soltys@ziu.info \
    --cc=vfalico@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).