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
| ||
|
Message-ID: <1415291564.3398.66.camel@decadent.org.uk>
Date: Thu, 06 Nov 2014 16:32:44 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: Sowmini Varadhan <sowmini.varadhan@...cle.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCHv2 net-next 2/2] sunvnet: Use one Tx queue per vnet_port
On Thu, 2014-11-06 at 11:28 -0500, Sowmini Varadhan wrote:
> On (11/06/14 16:19), Ben Hutchings wrote:
> > > + txq = netdev_get_tx_queue(port->vp->dev, port->q_index);
> > > + __netif_tx_lock(txq, smp_processor_id());
> > > + if (likely(netif_tx_queue_stopped(txq))) {
> > > + struct vio_dring_state *dr;
> > > +
> > > + dr = &port->vio.drings[VIO_DRIVER_TX_RING];
> >
> > You seem to have dropped the condition for the netif_tx_wake_queue(),
> > which I would guess based on the old code should be:
> >
> > if (vnet_tx_dring_avail(dr) >= VNET_TX_WAKEUP_THRESH(dr))
> >
> > > + netif_tx_wake_queue(txq);
>
> yes, this was deliberate.
>
> As I indicated in the comments:
>
> /* Got back a STOPPED LDC message on port. If the queue is stopped,
> * wake it up so that we'll send out another START message at the
> * next TX.
> */
>
> We only call maybe_tx_wakeup() if the peer has sent us a STOPPED
> ack (meaning that the peer is no longer reading the descriptor rings).
> So if our tx queue is full and stopped, we need to poke the peer
> on the next TX with a start message. (otherwise we'd never wake up!)
OK, then the indentation of the following line is wrong.
Ben.
--
Ben Hutchings
Beware of programmers who carry screwdrivers. - Leonard Brandwein
Download attachment "signature.asc" of type "application/pgp-signature" (812 bytes)
Powered by blists - more mailing lists