From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH] pdump: initialize snaplen if enabled by device id
Date: Wed, 27 Oct 2021 11:08:47 -0700 [thread overview]
Message-ID: <20211027180847.66572-1-stephen@networkplumber.org> (raw)
In-Reply-To: <bug-840-3@http.bugs.dpdk.org>
If packet dump was enabled via pdump_enable_by_deviceid
the packet snapshot length was not being set.
Bugzilla ID: 840
Fixes: 10f726efe26c ("pdump: support pcapng and filtering")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/pdump/rte_pdump.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c
index 71602685d544..3086b2a1688b 100644
--- a/lib/pdump/rte_pdump.c
+++ b/lib/pdump/rte_pdump.c
@@ -631,6 +631,9 @@ pdump_enable_by_deviceid(const char *device_id, uint16_t queue,
if (ret < 0)
return ret;
+ if (snaplen == 0)
+ snaplen = UINT32_MAX;
+
return pdump_prepare_client_request(device_id, queue, flags, snaplen,
ENABLE, ring, mp, prm);
}
--
2.30.2
next parent reply other threads:[~2021-10-27 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-840-3@http.bugs.dpdk.org>
2021-10-27 18:08 ` Stephen Hemminger [this message]
2021-10-28 17:21 ` Stephen Hemminger
2021-10-31 23:39 ` 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=20211027180847.66572-1-stephen@networkplumber.org \
--to=stephen@networkplumber.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).