DPDK patches and discussions
 help / color / mirror / Atom feed
From: Levend Sayar <levendsayar@gmail.com>
To: "Guo, Junfeng" <junfeng.guo@intel.com>
Cc: Ferruh Yigit <ferruh.yigit@amd.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update
Date: Thu, 23 Feb 2023 09:29:05 +0300	[thread overview]
Message-ID: <D41546A1-901F-4F73-A60A-48690824E552@gmail.com> (raw)
In-Reply-To: <DM6PR11MB3723CD9BCBA60A758EF630C8E7AB9@DM6PR11MB3723.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 2446 bytes --]

Thanks Junfeng for acknowledging.

> On 23 Feb 2023, at 07:34, Guo, Junfeng <junfeng.guo@intel.com> wrote:
> 
> Acked-by: Junfeng Guo <junfeng.guo@intel.com <mailto:junfeng.guo@intel.com>>
> 
>> -----Original Message-----
>> From: Ferruh Yigit <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>>
>> Sent: Tuesday, February 21, 2023 18:31
>> To: Levend Sayar <levendsayar@gmail.com <mailto:levendsayar@gmail.com>>
>> Cc: Guo, Junfeng <junfeng.guo@intel.com <mailto:junfeng.guo@intel.com>>; dev@dpdk.org <mailto:dev@dpdk.org>; Stephen
>> Hemminger <stephen@networkplumber.org <mailto:stephen@networkplumber.org>>
>> Subject: Re: [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update
>> 
>> On 2/21/2023 10:07 AM, Levend Sayar wrote:
>>> Not only this if, there can be many places to add such branch prediction
>> helpers
>>> On the gve pmd code.
>>> 
>>> I preferred to patch only the bug here and not used unlikely to minimize
>> noise.
>>> 
>>> Imho, adding likely/unlikely to all gve pmd code can be topic of another
>> patch maybe.
> 
> Agreed. 
> Adding likely/unlikely is more related to the performance with compiler.
> This can be an optimization for performance. Thanks!
> 
>>> 
>> 
>> ack, sounds reasonable to me
>> 
>>> Levend
>>> 
>>>> On 21 Feb 2023, at 01:57, Ferruh Yigit <ferruh.yigit@amd.com> wrote:
>>>> 
>>>> On 2/20/2023 9:11 PM, Levend Sayar wrote:
>>>>> rx no_mbufs stats counter update is added for another error case.
>>>>> 
>>>>> Fixes: 4f6b1dd8240c ("net/gve: support basic statistics")
>>>>> Cc: junfeng.guo@intel.com
>>>>> 
>>>>> Signed-off-by: Levend Sayar <levendsayar@gmail.com>
>>>>> ---
>>>>> drivers/net/gve/gve_rx.c | 5 ++++-
>>>>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>>>> 
>>>>> diff --git a/drivers/net/gve/gve_rx.c b/drivers/net/gve/gve_rx.c
>>>>> index 66fbcf3930..d346efa57c 100644
>>>>> --- a/drivers/net/gve/gve_rx.c
>>>>> +++ b/drivers/net/gve/gve_rx.c
>>>>> @@ -61,7 +61,10 @@ gve_rx_refill(struct gve_rx_queue *rxq)
>>>>> 					break;
>>>>> 				rxq->sw_ring[idx + i] = nmb;
>>>>> 			}
>>>>> -			nb_alloc = i;
>>>>> +			if (i != nb_alloc) {
>>>>> +				rxq->no_mbufs += nb_alloc - i;
>>>>> +				nb_alloc = i;
>>>>> +			}
>>>>> 		}
>>>>> 		rxq->nb_avail -= nb_alloc;
>>>>> 		next_avail += nb_alloc;
>>>> 
>>>> Looks good to me,
>>>> there was a comment from Stephen to add 'unlikely()', is that issue
>>>> resolved?


[-- Attachment #2: Type: text/html, Size: 10475 bytes --]

  reply	other threads:[~2023-02-23  6:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-19  0:30 [PATCH] " Levend Sayar
2023-02-19 17:35 ` Stephen Hemminger
2023-02-19 20:43   ` Levend Sayar
2023-02-19 22:59     ` Stephen Hemminger
2023-02-20 15:19 ` [PATCH v2] " Levend Sayar
2023-02-20 21:11   ` [PATCH v3 1/2] " Levend Sayar
2023-02-20 21:11     ` [PATCH v3 2/2] net/gve: add Rx/Tx queue stats as extended stats Levend Sayar
2023-02-20 22:57       ` Ferruh Yigit
2023-02-21 11:11         ` Levend Sayar
2023-02-21 14:13       ` [PATCH v4] " Levend Sayar
2023-02-21 14:18         ` [PATCH v5] " Levend Sayar
2023-02-21 15:58           ` Ferruh Yigit
2023-02-21 16:44             ` Levend Sayar
2023-02-23  2:49               ` Guo, Junfeng
2023-02-23  6:28                 ` Levend Sayar
2023-02-23 11:09                 ` Ferruh Yigit
2023-02-23 12:30                   ` Levend Sayar
2023-02-20 22:57     ` [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update Ferruh Yigit
2023-02-21 10:07       ` Levend Sayar
2023-02-21 10:30         ` Ferruh Yigit
2023-02-23  4:34           ` Guo, Junfeng
2023-02-23  6:29             ` Levend Sayar [this message]
2023-02-23 11:10             ` Ferruh Yigit
2023-02-23 12:29               ` Levend Sayar
2023-02-21 15:58     ` Ferruh Yigit
2023-02-21 16:42       ` Levend Sayar

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=D41546A1-901F-4F73-A60A-48690824E552@gmail.com \
    --to=levendsayar@gmail.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=junfeng.guo@intel.com \
    --cc=stephen@networkplumber.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).