linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 net-next] teaming: deliver link-local packets with the link they arrive on
@ 2022-02-15 22:05 Jeffrey Ji
  2022-02-17  4:44 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Ji @ 2022-02-15 22:05 UTC (permalink / raw)
  To: Eric Dumazet, David S . Miller
  Cc: Brian Vazquez, linux-kernel, netdev, Jakub Kicinski,
	Mahesh Bandewar, jeffreyji

From: jeffreyji <jeffreyji@google.com>

skb is ignored if team port is disabled. We want the skb to be delivered
if it's an LLDP packet.

Issue is already fixed for bonding in commit
b89f04c61efe3b7756434d693b9203cc0cce002e

Signed-off-by: jeffreyji <jeffreyji@google.com>
---
 drivers/net/team/team.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 8b2adc56b92a..24d66dfbb2e1 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -734,6 +734,12 @@ static rx_handler_result_t team_handle_frame(struct sk_buff **pskb)
 	port = team_port_get_rcu(skb->dev);
 	team = port->team;
 	if (!team_port_enabled(port)) {
+		if (is_link_local_ether_addr(eth_hdr(skb)->h_dest))
+			/*
+			 * link-local packets are mostly useful when stack
+			 * receives them with the link they arrive on.
+			 */
+			return RX_HANDLER_PASS;
 		/* allow exact match delivery for disabled ports */
 		res = RX_HANDLER_EXACT;
 	} else {
-- 
2.35.1.265.g69c8d7142f-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 net-next] teaming: deliver link-local packets with the link they arrive on
  2022-02-15 22:05 [PATCH v1 net-next] teaming: deliver link-local packets with the link they arrive on Jeffrey Ji
@ 2022-02-17  4:44 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2022-02-17  4:44 UTC (permalink / raw)
  To: Jeffrey Ji
  Cc: Eric Dumazet, David S . Miller, Brian Vazquez, linux-kernel,
	netdev, Mahesh Bandewar, jeffreyji

On Tue, 15 Feb 2022 22:05:17 +0000 Jeffrey Ji wrote:
> From: jeffreyji <jeffreyji@google.com>
> 
> skb is ignored if team port is disabled. We want the skb to be delivered
> if it's an LLDP packet.
> 
> Issue is already fixed for bonding in commit
> b89f04c61efe3b7756434d693b9203cc0cce002e

This is not the correct way to quote a commit.  It should be
commit <12+ chars of sha1> ("title line").

> Signed-off-by: jeffreyji <jeffreyji@google.com>

You must CC maintainers. scripts/get_maintainer.pl is your friend.
You don't have to CC linux-kernel, tho, nobody reads that. Please
resend.

> diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
> index 8b2adc56b92a..24d66dfbb2e1 100644
> --- a/drivers/net/team/team.c
> +++ b/drivers/net/team/team.c
> @@ -734,6 +734,12 @@ static rx_handler_result_t team_handle_frame(struct sk_buff **pskb)
>  	port = team_port_get_rcu(skb->dev);
>  	team = port->team;
>  	if (!team_port_enabled(port)) {
> +		if (is_link_local_ether_addr(eth_hdr(skb)->h_dest))
> +			/*

Please run checkpatch --strict on your submissions

> +			 * link-local packets are mostly useful when stack
> +			 * receives them with the link they arrive on.
> +			 */
> +			return RX_HANDLER_PASS;
>  		/* allow exact match delivery for disabled ports */
>  		res = RX_HANDLER_EXACT;
>  	} else {


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-17  4:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 22:05 [PATCH v1 net-next] teaming: deliver link-local packets with the link they arrive on Jeffrey Ji
2022-02-17  4:44 ` Jakub Kicinski

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).