patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Ben Magistro <koncept1@gmail.com>
Cc: dev@dpdk.org, ben.magistro@trinitycyber.com,
	arshdeep.kaur@intel.com, stable@dpdk.org
Subject: Re: [PATCH 4/6] app/dumpcap: fix capturing on multiple interfaces
Date: Tue, 3 Jan 2023 19:01:29 -0800	[thread overview]
Message-ID: <20230103190129.2fc7d7b1@hermes.local> (raw)
In-Reply-To: <20230102162441.6205-4-koncept1@gmail.com>

On Mon,  2 Jan 2023 16:24:39 +0000
Ben Magistro <koncept1@gmail.com> wrote:

> When selecting interfaces to capture traffic on, only the last interface
> specified was being preserved for selection. This turns the interface
> argument into an array allowing multiple interfaces to be selected.
> 
> This also adds checks for the capture format so that if multiple interfaces
> are selected, the interface information is included in the capture file.
> 
> Fixes: 7f3623a ("app/dumpcap: fix select interface")
> Cc: arshdeep.kaur@intel.com
> Cc: stephen@networkplumber.org
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ben Magistro <koncept1@gmail.com>
> ---
>  app/dumpcap/main.c | 47 +++++++++++++++++++++++++++++++++-------------
>  1 file changed, 34 insertions(+), 13 deletions(-)
> 
> diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
> index 26c641df61..dc4d69ff6b 100644
> --- a/app/dumpcap/main.c
> +++ b/app/dumpcap/main.c
> @@ -65,8 +65,8 @@ static const char *file_prefix;
>  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 uint8_t interface_arg_count = 0; /* count of interfaces configured via -i */
> +static const char *interface_arg[RTE_MAX_ETHPORTS]; /*array of interface parameters */

I think it is simpler to just use the existing interfaces
array rather than introducing a new data structure.

PS: run you patches through check patch, lots of little style issues
especially in #1

  reply	other threads:[~2023-01-04 16:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230102162441.6205-1-koncept1@gmail.com>
2023-01-02 16:24 ` [PATCH 2/6] app/dumpcap: fix storing port identifier Ben Magistro
2023-01-02 16:58   ` Stephen Hemminger
2023-01-04  3:04   ` Stephen Hemminger
2023-01-02 16:24 ` [PATCH 3/6] app/dumpcap: fix preserving promiscuous mode Ben Magistro
2023-01-02 16:58   ` Stephen Hemminger
2023-01-04  3:04   ` Stephen Hemminger
2023-01-02 16:24 ` [PATCH 4/6] app/dumpcap: fix capturing on multiple interfaces Ben Magistro
2023-01-04  3:01   ` Stephen Hemminger [this message]
     [not found] ` <20230104033815.35496-1-stephen@networkplumber.org>
2023-01-04  3:38   ` [PATCH v2 1/6] app/dumpcap: fix storing port identifier Stephen Hemminger

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=20230103190129.2fc7d7b1@hermes.local \
    --to=stephen@networkplumber.org \
    --cc=arshdeep.kaur@intel.com \
    --cc=ben.magistro@trinitycyber.com \
    --cc=dev@dpdk.org \
    --cc=koncept1@gmail.com \
    --cc=stable@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).