DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Varghese, Vipin" <vipin.varghese@amd.com>
To: fengchengwen <fengchengwen@huawei.com>,
	dev@dpdk.org, konstantin.ananyev@huawei.com
Cc: ferruh.yigit@amd.com, neerav.parikh@amd.com
Subject: Re: [PATCH v2] app/dma-perf: calrify incorrect NUMA config
Date: Wed, 20 Mar 2024 06:44:47 +0530	[thread overview]
Message-ID: <e7093673-6c7f-43b2-811d-44fe3186eb08@amd.com> (raw)
In-Reply-To: <f2aee508-e3d6-436b-a820-e723bd95cced@amd.com>

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

Thank you Konstantin for the reply, Adding back the comments as it is 
not reflected the mail thread

<snipped>

>>> diff --git a/app/test-dma-perf/benchmark.c b/app/test-dma-perf/benchmark.c
>>> index 9b1f58c78c..b6d0dbe4c0 100644
>>> --- a/app/test-dma-perf/benchmark.c
>>> +++ b/app/test-dma-perf/benchmark.c
>>> @@ -311,9 +311,14 @@ setup_memory_env(struct test_configure *cfg, struct rte_mbuf ***srcs,
>>>        uint32_t nr_buf = cfg->nr_buf;
>>>
>>>        nr_sockets = rte_socket_count();
>>> -     if (cfg->src_numa_node >= nr_sockets ||
>>> -             cfg->dst_numa_node >= nr_sockets) {
>>> -             printf("Error: Source or destination numa exceeds the acture numa nodes.\n");
>>> +
>>> +     bool isSrcNumaIncorrect = (cfg->src_numa_node >= nr_sockets);
>>> +     bool isDstNumaIncorrect = (cfg->dst_numa_node >= nr_sockets);
>> The naming style needs to be adjusted, how about
>> bool is_src_numa_exceed, is_dst_numa_exceed;
>
> Ok, the naming convention used by me is `CamelCase`. One suggested 
> from your end is `snake_case`.
>
> Does DPDK has a constrain it can not use CamelCase.
>
[KA]

Please refer to:

https://doc.dpdk.org/guides/contributing/coding_style.html

In particular:
1.5.4. Variable Declarations
In declarations, do not put any whitespace between asterisks and adjacent tokens, except for tokens that are identifiers related to types. (These identifiers are the names of basic types, type qualifiers, and typedef-names other than the one being declared.) Separate these identifiers from asterisks using a single space.
For example:
int *x;         /* no space after asterisk */
int * const x;  /* space after asterisk when using a type qualifier */
·         All externally-visible variables should have an rte_ prefix in the name to avoid namespace collisions.
·         Do not use uppercase letters - either in the form of ALL_UPPERCASE, or CamelCase - in variable names. Lower-case letters and underscores only.

[VV] Thank you for the clarification, I mistook this is applicable only to `All externally-visible variables`and not for `static` functions.

> <snipped>

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

  parent reply	other threads:[~2024-03-20  1:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06 15:02 [PATCH] " Vipin Varghese
2024-03-07 13:19 ` fengchengwen
2024-03-07 16:06   ` Varghese, Vipin
2024-03-11  6:00 ` [PATCH v2] " Vipin Varghese
2024-03-12  2:10   ` fengchengwen
2024-03-12  3:48     ` Varghese, Vipin
2024-03-13  9:37       ` Konstantin Ananyev
2024-03-20  1:14       ` Varghese, Vipin [this message]
2024-03-20  1:40   ` [PATCH v3] " Vipin Varghese

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=e7093673-6c7f-43b2-811d-44fe3186eb08@amd.com \
    --to=vipin.varghese@amd.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=ferruh.yigit@amd.com \
    --cc=konstantin.ananyev@huawei.com \
    --cc=neerav.parikh@amd.com \
    /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).