From: Yuan Wang <yuanx.wang@intel.com>
To: Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>
Cc: dev@dpdk.org, xuan.ding@intel.com, yaqi.tang@intel.com,
Yuan Wang <yuanx.wang@intel.com>
Subject: [PATCH] app/testpmd: remove useless check
Date: Wed, 12 Oct 2022 22:29:15 +0800 [thread overview]
Message-ID: <20221012142915.553392-1-yuanx.wang@intel.com> (raw)
Protocol header sequence checking is supported in the ethdev library,
the application does not need to do it again.
Coverity issue: 381396
Fixes: 52e2e7edcf48 ("app/testpmd: add protocol-based buffer split")
Signed-off-by: Yuan Wang <yuanx.wang@intel.com>
---
app/test-pmd/cmdline.c | 6 ++----
app/test-pmd/parameters.c | 2 +-
app/test-pmd/testpmd.h | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 17be2de402..29e4b2329b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3440,7 +3440,7 @@ get_ptype(char *value)
unsigned int
parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,
- unsigned int *parsed_items, int check_hdrs_sequence)
+ unsigned int *parsed_items)
{
unsigned int nb_item;
char *cur;
@@ -3462,8 +3462,6 @@ parse_hdrs_list(const char *str, const char *item_name, unsigned int max_items,
fprintf(stderr, "Number of %s = %u > %u (maximum items)\n",
item_name, nb_item + 1, max_items);
free(str2);
- if (!check_hdrs_sequence)
- return nb_item;
return nb_item;
}
@@ -3854,7 +3852,7 @@ cmd_set_rxhdrs_parsed(void *parsed_result,
res = parsed_result;
nb_segs = parse_hdrs_list(res->values, "segment hdrs",
- MAX_SEGS_BUFFER_SPLIT, seg_hdrs, 0);
+ MAX_SEGS_BUFFER_SPLIT, seg_hdrs);
if (nb_segs > 0)
set_rx_pkt_hdrs(seg_hdrs, nb_segs);
cmd_reconfig_device_queue(RTE_PORT_ALL, 0, 1);
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index ff760460ec..5b305c833c 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -1272,7 +1272,7 @@ launch_args_parse(int argc, char** argv)
nb_segs = parse_hdrs_list
(optarg, "rxpkt segments",
MAX_SEGS_BUFFER_SPLIT,
- seg_hdrs, 0);
+ seg_hdrs);
if (nb_segs > 0)
set_rx_pkt_hdrs(seg_hdrs, nb_segs);
else
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index e65be323b8..0b99339df8 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -854,7 +854,7 @@ unsigned int parse_item_list(const char *str, const char *item_name,
unsigned int *parsed_items, int check_unique_values);
unsigned int parse_hdrs_list(const char *str, const char *item_name,
unsigned int max_item,
- unsigned int *parsed_items, int check_unique_values);
+ unsigned int *parsed_items);
void launch_args_parse(int argc, char** argv);
void cmd_reconfig_device_queue(portid_t id, uint8_t dev, uint8_t queue);
void cmdline_read_from_file(const char *filename);
--
2.25.1
next reply other threads:[~2022-10-12 6:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 14:29 Yuan Wang [this message]
2022-10-14 9:37 ` Singh, Aman Deep
2022-10-14 9:52 ` Wang, YuanX
2022-10-17 8:36 ` Andrew Rybchenko
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=20221012142915.553392-1-yuanx.wang@intel.com \
--to=yuanx.wang@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=dev@dpdk.org \
--cc=xuan.ding@intel.com \
--cc=yaqi.tang@intel.com \
--cc=yuying.zhang@intel.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).