Skip to contentSkip to conversation

pdump: initialize snaplen if enabled by device id

PATCH Applied Stephen Hemminger 2 participants 3 messages Oct 27, 2021 – Oct 31, 2021 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 pdump: initialize snaplen if enabled by device id

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")
---
 lib/pdump/rte_pdump.c | 3 +++
 1 file changed, 3 insertions(+)
lib/pdump/rte_pdump.c +3 -0
index 71602685d544..3086b2a1688b 100644
@@ -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);
 }
Signature · 1 line
2.30.2
#2 lore raw
Quoted 16 lines · On Wed, 27 Oct 2021 11:08:47 -0700 Stephen Hemminger…

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")
---
 lib/pdump/rte_pdump.c | 3 +++
 1 file changed, 3 insertions(+)
lib/pdump/rte_pdump.c +0 -0
index 71602685d544..3086b2a1688b 100644

lib/pdump/rte_pdump.c pdump_enable_by_deviceid(const char *device_id, uint16_t queue, · line 639

Quoted 9 lines
lib/pdump/rte_pdump.c +3 -0
@@ -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);
 }

There appears to be bug in the CI system reporting bogus failure on this patch.