DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, <dev@dpdk.org>
Cc: Ivan Malov <ivan.malov@oktetlabs.ru>
Subject: Re: [dpdk-dev] [PATCH 1/2] net/sfc: free mbufs in bulks on EF10 native Tx datapath reap
Date: Wed, 13 Sep 2017 12:31:13 +0300	[thread overview]
Message-ID: <f9bca090-69f4-8e0a-7247-084fe5286bd0@solarflare.com> (raw)
In-Reply-To: <84511c11-3e8d-e60e-f4a3-e6187f9e21d9@intel.com>

On 09/12/2017 09:26 PM, Ferruh Yigit wrote:
> On 9/8/2017 3:15 PM, Andrew Rybchenko wrote:
>> From: Ivan Malov <ivan.malov@oktetlabs.ru>
>>
>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> ---
>>   drivers/net/sfc/sfc_ef10_tx.c | 48 ++++++++++++++++++++++++++++++++++++-------
>>   drivers/net/sfc/sfc_tweak.h   |  3 +++
>>   2 files changed, 44 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/net/sfc/sfc_ef10_tx.c b/drivers/net/sfc/sfc_ef10_tx.c
>> index 182fc23..5127a7a 100644
>> --- a/drivers/net/sfc/sfc_ef10_tx.c
>> +++ b/drivers/net/sfc/sfc_ef10_tx.c
>> @@ -158,17 +158,35 @@ struct sfc_ef10_txq {
>>   	pending += sfc_ef10_tx_process_events(txq);
>>   
>>   	if (pending != completed) {
>> +		struct rte_mbuf *bulk[SFC_TX_REAP_BULK_SIZE];
>> +		unsigned int nb = 0;
>> +
>>   		do {
>>   			struct sfc_ef10_tx_sw_desc *txd;
>> +			struct rte_mbuf *m;
>>   
>>   			txd = &txq->sw_ring[completed & ptr_mask];
>> +			if (txd->mbuf == NULL)
>> +				continue;
>>   
>> -			if (txd->mbuf != NULL) {
>> -				rte_pktmbuf_free(txd->mbuf);
>> -				txd->mbuf = NULL;
>> +			m = rte_pktmbuf_prefree_seg(txd->mbuf);
>> +			txd->mbuf = NULL;
>> +			if (m == NULL)
>> +				continue;
>> +
>> +			if ((nb == RTE_DIM(bulk)) ||
>> +			    ((nb != 0) && (m->pool != bulk[0]->pool))) {
> ICC is giving warning [1] here, as far as I can see this is false
> positive but can you please double check in case I am missing something?

Yes, I think it is false positive.

> And unless if you don't see a way to convince icc without effecting
> performance, would you mind updating patch to ignore warning [2] ?

Thanks, done.

>
>
> [1]
> error #3656: variable "bulk" may be used before its value is set
>
> [2]
>    diff --git a/drivers/net/sfc/Makefile b/drivers/net/sfc/Makefile
>    index 57aa963ba..359314809 100644
>    --- a/drivers/net/sfc/Makefile
>    +++ b/drivers/net/sfc/Makefile
>    @@ -65,6 +65,7 @@ CFLAGS += -Wbad-function-cast
>     CFLAGS_BASE_DRIVER += -Wno-empty-body
>     else ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
>     CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
>    +CFLAGS_sfc_ef10_tx.o += -wd3656
>     endif
>
>     #

<...>

  reply	other threads:[~2017-09-13  9:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 14:15 Andrew Rybchenko
2017-09-08 14:15 ` [dpdk-dev] [PATCH 2/2] net/sfc: free mbufs in bulks on simple EF10 " Andrew Rybchenko
2017-09-12 18:28   ` Ferruh Yigit
2017-09-13  9:32     ` Andrew Rybchenko
2017-09-12 18:26 ` [dpdk-dev] [PATCH 1/2] net/sfc: free mbufs in bulks on EF10 native " Ferruh Yigit
2017-09-13  9:31   ` Andrew Rybchenko [this message]
2017-09-12 21:51 ` Stephen Hemminger
2017-09-13  6:27   ` Andrew Rybchenko
2017-09-13  9:33 ` [dpdk-dev] [PATCH v2 " Andrew Rybchenko
2017-09-13  9:33   ` [dpdk-dev] [PATCH v2 2/2] net/sfc: free mbufs in bulks on simple EF10 " Andrew Rybchenko
2017-09-15 11:12   ` [dpdk-dev] [PATCH v2 1/2] net/sfc: free mbufs in bulks on EF10 native " Ferruh Yigit

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=f9bca090-69f4-8e0a-7247-084fe5286bd0@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ivan.malov@oktetlabs.ru \
    /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).