lkml.org 
[lkml]   [2014]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [E1000-devel] [PATCH net 2/2] net: core: explicitly select a txq before doing l2 forwarding
    From
    Date
    On Mon, 2014-01-06 at 11:21 +0800, Jason Wang wrote:
    > Currently, the tx queue were selected implicitly in
    > ndo_dfwd_start_xmit(). The
    > will cause several issues:
    >
    > - NETIF_F_LLTX was forced for macvlan device in this case which lead
    > extra lock
    > contention.
    > - dev_hard_start_xmit() was called with NULL txq which bypasses the
    > net device
    > watchdog
    > - dev_hard_start_xmit() does not check txq everywhere which will lead
    > a crash
    > when tso is disabled for lower device.
    >
    > Fix this by explicitly introducing a select queue method just for l2
    > forwarding
    > offload (ndo_dfwd_select_queue), and introducing dfwd_direct_xmit() to
    > do the
    > queue selecting and transmitting for l2 forwarding.
    >
    > With this fixes, NETIF_F_LLTX could be preserved for macvlan and
    > there's no need
    > to check txq against NULL in dev_hard_start_xmit().
    >
    > In the future, it was also required for macvtap l2 forwarding support
    > since it
    > provides a necessary synchronization method.
    >
    > Cc: John Fastabend <john.r.fastabend@intel.com>
    > Cc: Neil Horman <nhorman@tuxdriver.com>
    > Cc: e1000-devel@lists.sourceforge.net
    > Signed-off-by: Jason Wang <jasowang@redhat.com>
    > ---
    > drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 15 +++++++++----
    > drivers/net/macvlan.c | 3 +-
    > include/linux/netdevice.h | 11 +++++++++
    > net/core/dev.c | 28
    > ++++++++++++++++++++++++-
    > 4 files changed, 49 insertions(+), 8 deletions(-)

    Thanks Jason, I have added this to my queue since it has changes against
    ixgbe.
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2014-01-06 13:21    [W:4.822 / U:0.480 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site