From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from serv108.segi.ulg.ac.be (serv108.segi.ulg.ac.be [139.165.32.111]) by dpdk.org (Postfix) with ESMTP id E2C622C4F for ; Thu, 19 Jul 2018 11:14:35 +0200 (CEST) Received: from mbx12-zne.ulg.ac.be (serv470.segi.ulg.ac.be [139.165.32.199]) by serv108.segi.ulg.ac.be (Postfix) with ESMTP id 12805200F49D; Thu, 19 Jul 2018 11:14:34 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mbx12-zne.ulg.ac.be (Postfix) with ESMTP id 03668129E882; Thu, 19 Jul 2018 11:14:33 +0200 (CEST) Received: from mbx12-zne.ulg.ac.be ([127.0.0.1]) by localhost (mbx12-zne.ulg.ac.be [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id LAD5kgS1Yiat; Thu, 19 Jul 2018 11:14:33 +0200 (CEST) Received: from mbx12-zne.ulg.ac.be (mbx12-zne.ulg.ac.be [139.165.32.199]) by mbx12-zne.ulg.ac.be (Postfix) with ESMTP id DB9CF129E892; Thu, 19 Jul 2018 11:14:33 +0200 (CEST) Date: Thu, 19 Jul 2018 11:14:33 +0200 (CEST) From: tom.barbette@uliege.be To: waqas ahmed Cc: users@dpdk.org Message-ID: <727378235.56342270.1531991673334.JavaMail.zimbra@uliege.be> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [130.237.202.15] X-Mailer: Zimbra 8.7.1_GA_1670 (ZimbraWebClient - GC67 (Linux)/8.7.1_GA_1670) Thread-Topic: Flow Director RAW filter: Not supported action!!! Thread-Index: SQ320tai2iA+BmR34MUf2CMhBQ1Sfw== Subject: Re: [dpdk-users] Flow Director RAW filter: Not supported action!!! X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 09:14:36 -0000 Hi, https://git.dpdk.org/dpdk/tree/drivers/net/ixgbe/ixgbe_flow.c#n1525 gives y= ou some guidelines about the issue here. I guess one issue is that you overwrite pattern[2] instead of adding your U= DP spec to pattern[3]. That paragraph states that you must have an IPv4 or = IPv6 filter before a UDP filter. Then, if you already have other rules for the same protocol (UDPv4) you wil= l not be able to add a different flexible byte position. 82599 (and XL710 e= ven more) are very limited in term of filtering capabilities and only suppo= rt one global mask (X(L)710 only one flex mask, not even headers mask). Tom ----- Mail original ----- > De: "waqas ahmed" > =C3=80: users@dpdk.org > Envoy=C3=A9: Jeudi 19 Juillet 2018 08:18:45 > Objet: [dpdk-users] Flow Director RAW filter: Not supported action!!! > Greetings, > we are modifying dpdk sample *flow_filtering* app to extend its > functionality to add Flow Director RAW filter. this filter is used to > direct rtp traffic to specifc rx-queue. > RAW filter is based on searching first 2-bytes of RTP header values in UD= P > payload. > before this we have added two filters successfully to separate igmp and u= dp > traffic on basis of their ip-protocol numbers 0x2 and 0x11 respectively. > NIC in use: 82599ES 10g > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > OUTPUT of app: > -------------------------------------------------------------------------= --------------------------- > EAL: Detected 8 lcore(s) > EAL: Multi-process socket /var/run/.rte_unix > EAL: Probing VFIO support... > EAL: PCI device 0000:01:00.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 8086:10c9 net_e1000_igb > EAL: PCI device 0000:01:00.1 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 8086:10c9 net_e1000_igb > EAL: PCI device 0000:05:00.0 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 8086:10fb net_ixgbe > EAL: PCI device 0000:05:00.1 on NUMA socket -1 > EAL: Invalid NUMA socket, default to 0 > EAL: probe driver: 8086:10fb net_ixgbe > :: initializing port: 0 > :: initializing port: 0 done >=20 >=20 > *Flow can't be created 11 message: Not supported action.EAL: Error - > exiting with code: 1 Cause: error in creating flow* >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > RAW filter function is given below > -------------------------------------------------------------------------= --------------------------- > ..... // start of function > struct rte_flow_attr attr; > struct rte_flow_item pattern[5]; > struct rte_flow_action action[5]; > struct rte_flow *flow =3D NULL; > struct rte_flow_action_queue queue =3D { .index =3D rx_q }; > struct rte_flow_item_eth eth_spec; > struct rte_flow_item_eth eth_mask; > struct rte_flow_item_vlan vlan_spec; > struct rte_flow_item_vlan vlan_mask; > struct rte_flow_item_ipv4 ip_spec; > struct rte_flow_item_ipv4 ip_mask; >=20 > struct rte_flow_item_udp udp_spec; > struct rte_flow_item_udp udp_mask; > struct rte_flow_item_raw raw_spec; > struct rte_flow_item_raw raw_mask; > int res; >=20 > memset(pattern, 0, sizeof(pattern)); > memset(action, 0, sizeof(action)); >=20 > /* > * set the rule attribute. > * in this case only ingress packets will be checked. > */ > memset(&attr, 0, sizeof(struct rte_flow_attr)); > attr.ingress =3D 1; >=20 > /* > * create the action sequence. > * one action only, move packet to queue > */ > action[0].type =3D RTE_FLOW_ACTION_TYPE_QUEUE; > action[0].conf =3D &queue; > action[1].type =3D RTE_FLOW_ACTION_TYPE_END; >=20 > /* > * set the first level of the pattern (eth). > * since in this example we just want to get the > * ipv4 we set this level to allow all. > */ > memset(ð_spec, 0, sizeof(struct rte_flow_item_eth)); > memset(ð_mask, 0, sizeof(struct rte_flow_item_eth)); > eth_spec.type =3D 0; > eth_mask.type =3D 0; > pattern[0].type =3D RTE_FLOW_ITEM_TYPE_ETH; > pattern[0].spec =3D ð_spec; > pattern[0].mask =3D ð_mask; >=20 >=20 > /* > * setting the second level of the pattern (vlan). > * since in this example we just want to get the > * ipv4 we also set this level to allow all. > */ > memset(&vlan_spec, 0, sizeof(struct rte_flow_item_vlan)); > memset(&vlan_mask, 0, sizeof(struct rte_flow_item_vlan)); > pattern[1].type =3D RTE_FLOW_ITEM_TYPE_VLAN; > pattern[1].spec =3D &vlan_spec; > pattern[1].mask =3D &vlan_mask; >=20 > /* > * setting the third level of the pattern (ip). > * in this example this is the level we care about > * so we set it according to the parameters. > */ > memset(&ip_spec, 0, sizeof(struct rte_flow_item_ipv4)); > memset(&ip_mask, 0, sizeof(struct rte_flow_item_ipv4)); >=20 > ip_spec.hdr.dst_addr =3D htonl(dest_ip); > ip_mask.hdr.dst_addr =3D 0x0; //dest_mask; > ip_spec.hdr.src_addr =3D htonl(src_ip); > ip_mask.hdr.src_addr =3D 0x0; //src_mask; > ip_spec.hdr.next_proto_id =3D 0x11; > ip_mask.hdr.next_proto_id =3D 0xff; > pattern[2].type =3D RTE_FLOW_ITEM_TYPE_IPV4; > pattern[2].spec =3D &ip_spec; > pattern[2].mask =3D &ip_mask; >=20 > memset(&udp_spec, 0, sizeof(struct rte_flow_item_udp)); > memset(&udp_mask, 0, sizeof(struct rte_flow_item_udp)); > pattern[2].type =3D RTE_FLOW_ITEM_TYPE_UDP; > pattern[2].spec =3D &udp_spec; > pattern[2].mask =3D &udp_mask; >=20 > memset(&raw_spec, 0, sizeof(struct rte_flow_item_raw)); > memset(&raw_mask, 0, sizeof(struct rte_flow_item_raw)); >=20 > pattern[3].type =3D RTE_FLOW_ITEM_TYPE_RAW; > pattern[3].spec =3D &raw_spec; > pattern[3].mask =3D &raw_mask; > raw_spec.relative =3D 1; > raw_spec.search =3D 1; > raw_spec.reserved =3D 0; > raw_spec.offset =3D 10; > raw_spec.length =3D 2; > raw_spec.pattern[0] =3D'8'; > raw_spec.pattern[1] =3D'0'; > /* the final level must be always type end */ > pattern[4].type =3D RTE_FLOW_ITEM_TYPE_END; >=20 > res =3D rte_flow_validate(port_id, &attr, pattern, action, error); > if (!res) > flow =3D rte_flow_create(port_id, &attr, pattern, action, > error); >=20 > return flow; >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > Thanks for reading & help is much appreciated > Ahmed