From: Stephen Hemminger Date: Wed, 27 Oct 2021 18:08:47 +0000 (-0700) Subject: pdump: fix packet snapshot length initialization X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b2be63b55ab086c52c082d5c0b2b01fffbc48326;p=dpdk.git pdump: fix packet snapshot length initialization 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 --- diff --git a/lib/pdump/rte_pdump.c b/lib/pdump/rte_pdump.c index 71602685d5..3086b2a168 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); }