From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f43.google.com (mail-it0-f43.google.com [209.85.214.43]) by dpdk.org (Postfix) with ESMTP id 7B6B54C8A for ; Thu, 19 Jul 2018 15:32:00 +0200 (CEST) Received: by mail-it0-f43.google.com with SMTP id 72-v6so9186239itw.3 for ; Thu, 19 Jul 2018 06:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=GdvaEzylYbsUmXLIKQ9YWYVk8Lej57M2A4+dHvZDKd0=; b=XNbDqXScCXNN2tlyNQNU9OrTmmA1pHx3Yq/ZQa329pKB7k8rhhFroU4T7mCoMf+uSN iyqnCn/vaLFTOeujsbVqltN8gvFxzLTUBrqS2Idy/nKnn0/80CJuvExObkdC97THEgq2 3V3vHhHiGSKqchRwidayucYadbo9H7xvhJLeIXpWTwdyJ2MtzZYylpYyF8tMlh8QCrun sZPBYHnNsSjMCW0dSGkLfwa0bbI+atRcbLuEExORCfNahCyKws/MEV6LyR/3lQ7fGwjy LwMR5rMwoCly2WH82WKUESmGC6JFUY2t75zf1OzMSDONs8gmHcaEGi/pJRG6ZdD//Rk0 rYqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=GdvaEzylYbsUmXLIKQ9YWYVk8Lej57M2A4+dHvZDKd0=; b=j18WSSE8zn8f8kjJ8x0sQo8iFtZGKFdzPtaQVCfa30WaC1+UvTdNIHTjei8cYCvRnr rLUAcThfFCJ/SIPlKO88fH+5OsnlqNtjFEEL3qCsT0ZtMeACSk0v1Sypyb37YrBgRRoF CGgu8Plzh8q3aJMAotlMGxxNCTSVrHwU8lyOu+APjusdXR/wH/UHsBVCSkTB8T/l288i g4F4kIc5w6t+HwXA6IaKf0VN6cmoLT3YITzXpEVOC7qH8/H/tmyduJ7IMMAK0WYsbFPA mBVcWFXMA5LrIsoEwGyZmdwRZuYvz5v1S0zDQW22+1F7TfOlEtXE6hsHLT+EIfjwqkL3 WyVA== X-Gm-Message-State: AOUpUlGR7EcjrtaeS6bsuorJD+DHiK5qWp9QleaV+2vp5mhUAO2tMpFj kp6hpHxyE0Hh41WMGKokbivrGXos14KJ6x07G6E= X-Google-Smtp-Source: AAOMgpcipdbhskQC4pKnED1t1Zd6MO+cDJ8BIp2CTvPGhdFyAFr2kB3tsDh/iF6C/usjlfqEPdAnPU86EpsfPdlA0VQ= X-Received: by 2002:aca:40d6:: with SMTP id n205-v6mr11282087oia.35.1532007119620; Thu, 19 Jul 2018 06:31:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:1584:0:0:0:0:0 with HTTP; Thu, 19 Jul 2018 06:31:58 -0700 (PDT) In-Reply-To: <727378235.56342270.1531991673334.JavaMail.zimbra@uliege.be> References: <727378235.56342270.1531991673334.JavaMail.zimbra@uliege.be> From: waqas ahmed Date: Thu, 19 Jul 2018 18:31:58 +0500 Message-ID: To: tom.barbette@uliege.be, users@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 13:32:00 -0000 Thanks tom, glad to see your response. after correcting pattern[] issue, rule can't be added again with same error. we have 8 or more rtp streams coming with different sorts of management traffic to rxq0, we may separate other traffic but how we direct these streams to one specific rxq. one solution might be to add 8-different filters set on udp ports, one for each stream with action rxq-3. i was looking for 1 rule to fit on all the streams!. Thanks again. ahmed On Thu, Jul 19, 2018 at 2:14 PM, wrote: > Hi, > > https://git.dpdk.org/dpdk/tree/drivers/net/ixgbe/ixgbe_flow.c#n1525 gives > you some guidelines about the issue here. > > I guess one issue is that you overwrite pattern[2] instead of adding your > UDP 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 > will not be able to add a different flexible byte position. 82599 (and > XL710 even more) are very limited in term of filtering capabilities and > only support one global mask (X(L)710 only one flex mask, not even heade= rs > 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 > UDP > > payload. > > before this we have added two filters successfully to separate igmp and > udp > > 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 > > > > > > *Flow can't be created 11 message: Not supported action.EAL: Error - > > exiting with code: 1 Cause: error in creating flow* > > > > =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; > > > > 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; > > > > memset(pattern, 0, sizeof(pattern)); > > memset(action, 0, sizeof(action)); > > > > /* > > * 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; > > > > /* > > * 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; > > > > /* > > * 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; > > > > > > /* > > * 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; > > > > /* > > * 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)); > > > > 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; > > > > 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; > > > > memset(&raw_spec, 0, sizeof(struct rte_flow_item_raw)); > > memset(&raw_mask, 0, sizeof(struct rte_flow_item_raw)); > > > > 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; > > > > res =3D rte_flow_validate(port_id, &attr, pattern, action, error= ); > > if (!res) > > flow =3D rte_flow_create(port_id, &attr, pattern, action= , > > error); > > > > return flow; > > > > =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 >