netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Joshua Hay <joshua.a.hay@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	Luigi Rizzo <lrizzo@google.com>,
	Brian Vazquez <brianvv@google.com>,
	Madhu Chittim <madhu.chittim@intel.com>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH net v2 4/6] idpf: replace flow scheduling buffer ring with buffer pool
Date: Thu, 24 Jul 2025 10:20:01 +0100	[thread overview]
Message-ID: <20250724092001.GI1150792@horms.kernel.org> (raw)
In-Reply-To: <20250718002150.2724409-5-joshua.a.hay@intel.com>

On Thu, Jul 17, 2025 at 05:21:48PM -0700, Joshua Hay wrote:

...

> diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/ethernet/intel/idpf/idpf_txrx.c

...

> @@ -1959,10 +1966,29 @@ static bool idpf_tx_clean_buf_ring(struct idpf_tx_queue *txq, u16 compl_tag,
>  	};
>  	u16 ntc, orig_idx = idx;
>  
> +	tx_buf = &txq->tx_buf[buf_id];
> +	if (tx_buf->type == LIBETH_SQE_SKB) {
> +		if (skb_shinfo(tx_buf->skb)->tx_flags & SKBTX_IN_PROGRESS)
> +			idpf_tx_read_tstamp(txq, tx_buf->skb);
> +
> +		libeth_tx_complete(tx_buf, &cp);
> +		idpf_post_buf_refill(txq->refillq, buf_id);
> +	}
> +
> +	while (idpf_tx_buf_next(tx_buf) != IDPF_TXBUF_NULL) {
> +		u16 buf_id = idpf_tx_buf_next(tx_buf);
> +
> +		tx_buf = &txq->tx_buf[buf_id];
> +		libeth_tx_complete(tx_buf, &cp);
> +		idpf_post_buf_refill(txq->refillq, buf_id);
> +	}
> +
> +	return true;

This is not a full review.
And I guess this is an artifact of the development of this patch-set.
But the code in this function below this line appears to be unreachable.

Flagged by Smatch.

> +
>  	tx_buf = &txq->tx_buf[idx];
>  
>  	if (unlikely(tx_buf->type <= LIBETH_SQE_CTX ||
> -		     idpf_tx_buf_compl_tag(tx_buf) != compl_tag))
> +		     idpf_tx_buf_compl_tag(tx_buf) != buf_id))
>  		return false;
>  
>  	if (tx_buf->type == LIBETH_SQE_SKB) {

...

  reply	other threads:[~2025-07-24  9:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-18  0:21 [Intel-wired-lan] [PATCH net v2 0/6] idpf: replace Tx flow scheduling buffer ring with buffer pool Joshua Hay
2025-07-18  0:21 ` [Intel-wired-lan] [PATCH net v2 1/6] idpf: add support for Tx refillqs in flow scheduling mode Joshua Hay
2025-07-21 15:05   ` Loktionov, Aleksandr
2025-07-18  0:21 ` [Intel-wired-lan] [PATCH net v2 2/6] idpf: improve when to set RE bit logic Joshua Hay
2025-07-18  0:21 ` [Intel-wired-lan] [PATCH net v2 3/6] idpf: simplify and fix splitq Tx packet rollback error path Joshua Hay
2025-07-18  0:21 ` [Intel-wired-lan] [PATCH net v2 4/6] idpf: replace flow scheduling buffer ring with buffer pool Joshua Hay
2025-07-24  9:20   ` Simon Horman [this message]
2025-07-25 17:15     ` Hay, Joshua A
2025-07-18  0:21 ` [Intel-wired-lan] [PATCH net v2 5/6] idpf: stop Tx if there are insufficient buffer resources Joshua Hay
2025-07-18  0:21 ` [Intel-wired-lan] [PATCH net v2 6/6] idpf: remove obsolete stashing code Joshua Hay
2025-07-23 15:08 ` [Intel-wired-lan] [PATCH net v2 0/6] idpf: replace Tx flow scheduling buffer ring with buffer pool Simon Horman
2025-07-24  0:03   ` Hay, Joshua A
2025-07-24  9:14     ` Simon Horman

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=20250724092001.GI1150792@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=aleksandr.loktionov@intel.com \
    --cc=brianvv@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=joshua.a.hay@intel.com \
    --cc=lrizzo@google.com \
    --cc=madhu.chittim@intel.com \
    --cc=netdev@vger.kernel.org \
    /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).