lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Oct 2014 20:01:44 +0200
From:	Florian Westphal <fw@...len.de>
To:	Florian Westphal <fw@...len.de>
Cc:	Prashant Sreedharan <prashant@...adcom.com>, davem@...emloft.net,
	netdev@...r.kernel.org, dborkman@...hat.com, mchan@...adcom.com
Subject: Re: [PATCH net-next] tg3: Add skb->xmit_more support

Florian Westphal <fw@...len.de> wrote:
> Prashant Sreedharan <prashant@...adcom.com> wrote:
> > Ring TX doorbell only if xmit_more is not set or the queue is stopped.
> > 
> > Suggested-by: Daniel Borkmann <dborkman@...hat.com>
> > Signed-off-by: Prashant Sreedharan <prashant@...adcom.com>
> > Signed-off-by: Michael Chan <mchan@...adcom.com>
> > ---
> >  drivers/net/ethernet/broadcom/tg3.c |   10 ++++++----
> >  1 files changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
> > index ba49948..dbb41c1 100644
> > --- a/drivers/net/ethernet/broadcom/tg3.c
> > +++ b/drivers/net/ethernet/broadcom/tg3.c
> > @@ -8099,9 +8099,6 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
> >  	/* Sync BD data before updating mailbox */
> >  	wmb();
> >  
> > -	/* Packets are ready, update Tx producer idx local and on card. */
> > -	tw32_tx_mbox(tnapi->prodmbox, entry);
> > -
> >  	tnapi->tx_prod = entry;
> >  	if (unlikely(tg3_tx_avail(tnapi) <= (MAX_SKB_FRAGS + 1))) {
> >  		netif_tx_stop_queue(txq);
> > @@ -8116,7 +8113,12 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
> >  			netif_tx_wake_queue(txq);
> >  	}
> >  
> > -	mmiowb();
> > +	if (!skb->xmit_more || netif_xmit_stopped(txq)) {
> > +		/* Packets are ready, update Tx producer idx on card. */
> > +		tw32_tx_mbox(tnapi->prodmbox, entry);
> 
> I think you need to swap the test, i.e.

Never mind, sorry for the noise.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ