linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2] bonding: Remove unnecessary check
@ 2022-08-24 11:17 Sun Shouxin
  2022-08-24 18:07 ` Jay Vosburgh
  0 siblings, 1 reply; 3+ messages in thread
From: Sun Shouxin @ 2022-08-24 11:17 UTC (permalink / raw)
  To: j.vosburgh, vfalico, andy, davem, edumazet, kuba, pabeni, ast,
	daniel, hawk, john.fastabend
  Cc: netdev, linux-kernel, bpf, huyd12, sunshouxin

This code is intended to support bond alb interface added to
Linux bridge by modifying MAC, however, it doesn't work for
one bond alb interface with vlan added to bridge.
Since commit d5410ac7b0ba("net:bonding:support balance-alb
interface with vlan to bridge"), new logic is adapted to handle
bond alb with or without vlan id, and then the code is deprecated.

Suggested-by: Hu Yadi <huyd12@chinatelecom.cn>
Signed-off-by: Sun Shouxin <sunshouxin@chinatelecom.cn>
---
 drivers/net/bonding/bond_main.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 50e60843020c..6b0f0ce9b9a1 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1578,19 +1578,6 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
 
 	skb->dev = bond->dev;
 
-	if (BOND_MODE(bond) == BOND_MODE_ALB &&
-	    netif_is_bridge_port(bond->dev) &&
-	    skb->pkt_type == PACKET_HOST) {
-
-		if (unlikely(skb_cow_head(skb,
-					  skb->data - skb_mac_header(skb)))) {
-			kfree_skb(skb);
-			return RX_HANDLER_CONSUMED;
-		}
-		bond_hw_addr_copy(eth_hdr(skb)->h_dest, bond->dev->dev_addr,
-				  bond->dev->addr_len);
-	}
-
 	return ret;
 }
 
-- 
2.27.0


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

end of thread, other threads:[~2022-08-25  2:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24 11:17 [PATCH net-next v2] bonding: Remove unnecessary check Sun Shouxin
2022-08-24 18:07 ` Jay Vosburgh
2022-08-25  2:28   ` Jonathan Toppins

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