* A couple of patches for dumpcap
@ 2024-02-24 17:28 Isaac Boukris
2024-02-26 1:24 ` Stephen Hemminger
0 siblings, 1 reply; 2+ messages in thread
From: Isaac Boukris @ 2024-02-24 17:28 UTC (permalink / raw)
To: Stephen Hemminger, dev
[-- Attachment #1: Type: text/plain, Size: 42 bytes --]
Hi Stephen,
Please take a look.
Thanks!
[-- Attachment #2: dumpcap_fixes.patch --]
[-- Type: application/octet-stream, Size: 1620 bytes --]
From 3e32a62cb6ad1042d942a87fd9da813558c11532 Mon Sep 17 00:00:00 2001
From: Isaac Boukris <iboukris@gmail.com>
Date: Sat, 24 Feb 2024 15:00:44 +0200
Subject: [PATCH 1/2] dumpcap: disable promiscuous mode at exit
Signed-off-by: Isaac Boukris <iboukris@gmail.com>
---
app/dumpcap/main.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index d57db0589a..88cec43086 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -830,11 +830,12 @@ static void enable_pdump(struct rte_ring *r, struct rte_mempool *mp)
intf->opts.promisc_mode = false;
} else {
ret = rte_eth_promiscuous_enable(intf->port);
- if (ret != 0)
+ if (ret != 0) {
fprintf(stderr,
"port %u set promiscuous enable failed: %d\n",
intf->port, ret);
- intf->opts.promisc_mode = false;
+ intf->opts.promisc_mode = false;
+ }
}
}
++count;
--
2.39.3
From 7ba53acbb39e0dc701a80702ea0d4a7e2a37a5f2 Mon Sep 17 00:00:00 2001
From: Isaac Boukris <iboukris@gmail.com>
Date: Sat, 24 Feb 2024 18:49:01 +0200
Subject: [PATCH 2/2] dumpcap: set handler for SIGTERM as well
Signed-off-by: Isaac Boukris <iboukris@gmail.com>
---
app/dumpcap/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 88cec43086..95b1067387 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -966,6 +966,7 @@ int main(int argc, char **argv)
compile_filters();
signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
signal(SIGPIPE, SIG_IGN);
enable_primary_monitor();
--
2.39.3
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: A couple of patches for dumpcap
2024-02-24 17:28 A couple of patches for dumpcap Isaac Boukris
@ 2024-02-26 1:24 ` Stephen Hemminger
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2024-02-26 1:24 UTC (permalink / raw)
To: Isaac Boukris; +Cc: dev
Please submit patches individually inline, so that people do not have to download attachments
and patchwork can be used to track the status.
See https://doc.dpdk.org/guides/contributing/patches.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-26 1:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-24 17:28 A couple of patches for dumpcap Isaac Boukris
2024-02-26 1:24 ` Stephen Hemminger
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).