Skip to content

Commit dddb4a5

Browse files
yangbolu1991fabiobaltieri
authored andcommitted
net: ethernet: drop duplicated bridge forwarding in TX
Ethernet TX should not handle bridge forwarding. The bridge layer had already handled forwarding. Current code is causing duplicated TX if sending is via bridge interface, or causing needless TX on other bridge ports if sending is via one bridge port. Signed-off-by: Yangbo Lu <[email protected]>
1 parent 401cbbb commit dddb4a5

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

subsys/net/l2/ethernet/ethernet.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -782,28 +782,6 @@ static int ethernet_send(struct net_if *iface, struct net_pkt *pkt)
782782
net_pkt_cursor_init(pkt);
783783

784784
send:
785-
if (IS_ENABLED(CONFIG_NET_ETHERNET_BRIDGE) &&
786-
net_eth_iface_is_bridged(ctx) && !net_pkt_is_l2_bridged(pkt)) {
787-
struct net_if *bridge = net_eth_get_bridge(ctx);
788-
struct net_pkt *out_pkt;
789-
790-
out_pkt = net_pkt_clone(pkt, K_NO_WAIT);
791-
if (out_pkt == NULL) {
792-
ret = -ENOMEM;
793-
goto error;
794-
}
795-
796-
net_pkt_set_l2_bridged(out_pkt, true);
797-
net_pkt_set_iface(out_pkt, bridge);
798-
net_pkt_set_orig_iface(out_pkt, iface);
799-
800-
NET_DBG("Passing pkt %p (orig %p) to bridge %d from %d",
801-
out_pkt, pkt, net_if_get_by_iface(bridge),
802-
net_if_get_by_iface(iface));
803-
804-
(void)net_if_queue_tx(bridge, out_pkt);
805-
}
806-
807785
ret = net_l2_send(api->send, net_if_get_device(iface), iface, pkt);
808786
if (ret != 0) {
809787
eth_stats_update_errors_tx(iface);

0 commit comments

Comments
 (0)