From: Thomas Monjalon <thomas@monjalon.net>
To: "Abdullah Ömer Yamaç" <omer.yamac@ceng.metu.edu.tr>
Cc: david.hunt@intel.com, dev@dpdk.org
Subject: Re: [PATCH v3] examples/distributor: update dynamic configuration
Date: Mon, 31 Oct 2022 16:03:25 +0100 [thread overview]
Message-ID: <12443427.VsHLxoZxqI@thomas> (raw)
In-Reply-To: <20220901140951.291068-1-omer.yamac@ceng.metu.edu.tr>
Hello,
Not a complete review, but few general comments to improve the patch below:
01/09/2022 16:09, Abdullah Ömer Yamaç:
> In this patch,
> * It is possible to switch the running mode of the distributor
> using the command line argument.
> * With "-c" parameter, you can run RX and Distributor
> on the same core.
> * Without "-c" parameter, you can run RX and Distributor
> on the different core.
> * Consecutive termination of the lcores fixed.
> The termination order was wrong, and you couldn't terminate the
> application while traffic was capturing. The current order is
> RX -> Distributor -> TX -> Workers
> * When "-c" parameter is active, the wasted distributor core is
> also deactivated in the main function.
Please could you make clear what was the issue,
and what was changed in the commit message?
> -#if 0
It's good to remove such thing.
Dead code should not exist.
> + /*
> + * Swap the following two lines if you want the rx traffic
> + * to go directly to tx, no distribution.
> + */
In DPDK, it is preferred to use uppercase Rx and Tx.
> + struct rte_ring *out_ring = p->rx_dist_ring;
> + /* struct rte_ring *out_ring = p->dist_tx_ring; */
This line is dead code, please remove.
> + if (!pd)
It is preferred to not use boolean operator with pointer.
Explicit comparison is encouraged: pd == NULL
> - rte_free(pd);
> + if (pd)
> + rte_free(pd);
This check is useless because redundant with rte_free behaviour.
next prev parent reply other threads:[~2022-10-31 15:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-21 21:13 [PATCH] " Abdullah Ömer Yamaç
2022-06-28 19:54 ` [PATCH v2] " Abdullah Ömer Yamaç
2022-09-01 10:58 ` Hunt, David
2022-09-02 5:20 ` Omer Yamac
2022-09-02 8:37 ` Hunt, David
2022-09-01 14:09 ` [PATCH v3] " Abdullah Ömer Yamaç
2022-09-02 9:12 ` Hunt, David
2022-10-31 15:03 ` Thomas Monjalon [this message]
2022-11-24 20:05 ` [PATCH v4] examples/distributor: remove dead code and renaming Rx,Tx Abdullah Ömer Yamaç
2022-11-24 20:17 ` [PATCH v5] " Abdullah Ömer Yamaç
2022-11-24 20:22 ` [PATCH v6] " Abdullah Ömer Yamaç
2022-11-24 20:31 ` [PATCH v7] " Abdullah Ömer Yamaç
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=12443427.VsHLxoZxqI@thomas \
--to=thomas@monjalon.net \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
--cc=omer.yamac@ceng.metu.edu.tr \
/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).