DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Andrew Boyer <aboyer@pensando.io>
Cc: dev@dpdk.org, Alfredo Cardigliano <cardigliano@ntop.org>
Subject: Re: [dpdk-dev] [PATCH v3 9/9] net/ionic: minor logging fixups
Date: Thu, 10 Dec 2020 09:58:28 +0000	[thread overview]
Message-ID: <d67f6b60-7358-fedf-e913-b4206293b6ab@intel.com> (raw)
In-Reply-To: <3571A75C-4268-469F-BEE9-6AE086182E60@pensando.io>

On 12/9/2020 7:26 PM, Andrew Boyer wrote:
> 
> 
>> On Dec 9, 2020, at 10:42 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>>
>> On 12/9/2020 2:45 PM, Andrew Boyer wrote:
>>>> On Dec 9, 2020, at 8:47 AM, Ferruh Yigit <ferruh.yigit@intel.com <mailto:ferruh.yigit@intel.com>> wrote:
>>>>
>>>> On 12/4/2020 8:16 PM, Andrew Boyer wrote:
>>>>> Expose ionic_opcode_to_str() so it can be used for dev cmds, too.
>>>>> Store the device name in struct adapter.
>>>>> Switch to memcpy() to work around gcc false positives.
>>>>> Signed-off-by: Andrew Boyer <aboyer@pensando.io <mailto:aboyer@pensando.io>>
>>>>> ---
>>>>>   drivers/net/ionic/ionic.h         |  1 +
>>>>>   drivers/net/ionic/ionic_dev.c     |  5 +++
>>>>>   drivers/net/ionic/ionic_dev.h     |  2 +
>>>>>   drivers/net/ionic/ionic_ethdev.c  |  4 +-
>>>>>   drivers/net/ionic/ionic_lif.c     | 68 ++++++++++++++++---------------
>>>>>   drivers/net/ionic/ionic_mac_api.c |  4 +-
>>>>>   drivers/net/ionic/ionic_main.c    | 32 ++++++++-------
>>>>>   drivers/net/ionic/ionic_rxtx.c    | 41 ++++++++-----------
>>>>>   8 files changed, 84 insertions(+), 73 deletions(-)
>>>>
>>>> <...>
>>>>
>>>>> @@ -1217,12 +1221,11 @@ ionic_lif_notifyq_init(struct ionic_lif *lif)
>>>>> }
>>>>> };
>>>>>   -IONIC_PRINT(DEBUG, "notifyq_init.index %d",
>>>>> -ctx.cmd.q_init.index);
>>>>> -IONIC_PRINT(DEBUG, "notifyq_init.ring_base 0x%" PRIx64 "",
>>>>> -ctx.cmd.q_init.ring_base);
>>>>> +IONIC_PRINT(DEBUG, "notifyq_init.index %d", q->index);
>>>>> +IONIC_PRINT(DEBUG, "notifyq_init.ring_base %#jx", q->base_pa);
>>>>
>>>> There are lots of similar PRIx64 -> %j change in this patch,
>>>> '%j' specifier is for 'intmax_t' and which seems 64bit storage, so this should work with 64 bit variable 'q->base_pa',
>>>> but the variable is explicitly uint64_t why replacing 'PRIx64' usage which is correct and more common usage in the DPDK? Why ionic is want to do this in its own way, I am not clear of the motivation of these changes really, can you please clarify?
>>> As best I know, I am following the (two different) contribute guidelines pages, both of which direct submitters to run checkpatch. One of things checkpatch flags is lines over 80 columns. Many of these lines were over 80 columns or oddly broken to meet the 80 column limit.
>>> %j is used in many other places in this PMD - as originally written by Alfredo, one of your core contributors. If we are allowed to use %j, I want to, since I much prefer it to the hideous PRIx64.
>>
>> %j is accepted, that is not an issue. But you are making an active effort to convert PRIx64 -> %j, which is very unnecessary in my opinion.
> 
> Ferruh, I made these changes months ago. Changing them back now is going to take at least a few hours - many other changes are layered on top.
> 
>> 80 column limit is not for log strings, but even if you are fixing them that is different thing from the PRIx64 -> %j conversion, you can keep PRIx64 and stay in 80 columns, and indeed lots of the cases the column limit seems not an issue at all.
>>
>> Andrew, this is a driver currently marked as 'UNMAINTAINED', I kindly suggest focusing your 70+ functional changes instead of this PRIx64 -> %j syntax changes, but it is all up to you of course.
> 
> Apparently it is not up to me, though, is it? I would very much appreciate if you would respond to my request for a meeting, at any time you find convenient.
> 
> When I add new log messages in the future (including adding to these lists of FW values and response codes), should I use PRIx64 or %jx?

for the fixed size variables, like uint64_t or uint32_t, better to use PRInNN

> Should I expect your objection to a mix of PRIx64 and %jx in the same paragraph?
> Am I allowed to change from PRIx64 to %jx if I am also modifying the text or the value logged?
> 

If there is no real reason to change, like unless it is wrong/broken, please 
don't change them. So I think all PRIx64 -> %j changes in this patch can be dropped.

> This is going to involve respinning all of those functional patches, and since I am not a mind-reader it seems likely that this is going to take years.
> 

Discussing may take time, don't get down by it, it will be OK, it won't take 
years ;)
And I am aware rebasing can be hassle, but it can't be justification of a 
change, this is side affect of accumulating too many patches in the backlog 
unfortunately.

>>>> <...>
>>>>
>>>>> @@ -1448,8 +1450,9 @@ ionic_lif_set_name(struct ionic_lif *lif)
>>>>> },
>>>>> };
>>>>>   -snprintf(ctx.cmd.lif_setattr.name, sizeof(ctx.cmd.lif_setattr.name),
>>>>> -"%d", lif->port_id);
>>>>> +/* FW is responsible for NULL terminating this field */
>>>>> +memcpy(ctx.cmd.lif_setattr.name, lif->name,
>>>>> +sizeof(ctx.cmd.lif_setattr.name));
>>>>
>>>> Even though FW may be guaranting the string will be null terminated, won't it be nice to provide input as null terminated if this is the expectation?
>>> No, that is not the expectation. We prefer it to be this way.
>>
>> It is know that FW will add NULL terminate the string but you "prefer" to provide 'name' without NULL termination. Why?
>> "we prefer it to be this way" is not a good justification, please either change or explain in a logical way.
> 
> I will set the last character to NULL if that is what you want. I do not see how it serves any purpose.
> 
> -Andrew
> 


  reply	other threads:[~2020-12-10  9:58 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 18:35 [dpdk-dev] [PATCH 0/8] net/ionic: minor updates and documentation Andrew Boyer
2020-11-02 18:35 ` [dpdk-dev] [PATCH 1/8] ionic: update documentation and MAINTAINERS Andrew Boyer
2020-11-03 12:35   ` Ferruh Yigit
2020-11-03 14:43     ` Andrew Boyer
2020-11-02 18:35 ` [dpdk-dev] [PATCH 2/8] ionic: connect to the meson build system Andrew Boyer
2020-11-02 18:35 ` [dpdk-dev] [PATCH 3/8] ionic: update ionic_if.h to the latest version Andrew Boyer
2020-11-03 12:44   ` Ferruh Yigit
2020-11-03 14:36     ` Andrew Boyer
2020-11-03 15:55       ` Ferruh Yigit
2020-11-02 18:35 ` [dpdk-dev] [PATCH 4/8] ionic: check for devcmd/admincmd completion more frequently Andrew Boyer
2020-11-02 18:35 ` [dpdk-dev] [PATCH 5/8] ionic: remove some unused fields Andrew Boyer
2020-11-02 18:35 ` [dpdk-dev] [PATCH 6/8] ionic: convert 'deferred' boolean to a flag bit Andrew Boyer
2020-11-02 18:35 ` [dpdk-dev] [PATCH 7/8] ionic: warn if RTE tries to enable loopback mode Andrew Boyer
2020-11-03 12:52   ` Ferruh Yigit
2020-11-02 18:35 ` [dpdk-dev] [PATCH 8/8] ionic: nits - whitespace, logging, helper variables Andrew Boyer
2020-11-03 13:06   ` Ferruh Yigit
2020-11-03 14:00     ` Andrew Boyer
2020-11-03 14:02       ` Ferruh Yigit
2020-11-03 13:11 ` [dpdk-dev] [PATCH 0/8] net/ionic: minor updates and documentation Ferruh Yigit
2020-11-03 14:45   ` Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 0/9] " Andrew Boyer
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 " Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 " Andrew Boyer
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 " Andrew Boyer
2020-12-10 12:31         ` Ferruh Yigit
2020-12-10 14:44           ` [dpdk-dev] Patchworks " Andrew Boyer
2020-12-10 15:06             ` Ferruh Yigit
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 1/9] net/ionic: connect ionic to the build system Andrew Boyer
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 2/9] net/ionic: update interface file to the latest version Andrew Boyer
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 3/9] net/ionic: update documentation and MAINTAINERS Andrew Boyer
2020-12-10 12:01         ` Ferruh Yigit
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 4/9] net/ionic: check for cmd completion more frequently Andrew Boyer
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 5/9] net/ionic: remove some unused fields Andrew Boyer
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 6/9] net/ionic: convert 'deferred' boolean to a flag bit Andrew Boyer
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 7/9] net/ionic: warn if loopback mode is requested Andrew Boyer
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 8/9] net/ionic: minor refactorings and helper variables Andrew Boyer
2020-12-10  2:57       ` [dpdk-dev] [PATCH v5 9/9] net/ionic: minor logging fixups Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 1/9] net/ionic: connect ionic to the build system Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 2/9] net/ionic: update interface file to the latest version Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 3/9] net/ionic: update documentation and MAINTAINERS Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 4/9] net/ionic: check for cmd completion more frequently Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 5/9] net/ionic: remove some unused fields Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 6/9] net/ionic: convert 'deferred' boolean to a flag bit Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 7/9] net/ionic: warn if loopback mode is requested Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 8/9] net/ionic: minor refactorings and helper variables Andrew Boyer
2020-12-10  2:07     ` [dpdk-dev] [PATCH v4 9/9] net/ionic: minor logging fixups Andrew Boyer
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 1/9] net/ionic: connect ionic to the build system Andrew Boyer
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 2/9] net/ionic: update interface file to the latest version Andrew Boyer
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 3/9] net/ionic: update documentation and MAINTAINERS Andrew Boyer
2020-12-09 12:03     ` Ferruh Yigit
2020-12-09 14:36       ` Andrew Boyer
2020-12-09 15:24         ` Ferruh Yigit
2020-12-09 16:24           ` Andrew Boyer
2020-12-09 17:15             ` Ferruh Yigit
2020-12-09 19:05               ` Andrew Boyer
2020-12-10  9:23                 ` Ferruh Yigit
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 4/9] net/ionic: check for cmd completion more frequently Andrew Boyer
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 5/9] net/ionic: remove some unused fields Andrew Boyer
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 6/9] net/ionic: convert 'deferred' boolean to a flag bit Andrew Boyer
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 7/9] net/ionic: warn if loopback mode is requested Andrew Boyer
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 8/9] net/ionic: minor refactorings and helper variables Andrew Boyer
2020-12-09 13:04     ` Ferruh Yigit
2020-12-09 14:39       ` Andrew Boyer
2020-12-09 15:25         ` Ferruh Yigit
2020-12-04 20:16   ` [dpdk-dev] [PATCH v3 9/9] net/ionic: minor logging fixups Andrew Boyer
2020-12-09 13:47     ` Ferruh Yigit
2020-12-09 14:45       ` Andrew Boyer
2020-12-09 15:42         ` Ferruh Yigit
2020-12-09 19:26           ` Andrew Boyer
2020-12-10  9:58             ` Ferruh Yigit [this message]
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 1/9] net/ionic: connect ionic to the build system Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 2/9] net/ionic: update interface file to the latest version Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 3/9] net/ionic: update documentation and MAINTAINERS Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 4/9] net/ionic: check for cmd completion more frequently Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 5/9] net/ionic: remove some unused fields Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 6/9] net/ionic: convert 'deferred' boolean to a flag bit Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 7/9] net/ionic: warn if loopback mode is requested Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 8/9] net/ionic: minor refactorings and helper variables Andrew Boyer
2020-12-03 20:34 ` [dpdk-dev] [PATCH v2 9/9] net/ionic: minor logging fixups Andrew Boyer

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=d67f6b60-7358-fedf-e913-b4206293b6ab@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=aboyer@pensando.io \
    --cc=cardigliano@ntop.org \
    --cc=dev@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).