On 11/01/18(Thu) 11:50, David Gwynne wrote:
> while we were working on making the various pseudo interfaces you
> stack on top of ethernet mpsafe, we split their input processing
> off so they could be attacked one by one. they're all mpsafe now,
> so this separation is not strictly necessary anymore.

Well at that time we weren't sure how to split the work between
CPUs.  The current design allow to have multiple tasks doing some
part of the work and, like we are pushing now, process all the
incoming packets in the same context.

> this moves carp and vlan input back into ether_input. [...]

It does much more than that.  It's also doing a conversion from mbuf to
mbuf_list, it contains some IFF_RUNNING "fixes",  it breaks carp(4)
balancing, it breaks vlan/carp on top of trunk(4)...

> this diff also gets rid of the use of the pseudo interfaces input
> queues, it processes their packets off an mbuf list for each real
> ethernet packet. if we can tie all the work done on behalf of a
> physical ring to a single task it makes rx ring moderation for
> physical interfaces a lot easier to implement.

This needs to be done.  But please don't mix that with a rewrite of
the input handlers.  I believe that's the easiest way to do that is
to modify if_input() do process the packets directly if `ifp' is a

        if (ISSET(ifp->if_xflags, IFXF_CLONED) {
                struct ifih *ifih;
                struct srp_ref sr;


                SRPL_FOREACH(ifih, &sr, &ifp->if_inputs, ifih_next) {
                        if ((*ifih->ifih_input)(ifp, m, ifih->ifih_cookie))
        } else
                ifiq_input(&ifp->if_rcv, ml, 2048);

If if_input() is called on a pseudo-interface we know we're already in
a softnet process.

We could also think of doing something similar for if_enqueue() and call
if_start() directly for pseudo-interface.

> note that trunk and bridge/switch are still implemented using
> interface input handlers at the moment.

If you want to get rid of the input handlers, I'd suggest doing it in
the beginning of a release cycle and for all pseudo drivers at once.

Reply via email to