Looks like I found the issue:

it happens when ethernet-node gets a frame with flag
ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX but they're actually packets from
different interfaces (from virtio-node but some of them are l2 and some of
them are l3). virtio-input doesn't set this flag, but I thought maybe it
just wasn't cleared.

After I've added a piece of code which clears the flag in frames - the
issue was gone:
diff --git a/src/vlib/main.c b/src/vlib/main.c
index fd0c1fc5f..e88a0724a 100644
--- a/src/vlib/main.c
+++ b/src/vlib/main.c
@@ -208,6 +208,7 @@ vlib_frame_free (vlib_main_t * vm, vlib_node_runtime_t
* r, vlib_frame_t * f)
     }

   f->frame_flags &= ~(VLIB_FRAME_IS_ALLOCATED | VLIB_FRAME_NO_APPEND);
+  f->flags = 0;

   vec_add1 (fs->free_frames, f);
   ASSERT (fs->n_alloc_frames > 0);
@@ -1163,6 +1164,7 @@ dispatch_pending_node (vlib_main_t * vm, uword
pending_frame_index,
          /* no new frame has been assigned to this node, use the saved one
*/
          nf->frame = restore_frame;
          f->n_vectors = 0;
+         f->flags = 0;
        }
       else
        {

If I'm correct, I'd like to send 2 patches, this one and another which
allocates a new frame per interface with the
ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX flag in virtio-input node.
Any feedback is appreciated.

On Tue, 29 Mar 2022 at 22:09, Stanislav Zaikin <zsta...@gmail.com> wrote:

> Hello folks,
>
> I'm experiencing a weird issue. I'm running a current master with linux-cp
> plugin enabled.
> I create a loopback interface, set it as BVI for a bridge, and create a
> lcp for the loop. Almost everywhere it's working just fine. Usually, the
> trace looks like this:
>
> virtio-input -> ethernet-input -> ip4-input -> linux-cp-xc-ip4 ->
> loop20-output -> l2-input -> etc
>
> But on 2 machines I observe a crash almost immediately as some traffic
> comes from the tap interface (which is lcp interface for the loop). It
> happens in the "l2-input" node. But the tap interface isn't a part of any
> bridge (and obviously it doesn't have any l2 config, and that's why vpp
> crashes).
>
> I even enabled VLIB_BUFFER_TRACE_TRAJECTORY to check how the trace looks
> like. I can see that the packet goes directly from "ethernet-input" to
> "l2-input" (which obviously shouldn't happen).
>
> I double-checked the sources of ethernet-input and the only reason could
> be if in ethernet_main.main_intfs[sw_if_index] there's a flag
> SUBINT_CONFIG_L2 for an untagged subinterface. I checked that in gdb and I
> don't have such a flag for my tap interface.
>
> Since I run out of ideas on what to check I'm asking for the help of the
> community. So, any ideas/inputs are much appreciated.
>
> --
> Best regards
> Stanislav Zaikin
>


-- 
Best regards
Stanislav Zaikin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21150): https://lists.fd.io/g/vpp-dev/message/21150
Mute This Topic: https://lists.fd.io/mt/90117260/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to