On Tue, 30 Jul 2024 13:22:35 +0100 Konstantin Ananyev <[email protected]> wrote:
> From: Konstantin Ananyev <[email protected]> > > With commit: ACL mode now can use send_packets_multi(). > What I missed with that changes: send_packets_multi() can't deal > properly with input dst_port[i] == BAD_PORT (though it can set > it itself), as it uses dst_port[i] values to read L2 addresses for the port > and assumes dst_port[] to contain valid only values. > To fix that just add a check that all dst_port[] entries are valid before > calling : send_packets_multi(). Otherwhise use send_packets_single(). > An alternative, and probably more logical approach would be to > re-arrange send_packets_multi() so that it updates L2 packet headers > at the very last state - when dst_port[] are finialized. > But that would affect all other modes, but that would affect all other > modes and will require much more code changes and testing. > > Bugzilla ID: 1502 > Fixes: aa7c6077c19b ("examples/l3fwd: avoid packets reorder in ACL mode") > > Reported-by: Song Jiale <[email protected]> > Signed-off-by: Konstantin Ananyev <[email protected]> > --- Acked-by: Stephen Hemminger <[email protected]>

