netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@intel.com>
To: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Cc: therbert@google.com, jhs@mojatatu.com,
	hannes@stressinduktion.org, edumazet@google.com,
	jeffrey.t.kirsher@intel.com, rusty@rustcorp.com.au,
	dborkman@redhat.com, brouer@redhat.com
Subject: Re: [PATCH 2/2] ixgbe: support skb->xmit_more in netdev_ops->ndo_start_xmit()
Date: Tue, 26 Aug 2014 08:00:10 -0700	[thread overview]
Message-ID: <53FCA0FA.20600@intel.com> (raw)
In-Reply-To: <20140825.163505.1969688661687017343.davem@davemloft.net>

On 08/25/2014 04:35 PM, David Miller wrote:
> 
> From: Daniel Borkmann <dborkman@redhat.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@redhat.com>
> Signed-off-by: David S. Miller <davem@davemloft.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.

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.

Thanks,

Alex

  reply	other threads:[~2014-08-26 15:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 23:35 [PATCH 2/2] ixgbe: support skb->xmit_more in netdev_ops->ndo_start_xmit() David Miller
2014-08-26 15:00 ` Alexander Duyck [this message]
2014-08-26 15:40   ` Hannes Frederic Sowa
2014-08-26 15:58     ` Daniel Borkmann
2014-08-26 16:20     ` Tom Herbert
2014-08-26 16:36       ` Alexander Duyck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FCA0FA.20600@intel.com \
    --to=alexander.h.duyck@intel.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=edumazet@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=therbert@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).