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:	Tue, 26 Aug 2014 09:20:20 -0700
From:	Tom Herbert <therbert@...gle.com>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc:	Alexander Duyck <alexander.h.duyck@...el.com>,
	David Miller <davem@...emloft.net>,
	Linux Netdev List <netdev@...r.kernel.org>,
	Jamal Hadi Salim <jhs@...atatu.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
	Rusty Russell <rusty@...tcorp.com.au>,
	Daniel Borkmann <dborkman@...hat.com>, brouer@...hat.com
Subject: Re: [PATCH 2/2] ixgbe: support skb->xmit_more in netdev_ops->ndo_start_xmit()

On Tue, Aug 26, 2014 at 8:40 AM, Hannes Frederic Sowa
<hannes@...essinduktion.org> wrote:
> On Di, 2014-08-26 at 08:00 -0700, Alexander Duyck wrote:
>> On 08/25/2014 04:35 PM, David Miller wrote:
>> >
>> > From: Daniel Borkmann <dborkman@...hat.com>
>> >
>> > This implements the deferred tail pointer flush API for the ixgbe
>> > driver. Similar version also proposed longer time ago by Alexander Duyck.
>> >
>> > Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
>> > Signed-off-by: David S. Miller <davem@...emloft.net>
>> > ---
>> >  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 7 ++++---
>> >  1 file changed, 4 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> > index 87bd53f..ba9ceaa 100644
>> > --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> > +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> > @@ -6958,9 +6958,10 @@ static void ixgbe_tx_map(struct ixgbe_ring *tx_ring,
>> >
>> >     tx_ring->next_to_use = i;
>> >
>> > -   /* notify HW of packet */
>> > -   ixgbe_write_tail(tx_ring, i);
>> > -
>> > +   if (!skb->xmit_more) {
>> > +           /* notify HW of packet */
>> > +           ixgbe_write_tail(tx_ring, i);
>> > +   }
>> >     return;
>> >  dma_error:
>> >     dev_err(tx_ring->dev, "TX DMA map failed\n");
>> >
>>
>> It might help to add some handling for the case where xmit_more is set,
>> but the ring has become full.  This current implementation introduces
>> the risk of triggering a Tx hang.
>
> IMHO this should be done before the patch lands in the driver.
>
>> My advice would be to pull the ixgbe_maybe_stop_tx code at the end of
>> xmit_frame into the if check here, and perhaps look into adding an
>> additional check to see if BQL has stopped the ring as well.
>
> I would like to have the BQL check not in the driver but in the generic
> code steering xmit_more.
>

BQL stops the queue from netdev_tx_sent_queue, we could change that to
return indication queue was stopped and use that as another check to
flush.

> Otherwise I'll like the API.
>
> David, because of debugging and driver bugs, can we have an interface
> flag for that, so we can e.g. switch xmit_more to 0 permanently? It
> would also be nice to have for documentation purposes, so ethtool e.g.
> can discover feature-set of a driver.
>
> Thanks,
> Hannes
>
>
--
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