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>, <stable@dpdk.org>
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] net/sfc: specify correct scale table size on Rx start
Date: Wed, 30 Aug 2017 12:16:12 +0300	[thread overview]
Message-ID: <83cf65ea-7e81-d683-0c56-eec635cf8c95@solarflare.com> (raw)
In-Reply-To: <a8c48c44-3ca2-7d1d-6a29-0c8eaacfda14@intel.com>

On 08/29/2017 08:03 PM, Ferruh Yigit wrote:
> On 8/28/2017 1:53 PM, Andrew Rybchenko wrote:
>> From: Ivan Malov <ivan.malov@oktetlabs.ru>
>>
>> efx_rx_scale_tbl_set() takes the number of entries in the scale table
>> to be set, not the size of the table in bytes; currently this bug does
>> not make any damage since the size argument is used to wrap the loop
>> on the input table when filling in an MCDI request in case if the table
>> size in the MCDI request is larger then one provided by the user,
>> and MCDI scale table size is the same as the size of the table provided
>> by the driver; this patch brings a fix for the bug
>>
>> Fixes: 4ec1fc3ba881 ("net/sfc: add basic stubs for RSS support on driver attach")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>> ---
>>   drivers/net/sfc/sfc_rx.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c
>> index 1bf8644..364f718 100644
>> --- a/drivers/net/sfc/sfc_rx.c
>> +++ b/drivers/net/sfc/sfc_rx.c
>> @@ -1068,7 +1068,7 @@ struct sfc_dp_rx sfc_efx_rx = {
>>   			goto finish;
>>   
> It is not shown in this patch, but there is "sizeof(sa->rss_key)" usage
> here, since its type is uint8_t, it is not wrong, but it can be good to
> change that one too to RTE_DIM() both to show the intent and to be safe
> if in the future type updated... But this is your call to update or not.

In theory API annotation in efx.h says __in_ecount(n), so it should be 
element
count and RTE_DIM() should be used. However, the RSS hash key semantics is
just a byte string and I think it would be more correct to annotate it as
__in_bcount(n) regardless element size. I'll discuss it internally, but 
right now
I would prefer to keep it as is just to avoid code shuffling.

Thanks,
Andrew.

  parent reply	other threads:[~2017-08-30  9:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-28 12:53 [dpdk-dev] " Andrew Rybchenko
2017-08-29 17:03 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2017-08-30  7:24   ` Ferruh Yigit
2017-08-30  9:16   ` Andrew Rybchenko [this message]
2017-08-30 13:47 ` 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=83cf65ea-7e81-d683-0c56-eec635cf8c95@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ivan.malov@oktetlabs.ru \
    --cc=stable@dpdk.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).