Skip to content

Commit

Permalink
net: dsa: tag_ocelot_8021q: fix broken reception
Browse files Browse the repository at this point in the history
The blamed commit changed the dsa_8021q_rcv() calling convention to
accept pre-populated source_port and switch_id arguments. If those are
not available, as in the case of tag_ocelot_8021q, the arguments must be
pre-initialized with -1.

Due to the bug of passing uninitialized arguments in tag_ocelot_8021q,
dsa_8021q_rcv() does not detect that it needs to populate the
source_port and switch_id, and this makes dsa_conduit_find_user() fail,
which leads to packet loss on reception.

Fixes: dcfe767 ("net: dsa: tag_sja1105: absorb logic for not overwriting precise info into dsa_8021q_rcv()")
Signed-off-by: Robert Hodaszi <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
rhodaszi authored and kuba-moo committed Dec 12, 2024
1 parent 5af5357 commit 36ff681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/tag_ocelot_8021q.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static struct sk_buff *ocelot_xmit(struct sk_buff *skb,
static struct sk_buff *ocelot_rcv(struct sk_buff *skb,
struct net_device *netdev)
{
int src_port, switch_id;
int src_port = -1, switch_id = -1;

dsa_8021q_rcv(skb, &src_port, &switch_id, NULL, NULL);

Expand Down

0 comments on commit 36ff681

Please sign in to comment.