DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavel Fedin <p.fedin@samsung.com>
To: 'Reshma Pattan' <reshma.pattan@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 4/5] lib/librte_eal: add tcpdump support in	primary process
Date: Wed, 17 Feb 2016 12:57:39 +0300	[thread overview]
Message-ID: <012101d16969$a38c2b90$eaa482b0$@samsung.com> (raw)
In-Reply-To: <1455289045-25915-5-git-send-email-reshma.pattan@intel.com>

 Hello!

> +static int
> +compare_filter(struct rte_mbuf *pkt)
> +{
> +	struct ipv4_hdr *pkt_hdr = rte_pktmbuf_mtod_offset(pkt, struct ipv4_hdr *,
> +						sizeof(struct ether_hdr));
> +	if (pkt_hdr->src_addr != src_ip_filter)
> +		return -1;
> +
> +	return 0;
> +}

 Some critics to this...
 What if i want to capture packets coming from more than one host?
 What if i want to capture all packets?
 What if it's not IPv4 at all?

 May be this function should always return 0 if src_ip_filter == 0? This would at least be a quick way to disable filtering.

Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia

  reply	other threads:[~2016-02-17  9:57 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-12 14:57 [dpdk-dev] [PATCH v2 0/5] add dpdk packet capture support for tcpdump Reshma Pattan
2016-02-12 14:57 ` [dpdk-dev] [PATCH v2 1/5] app/test-pmd: fix nb_rxq and nb_txq checks Reshma Pattan
2016-02-12 14:57 ` [dpdk-dev] [PATCH v2 2/5] drivers/net/pcap: add public api to create pcap device Reshma Pattan
2016-02-17  9:03   ` Pavel Fedin
2016-02-12 14:57 ` [dpdk-dev] [PATCH v2 3/5] app/proc_info: add tcpdump support in secondary process Reshma Pattan
2016-02-12 14:57 ` [dpdk-dev] [PATCH v2 4/5] lib/librte_eal: add tcpdump support in primary process Reshma Pattan
2016-02-17  9:57   ` Pavel Fedin [this message]
2016-02-12 14:57 ` [dpdk-dev] [PATCH v2 5/5] doc: update doc for tcpdump feature Reshma Pattan
2016-02-22 10:01   ` Mcnamara, John
2016-02-18 14:08 ` [dpdk-dev] [PATCH v2 0/5] add dpdk packet capture support for tcpdump Pavel Fedin
2016-02-23 13:16   ` Pattan, Reshma
2016-02-24 15:04     ` Pavel Fedin
2016-02-29 16:11       ` Pattan, Reshma
2016-03-02 12:16 ` [dpdk-dev] [PATCH v3 " Reshma Pattan
2016-03-02 12:16   ` [dpdk-dev] [PATCH v3 1/5] app/test-pmd: fix nb_rxq and nb_txq checks Reshma Pattan
2016-03-02 12:16   ` [dpdk-dev] [PATCH v3 2/5] drivers/net/pcap: add public api to create pcap device Reshma Pattan
2016-03-02 12:16   ` [dpdk-dev] [PATCH v3 3/5] app/proc_info: add tcpdump support in secondary process Reshma Pattan
2016-03-02 12:16   ` [dpdk-dev] [PATCH v3 4/5] lib/librte_eal: add tcpdump support in primary process Reshma Pattan
2016-03-02 12:16   ` [dpdk-dev] [PATCH v3 5/5] doc: update doc for tcpdump feature Reshma Pattan
2016-03-09  0:33   ` [dpdk-dev] [PATCH v3 0/5] add dpdk packet capture support for tcpdump Thomas Monjalon
2016-03-11 14:18     ` Pattan, Reshma

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='012101d16969$a38c2b90$eaa482b0$@samsung.com' \
    --to=p.fedin@samsung.com \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.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).