* [PATCH v1] dumpcap: fix select interface
@ 2022-10-14 20:33 Arshdeep Kaur
2022-10-14 20:38 ` Stephen Hemminger
2022-10-14 20:48 ` [PATCH v2] " Arshdeep Kaur
0 siblings, 2 replies; 7+ messages in thread
From: Arshdeep Kaur @ 2022-10-14 20:33 UTC (permalink / raw)
To: dev
The change to do argument process before EAL init broke
the support of select-interface option. Fix by setting flag
and doing select-interface later.
Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
Signed-off-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
---
app/dumpcap/main.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index e0a3477d91..11a44ecce4 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -64,6 +64,8 @@ static const char *capture_comment;
static uint32_t snaplen = RTE_MBUF_DEFAULT_BUF_SIZE;
static bool dump_bpf;
static bool show_interfaces;
+static bool select_interfaces;
+const char *interface_arg;
static struct {
uint64_t duration; /* nanoseconds */
@@ -370,7 +372,8 @@ static void parse_opts(int argc, char **argv)
usage();
exit(0);
case 'i':
- select_interface(optarg);
+ select_interfaces = true;
+ interface_arg = optarg;
break;
case 'n':
use_pcapng = true;
@@ -796,6 +799,9 @@ int main(int argc, char **argv)
if (rte_eth_dev_count_avail() == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports found\n");
+ if (select_interface)
+ select_interface(interface_arg);
+
if (filter_str)
compile_filter();
--
2.37.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] dumpcap: fix select interface
2022-10-14 20:33 [PATCH v1] dumpcap: fix select interface Arshdeep Kaur
@ 2022-10-14 20:38 ` Stephen Hemminger
2022-10-14 20:48 ` [PATCH v2] " Arshdeep Kaur
1 sibling, 0 replies; 7+ messages in thread
From: Stephen Hemminger @ 2022-10-14 20:38 UTC (permalink / raw)
To: Arshdeep Kaur; +Cc: dev
On Fri, 14 Oct 2022 13:33:25 -0700
Arshdeep Kaur <arshdeep.kaur@intel.com> wrote:
> The change to do argument process before EAL init broke
> the support of select-interface option. Fix by setting flag
> and doing select-interface later.
>
> Fixes: cbb44143be74 ("app/dumpcap: add new packet capture application")
>
> Signed-off-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
The right fixes line would be when the order of init changed:
Fixes: a8dde09f97df ("app/dumpcap: allow help/version without primary process")
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] dumpcap: fix select interface
2022-10-14 20:33 [PATCH v1] dumpcap: fix select interface Arshdeep Kaur
2022-10-14 20:38 ` Stephen Hemminger
@ 2022-10-14 20:48 ` Arshdeep Kaur
2022-10-17 11:56 ` [PATCH v3] " Arshdeep Kaur
1 sibling, 1 reply; 7+ messages in thread
From: Arshdeep Kaur @ 2022-10-14 20:48 UTC (permalink / raw)
To: dev
The change to do argument process before EAL init broke
the support of select-interface option. Fix by setting flag
and doing select-interface later.
Fixes: a8dde09f97df ("app/dumpcap: allow help/version without primary process")
Signed-off-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
---
app/dumpcap/main.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index e0a3477d91..11a44ecce4 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -64,6 +64,8 @@ static const char *capture_comment;
static uint32_t snaplen = RTE_MBUF_DEFAULT_BUF_SIZE;
static bool dump_bpf;
static bool show_interfaces;
+static bool select_interfaces;
+const char *interface_arg;
static struct {
uint64_t duration; /* nanoseconds */
@@ -370,7 +372,8 @@ static void parse_opts(int argc, char **argv)
usage();
exit(0);
case 'i':
- select_interface(optarg);
+ select_interfaces = true;
+ interface_arg = optarg;
break;
case 'n':
use_pcapng = true;
@@ -796,6 +799,9 @@ int main(int argc, char **argv)
if (rte_eth_dev_count_avail() == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports found\n");
+ if (select_interface)
+ select_interface(interface_arg);
+
if (filter_str)
compile_filter();
--
2.37.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3] dumpcap: fix select interface
2022-10-14 20:48 ` [PATCH v2] " Arshdeep Kaur
@ 2022-10-17 11:56 ` Arshdeep Kaur
2022-10-17 12:07 ` [PATCH v4] " Arshdeep Kaur
0 siblings, 1 reply; 7+ messages in thread
From: Arshdeep Kaur @ 2022-10-17 11:56 UTC (permalink / raw)
To: dev
Fixed compilation error.
Fixes: a8dde09f97df ("app/dumpcap: allow help/version without primary process")
Signed-off-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
---
app/dumpcap/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 11a44ecce4..143c93940d 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -799,7 +799,7 @@ int main(int argc, char **argv)
if (rte_eth_dev_count_avail() == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports found\n");
- if (select_interface)
+ if (select_interfaces)
select_interface(interface_arg);
if (filter_str)
--
2.37.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4] dumpcap: fix select interface
2022-10-17 11:56 ` [PATCH v3] " Arshdeep Kaur
@ 2022-10-17 12:07 ` Arshdeep Kaur
2022-10-17 15:12 ` Stephen Hemminger
0 siblings, 1 reply; 7+ messages in thread
From: Arshdeep Kaur @ 2022-10-17 12:07 UTC (permalink / raw)
To: dev
The change to do argument process before EAL init broke
the support of select-interface option. Fix by setting flag
and doing select-interface later.
Fixes: a8dde09f97df ("app/dumpcap: allow help/version without primary process")
Signed-off-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
---
app/dumpcap/main.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index e0a3477d91..143c93940d 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -64,6 +64,8 @@ static const char *capture_comment;
static uint32_t snaplen = RTE_MBUF_DEFAULT_BUF_SIZE;
static bool dump_bpf;
static bool show_interfaces;
+static bool select_interfaces;
+const char *interface_arg;
static struct {
uint64_t duration; /* nanoseconds */
@@ -370,7 +372,8 @@ static void parse_opts(int argc, char **argv)
usage();
exit(0);
case 'i':
- select_interface(optarg);
+ select_interfaces = true;
+ interface_arg = optarg;
break;
case 'n':
use_pcapng = true;
@@ -796,6 +799,9 @@ int main(int argc, char **argv)
if (rte_eth_dev_count_avail() == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports found\n");
+ if (select_interfaces)
+ select_interface(interface_arg);
+
if (filter_str)
compile_filter();
--
2.37.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] dumpcap: fix select interface
2022-10-17 12:07 ` [PATCH v4] " Arshdeep Kaur
@ 2022-10-17 15:12 ` Stephen Hemminger
2022-10-21 13:01 ` David Marchand
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2022-10-17 15:12 UTC (permalink / raw)
To: Arshdeep Kaur; +Cc: dev
On Mon, 17 Oct 2022 05:07:52 -0700
Arshdeep Kaur <arshdeep.kaur@intel.com> wrote:
> The change to do argument process before EAL init broke
> the support of select-interface option. Fix by setting flag
> and doing select-interface later.
>
> Fixes: a8dde09f97df ("app/dumpcap: allow help/version without primary process")
>
> Signed-off-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4] dumpcap: fix select interface
2022-10-17 15:12 ` Stephen Hemminger
@ 2022-10-21 13:01 ` David Marchand
0 siblings, 0 replies; 7+ messages in thread
From: David Marchand @ 2022-10-21 13:01 UTC (permalink / raw)
To: Arshdeep Kaur; +Cc: Stephen Hemminger, dev
On Mon, Oct 17, 2022 at 5:12 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Mon, 17 Oct 2022 05:07:52 -0700
> Arshdeep Kaur <arshdeep.kaur@intel.com> wrote:
>
> > The change to do argument process before EAL init broke
> > the support of select-interface option. Fix by setting flag
> > and doing select-interface later.
> >
> > Fixes: a8dde09f97df ("app/dumpcap: allow help/version without primary process")
Cc: stable@dpdk.org
> >
> > Signed-off-by: Arshdeep Kaur <arshdeep.kaur@intel.com>
> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Applied, thanks.
--
David Marchand
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-10-21 13:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-14 20:33 [PATCH v1] dumpcap: fix select interface Arshdeep Kaur
2022-10-14 20:38 ` Stephen Hemminger
2022-10-14 20:48 ` [PATCH v2] " Arshdeep Kaur
2022-10-17 11:56 ` [PATCH v3] " Arshdeep Kaur
2022-10-17 12:07 ` [PATCH v4] " Arshdeep Kaur
2022-10-17 15:12 ` Stephen Hemminger
2022-10-21 13:01 ` David Marchand
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).