DPDK usage discussions
 help / color / mirror / Atom feed
From: Cliff Burdick <shaklee3@gmail.com>
To: Arvind Narayanan <webguru2688@gmail.com>
Cc: users <users@dpdk.org>
Subject: Re: [dpdk-users] rte_flow() usage of htonl() for ipv4 addr masks?
Date: Sun, 9 Aug 2020 19:56:05 -0700
Message-ID: <CA+Gp1nYJOQy2_ee1ANoC2Wpq-+D3Q616HFKHptnnrkNk+u02Lw@mail.gmail.com> (raw)
In-Reply-To: <CAHJJQSVpmT=Nhe5yoswQFTkRMZC1cVpcpuH99bY=t04vWKqEow@mail.gmail.com>

It should convert to network order, although many applications it won't
matter since they use all F's. If you follow the code in flow_filtering,
indeed it's using:

#define FULL_MASK 0xffffffff /* full mask */

So it won't make any difference. The example should probably be
updated, though..

On Sun, Aug 9, 2020 at 7:03 PM Arvind Narayanan <webguru2688@gmail.com>

> Hi,
> In the flow_filtering sample application, the IP's mask was set without
> using htonl().
> https://github.com/DPDK/dpdk/blob/master/examples/flow_filtering/flow_blocks.c#L85
> Another DPDK page <https://doc.dpdk.org/guides/howto/rte_flow.html> shows
> how a testpmd command is translated to C code.
> On this page though, Example 4.2 (Range IPv4 drop) has used htonl() to set
> the mask.
> Any clarification on how to load the mask would be helpful.
> Thanks,
> Arvind

  reply	other threads:[~2020-08-10  2:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10  2:03 Arvind Narayanan
2020-08-10  2:56 ` Cliff Burdick [this message]
2020-08-10  3:14   ` Arvind Narayanan
2020-08-10 15:18     ` 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+Gp1nYJOQy2_ee1ANoC2Wpq-+D3Q616HFKHptnnrkNk+u02Lw@mail.gmail.com \
    --to=shaklee3@gmail.com \
    --cc=users@dpdk.org \
    --cc=webguru2688@gmail.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ https://inbox.dpdk.org/users \
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git