Question about rte_flow_validate and DPDK igb driver

Pavel Vazharov freakpv at gmail.com
Fri Jul 29 12:59:11 CEST 2022


Hi there,

I'm trying to distribute among the Rx queues flows of TCP packets based on
their destination IPv4 address and source TCP port. I'm using the rte_flow
DPDK API for this purpose. I'm using DPDK 20.11.0. The setup is successful
when the application is started on a server with i40e driver but fails when
the application is started on a server using igb driver.
In the failure case the validation function returns EINVAL and the error
message is "only two tuple are supported by this filter".
I checked the source code of this DPDK driver in
drivers/net/e1000/igb_flow.c and I saw the following related code there,
starting at line 449:

        if (filter->src_ip_mask || filter->dst_ip_mask ||

            filter->src_port_mask) {

            memset(filter, 0, sizeof(struct rte_eth_ntuple_filter));

            rte_flow_error_set(error, EINVAL,

                RTE_FLOW_ERROR_TYPE_ITEM,

                NULL, "only two tuple are "

                "supported by this filter");

            return -rte_errno;

        }

The condition looks odd to me because it seems to ensure that only
filtering by destination port is supported while the error message hints
for something else. Why would filtering only by the destination port be
allowed!?
I've provided dst_ip_mask = 0xFFFFFFFF and src_port_mask 0xFFFF because I
just want to match exact ips and ports and in my understanding this should
classify, in my understanding, as filtering by "two tuple" - destination ip
and source port.

So, my questions are:
1. Am I missing something about this condition and thus it's the way it
should be?
2. If the question is not appropriate for this user group where should I
post it - dev at dpdk.org?

Thanks,
Pavel.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20220729/04ed3c39/attachment.htm>


More information about the users mailing list