[dpdk-users] rte_flow() usage of htonl() for ipv4 addr masks?
Cliff Burdick
shaklee3 at gmail.com
Mon Aug 10 04:56:05 CEST 2020
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 at gmail.com>
wrote:
> 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
>
More information about the users
mailing list