svn commit: r203834 - in head/sys: dev/cxgb dev/e1000 dev/ixgbe dev/mxge net

Max Laier max at love2party.net
Sat Feb 13 16:18:49 UTC 2010


On Saturday 13 February 2010 17:04:58 Max Laier wrote:
> Author: mlaier
> Date: Sat Feb 13 16:04:58 2010
> New Revision: 203834
> URL: http://svn.freebsd.org/changeset/base/203834
> 
> Log:
>   Fix drbr and altq interaction:
>    - introduce drbr_needs_enqueue that returns whether the interface/br
>  needs an enqueue operation: returns true if altq is enabled or there are
>  already packets in the ring (as we need to maintain packet order) - update
>  all drbr consumers
>    - fix drbr_flush
>    - avoid using the driver queue (IFQ_DRV_*) in the altq case as the
>      multiqueue consumer does not provide enough protection, serialize altq
>      interaction with the main queue lock
>    - make drbr_dequeue_cond work with altq
> 
>   Discussed with:		kmacy, yongari, jfv
>   MFC after:		4 weeks
> 
> Modified:
>   head/sys/dev/cxgb/cxgb_sge.c
>   head/sys/dev/e1000/if_em.c
>   head/sys/dev/e1000/if_igb.c
>   head/sys/dev/ixgbe/ixgbe.c
>   head/sys/dev/mxge/if_mxge.c
>   head/sys/net/if_var.h

Note that em, igb and ixgbe are still subtly broken after this.  The problem 
is that they all call drbr_enqueue after failure to transmit a previously 
dequeued packet.  This might mess up the packet order as the buf_rings are 
strictly FIFO.  The fix is to make sure that there are enough resources to 
transmit before dequeuing the packet (drbr_dequeue_cond may be helpful here) 
and discarding the packet if the transmission fails for any other reason.

Regards,
  Max


More information about the svn-src-head mailing list