DPDK patches and discussions
 help / color / mirror / Atom feed
From: Aaron Conole <aconole@redhat.com>
To: "Burakov\, Anatoly" <anatoly.burakov@intel.com>
Cc: dev@dpdk.org, Konstantin Ananyev <konstantin.ananyev@intel.com>,
	Pavan Nikhilesh <pbhagavatula@marvell.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	David Marchand <david.marchand@redhat.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Subject: Re: [dpdk-dev] [PATCH v5 3/3] ipfrag: add unit test case
Date: Mon, 20 Apr 2020 13:34:39 -0400	[thread overview]
Message-ID: <f7tlfmqrrgw.fsf@dhcp-25.97.bos.redhat.com> (raw)
In-Reply-To: <db8bffd8-0117-8a2c-a0ac-9dd8b5543399@intel.com> (Anatoly Burakov's message of "Mon, 20 Apr 2020 17:03:43 +0100")

"Burakov, Anatoly" <anatoly.burakov@intel.com> writes:

> On 17-Apr-20 2:14 PM, Aaron Conole wrote:
>> Initial IP fragmentation unit test.
>>
>> Signed-off-by: Aaron Conole <aconole@redhat.com>
>> ---
>
> <snip>
>
>> +	if (!pkt_pool)
>> +		pkt_pool = rte_pktmbuf_pool_create("FRAG_MBUF_POOL",
>> +						   NUM_MBUFS, BURST, 0,
>> +						   RTE_MBUF_DEFAULT_BUF_SIZE,
>> +						   SOCKET_ID_ANY);
>> +	if (pkt_pool == NULL) {
>> +		printf("%s: Error creating pkt mempool\n", __func__);
>> +		goto bad_setup;
>> +	}
>> +
>> +	if (!direct_pool)
>> +		direct_pool = rte_pktmbuf_pool_create("FRAG_D_MBUF_POOL",
>> +						      NUM_MBUFS, BURST, 0,
>> +						      RTE_MBUF_DEFAULT_BUF_SIZE,
>> +						      SOCKET_ID_ANY);
>> +	if (!direct_pool) {
>> +		printf("%s: Error creating direct mempool\n", __func__);
>> +		goto bad_setup;
>> +	}
>> +
>> +	if (!indirect_pool)
>> +		indirect_pool = rte_pktmbuf_pool_create("FRAG_I_MBUF_POOL",
>> +							NUM_MBUFS, BURST, 0,
>> +							0, SOCKET_ID_ANY);
>> +	if (!indirect_pool) {
>> +		printf("%s: Error creating indirect mempool\n", __func__);
>> +		goto bad_setup;
>> +	}
>
> Nitpicking, but i believe the coding style guide discourages using
> boolean syntax for anything other than boolean checks, and it is
> better to use a more explicit `if (x == NULL)`.

I see, it does.  Looking at the code-base, I see it mixed all over, some
places using 'if (!ptr)' and others 'if (ptr == NULL)'. Actually, even
in the flow_filtering.rst doc, it implies that if (!ptr) is acceptable.

Since I'm spinning a v6 with the constants, I'll fold this change in -
maybe it makes sense to clean it up everywhere to help mitigate the
confusion (for example, I most recently did work in the eal and the !ptr
is all over there).  WDYT?


  reply	other threads:[~2020-04-20 17:35 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 16:07 [dpdk-dev] [PATCH 0/4] ip_frag: add a unit test for fragmentation Aaron Conole
2020-03-31 16:07 ` [dpdk-dev] [PATCH 1/4] ip_frag: ensure minimum v4 fragmentation length Aaron Conole
2020-03-31 16:07 ` [dpdk-dev] [PATCH 2/4] ip_frag: ensure minimum v6 " Aaron Conole
2020-03-31 16:07 ` [dpdk-dev] [PATCH 3/4] ip_frag: ipv6 fragments must not be resubmitted to fragmentation Aaron Conole
2020-03-31 16:07 ` [dpdk-dev] [PATCH 4/4] ipfrag: add unit test case Aaron Conole
     [not found]   ` <20200331200715.13751-1-robot@bytheb.org>
2020-03-31 21:12     ` [dpdk-dev] |WARNING| pw67494 " Aaron Conole
2020-04-01 13:18 ` [dpdk-dev] [PATCH v2 0/4] ip_frag: add a unit test for fragmentation Aaron Conole
2020-04-01 13:18   ` [dpdk-dev] [PATCH v2 1/4] ip_frag: ensure minimum v4 fragmentation length Aaron Conole
2020-04-01 13:18   ` [dpdk-dev] [PATCH v2 2/4] ip_frag: ensure minimum v6 " Aaron Conole
2020-04-01 13:18   ` [dpdk-dev] [PATCH v2 3/4] ip_frag: ipv6 fragments must not be resubmitted to fragmentation Aaron Conole
2020-04-01 13:18   ` [dpdk-dev] [PATCH v2 4/4] ipfrag: add unit test case Aaron Conole
2020-04-01 18:39   ` [dpdk-dev] [PATCH v3 0/4] ip_frag: add a unit test for fragmentation Aaron Conole
2020-04-01 18:39     ` [dpdk-dev] [PATCH v3 1/4] ip_frag: ensure minimum v4 fragmentation length Aaron Conole
2020-04-07 11:10       ` Ananyev, Konstantin
2020-04-07 12:52         ` Aaron Conole
2020-04-07 14:14           ` Ananyev, Konstantin
2020-04-07 18:41             ` Aaron Conole
2020-04-08 12:37               ` Ananyev, Konstantin
2020-04-08 15:45                 ` Aaron Conole
2020-04-01 18:39     ` [dpdk-dev] [PATCH v3 2/4] ip_frag: ensure minimum v6 " Aaron Conole
2020-04-07 10:48       ` Ananyev, Konstantin
2020-04-01 18:39     ` [dpdk-dev] [PATCH v3 3/4] ip_frag: ipv6 fragments must not be resubmitted to fragmentation Aaron Conole
2020-04-07 10:43       ` Ananyev, Konstantin
2020-04-07 12:40         ` Aaron Conole
2020-04-01 18:39     ` [dpdk-dev] [PATCH v3 4/4] ipfrag: add unit test case Aaron Conole
2020-04-04 15:58       ` Pavan Nikhilesh Bhagavatula
2020-04-15 17:25     ` [dpdk-dev] [PATCH v4 0/3] ip_frag: add a unit test for fragmentation Aaron Conole
2020-04-15 17:25       ` [dpdk-dev] [PATCH v4 1/3] ip_frag: ensure minimum v4 fragmentation length Aaron Conole
2020-04-17 11:52         ` Lukasz Wojciechowski
2020-04-15 17:25       ` [dpdk-dev] [PATCH v4 2/3] ip_frag: ensure minimum v6 " Aaron Conole
2020-04-17 11:52         ` Lukasz Wojciechowski
2020-04-15 17:25       ` [dpdk-dev] [PATCH v4 3/3] ipfrag: add unit test case Aaron Conole
2020-04-16 15:30         ` Lukasz Wojciechowski
2020-04-16 18:52           ` Aaron Conole
2020-04-17 13:14       ` [dpdk-dev] [PATCH v5 0/3] ip_frag: add a unit test for fragmentation Aaron Conole
2020-04-17 13:14         ` [dpdk-dev] [PATCH v5 1/3] ip_frag: ensure minimum v4 fragmentation length Aaron Conole
2020-04-20 12:50           ` Ananyev, Konstantin
2020-04-20 15:24             ` Aaron Conole
2020-04-17 13:14         ` [dpdk-dev] [PATCH v5 2/3] ip_frag: ensure minimum v6 " Aaron Conole
2020-04-20 12:53           ` Ananyev, Konstantin
2020-04-20 15:26             ` Aaron Conole
2020-04-20 15:43               ` Ananyev, Konstantin
2020-04-17 13:14         ` [dpdk-dev] [PATCH v5 3/3] ipfrag: add unit test case Aaron Conole
2020-04-17 14:14           ` Lukasz Wojciechowski
2020-04-20 16:03           ` Burakov, Anatoly
2020-04-20 17:34             ` Aaron Conole [this message]
2020-04-25 12:18               ` Thomas Monjalon
2020-04-20 19:25         ` [dpdk-dev] [PATCH v6 0/3] ip_frag: add a unit test for fragmentation Aaron Conole
2020-04-20 19:25           ` [dpdk-dev] [PATCH v6 1/3] ip_frag: ensure minimum v4 fragmentation length Aaron Conole
2020-04-21 11:04             ` Lukasz Wojciechowski
2020-04-20 19:25           ` [dpdk-dev] [PATCH v6 2/3] ip_frag: ensure minimum v6 " Aaron Conole
2020-04-21 11:04             ` Lukasz Wojciechowski
2020-04-20 19:25           ` [dpdk-dev] [PATCH v6 3/3] ipfrag: add unit test case Aaron Conole
2020-04-21 11:03             ` Lukasz Wojciechowski
2020-04-25 13:16           ` [dpdk-dev] [PATCH v6 0/3] ip_frag: add a unit test for fragmentation Thomas Monjalon

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=f7tlfmqrrgw.fsf@dhcp-25.97.bos.redhat.com \
    --to=aconole@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=l.wojciechow@partner.samsung.com \
    --cc=pbhagavatula@marvell.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).