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.fastab...@intel.com>
> Cc: Neil Horman <nhor...@tuxdriver.com>
> Cc: e1000-de...@lists.sourceforge.net
> Signed-off-by: Jason Wang <jasow...@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.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to