From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 173EAA04FD for ; Fri, 29 Jul 2022 12:59:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 059134069C; Fri, 29 Jul 2022 12:59:27 +0200 (CEST) Received: from mail-vs1-f50.google.com (mail-vs1-f50.google.com [209.85.217.50]) by mails.dpdk.org (Postfix) with ESMTP id 4F58640151 for ; Fri, 29 Jul 2022 12:59:25 +0200 (CEST) Received: by mail-vs1-f50.google.com with SMTP id x125so4125192vsb.13 for ; Fri, 29 Jul 2022 03:59:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=45WJc0+Q5INiBuYhOdnl0PMIGcDdKA3wMqO/4yEta78=; b=SkuqvTuGKpb7FcYEIBB5RJx9kk6hDNyfw1nKQu1008eDeHhR7zNGvSJzV4B+mxx2Oo 2VtoR74D++60rWQFLSuCLbDM1hwLJKm9rS92tGIqOnoqFIpKqtRgpnELQjJ0ogknX/AX un0UXIwTDg0Ba+30706xdFNamA5Sh9/VM5jAgZ8gBOEJZwLRHSZr1nFrjupHsuJTpffm O3mxPtDzHIxolJnikzlo0O5YO8vGA7cZxg9waJ3mcuaTzJf61AABfGbc1EUl3Lf8Gw7j GtqlgpMuuJ2zWc3pyyGwXBROkCoL/ZYOKFuIrzEjPz2fqCMaXwZJcLspVhf1aa73EJE6 eAog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=45WJc0+Q5INiBuYhOdnl0PMIGcDdKA3wMqO/4yEta78=; b=OiWz88F0oQ0279nsDLz+kHKjHQCwkfPOfTy/9NrqTAKmeiS2a8EtkChTWoYrL4scMa DHDFH1ogYrtRJXumXOM7uVVmIuwwTN2qQazRTR6/azSYg5WV5blzzGbZyFLj1j+DEMI5 YABG7tBBLyLAnrBJKnA/j04jtRc5vIXRF3M4YnBDwDODyvq4ZhcHrzv7Hk4JTVp47Tpy AXWxoNc620dLPOUZP5UQY5w1XQ5s3cYGtmlgleajGjC0BG4B03QWwFEza7cI0MC1dNMx vxlSpwmdtpQIZXOvSZZ/Yq/LNj/lY2c3nCxTlJ/74WN/DNgCXyyf65I+kbtSFyBdLLgH cWnw== X-Gm-Message-State: AJIora8cRGQetEpYg0f1BWzHgCmaXH6Ea1QeIX66iIceCzWHUnsgZbKv /DdaSQsvmiZx6JdFkpiwuv1dEG3+sCVe0C8FKeZh+b+l2LM= X-Google-Smtp-Source: AGRyM1uSVG7AOxqSfgcqytRUxlvIf975R9BKLgmcI83ySwDwsqhhW3gFXKzEyXxTOsVSGNqR+nGyCHpTWbdy9xPXB68= X-Received: by 2002:a67:ae05:0:b0:357:8b59:3a84 with SMTP id x5-20020a67ae05000000b003578b593a84mr919297vse.51.1659092364561; Fri, 29 Jul 2022 03:59:24 -0700 (PDT) MIME-Version: 1.0 From: Pavel Vazharov Date: Fri, 29 Jul 2022 13:59:11 +0300 Message-ID: Subject: Question about rte_flow_validate and DPDK igb driver To: users Content-Type: multipart/alternative; boundary="0000000000000a110605e4ef8bf5" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --0000000000000a110605e4ef8bf5 Content-Type: text/plain; charset="UTF-8" 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@dpdk.org? Thanks, Pavel. --0000000000000a110605e4ef8bf5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi there,

I'm trying to di= stribute among the Rx queues flows of TCP packets based on their destinatio= n 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 app= lication is started on a server using igb driver.
In the fail= ure case the validation function returns EINVAL and the error message is &q= uot;only two tuple are supported by this filter".
I checked the so= urce code of this DPDK driver in drivers/net/e1000/igb_flow.c and I saw the= following related code there, starting at line 449:

=C2=A0 =C2=A0 = =C2=A0 =C2=A0 if (filter->src_ip_mask || filter->dst_ip_mask || =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <= br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 filter->src_port_mask) { = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 memset(filter, 0, sizeo= f(struct rte_eth_ntuple_filter)); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rte_flow_error_set(error, EIN= VAL, =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 RTE_FLOW_ERROR_TYPE_ITEM, =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 NULL, "only two tuple are " =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "supported by this filter"); = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 return -rte_errno; =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 }

The condition looks odd to = me because it seems to ensure that only filtering by destination port is su= pported while the error message hints for something else. Why would filteri= ng only by the destination port be allowed!?
I've provided dst_ip_ma= sk =3D 0xFFFFFFFF and src_port_mask 0xFFFF because I just want to match exa= ct ips and ports and in my understanding this should classify, in my unders= tanding, 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@dpdk.org?

Thanks,
Pavel.
--0000000000000a110605e4ef8bf5--