DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: "Pattan, Reshma" <reshma.pattan@intel.com>
Cc: Zhike Wang <wangzhike@jd.com>, "dev@dpdk.org" <dev@dpdk.org>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH v4] net/pcap: support snaplen option to truncate packet
Date: Tue, 14 Jul 2020 10:39:26 -0700	[thread overview]
Message-ID: <20200714103926.032d7cd1@hermes.lan> (raw)
In-Reply-To: <BN6PR11MB1282EEED71B0DD8DACB49E99FF610@BN6PR11MB1282.namprd11.prod.outlook.com>

On Tue, 14 Jul 2020 11:46:00 +0000
"Pattan, Reshma" <reshma.pattan@intel.com> wrote:

> > -----Original Message-----
> > From: wangzk320@163.com <wangzk320@163.com> On Behalf Of Zhike Wang
> > +			"[snaplen=<snap length>default:0, meaning no
> > truncation]'\n",  
> 
> From pdump changes, below are couple of comments.
> 
> Bit more descriptive would be nice,  how about, disables truncation of captured packets.?
> 
> > +	if (cnt1 == 1) {
> > +		v.min = 1;  
> 
> Min should be 0. User still can pass 0 value.
> 
> > +		v.max = UINT16_MAX;  
> 
> Instead of  allowing big max number, isn't it good to have some restricted max value?
> 
> Thanks,
> Reshma

An easier way to do the same thing. Just set the mbuf pool for the copied packets
to be sized to the snaplen, then modify pdump to only copy the truncated header.

  reply	other threads:[~2020-07-14 17:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-03  6:47 [dpdk-dev] [PATCH v2] " Zhike Wang
2020-07-11  1:55 ` Ferruh Yigit
2020-07-14  8:57   ` 王志克
2020-07-14  8:26 ` [dpdk-dev] [PATCH v4] " Zhike Wang
2020-07-14 11:46   ` Pattan, Reshma
2020-07-14 17:39     ` Stephen Hemminger [this message]
2020-07-14 16:49   ` Ferruh Yigit

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=20200714103926.032d7cd1@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=wangzhike@jd.com \
    /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).