From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f41.google.com (mail-vk0-f41.google.com [209.85.213.41]) by dpdk.org (Postfix) with ESMTP id D71517292 for ; Thu, 19 Apr 2018 08:56:15 +0200 (CEST) Received: by mail-vk0-f41.google.com with SMTP id r184so2552715vke.11 for ; Wed, 18 Apr 2018 23:56:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=DttjQK89E25wdEkO+3EdoN9cyo8qUrciclAWNiej63s=; b=m4NNDKCaUI3iaeA87kCT7Vu1q9hu4OJu29tGXY8o5PYJRYHMIDaz27ES8QV1JXN+gQ HHRg4Tot+zth+CiHYkmtNpk1NPVqdkgt9K8SSNTb82v2Lcvfli0SN84fLKXut5MjryIk 4XOaTOHO8HC4WDR21YSHE3IGuJcdBYXIjgR6eIvDJ2UIq3w4q+bXac/ojGSd/aMwQXac yBfFViSCyCUANzz32tnNb79b7iX4qh8h8p4sYcFHZ2Jkx1Di4yIwxfyZ/2VijfIwSiWL 0yQ/AONbiFtTU1VhCRRa47YQKHvjyIURqUEEzu3foYv0ONH3fYlZI0QxT677M7hKU/Oy uyVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=DttjQK89E25wdEkO+3EdoN9cyo8qUrciclAWNiej63s=; b=PiAnFHuslWgeQDz2N1x6p/29i7wPsnyHHD4OAfmfcEVZ+7yDVE3vkbBQyhyFq2zLZa a7Ch8EQLrAAcPGJv8kggr1CmQ4Xzoz36mWCJu1nfjHY1+2jKSlZp599QSwPt0hPEGsQG DlhphNJxybk46R1dvlDgvfkILhrH1JiE5h0Q2PTbIEQ1d9tl1X8HChceRtwJCPvU78+s CoVVYlvEDscMd06T/6vcX878KxNROyZLRw2yfIZn6h5N8VmbORwuhk8tOKU7JUNFk/GW rBHHITp/18n4tbmcwZ9rYbLkADZErxo+fxCdXuViG21hJKqPyUyNfKnl2VQRrrW6BB/i zknw== X-Gm-Message-State: ALQs6tDKJDd00rCmKEv9npg4MReiG25Qkkct9sgZG6SahZDcDBAUklwB 5NuI54U+jS21iE9nOlW0rSJxqF7F8vJG4MXAlpOfktqD X-Google-Smtp-Source: AIpwx4+wfYlcrmnTM31VSjx6MHp94ByJuXTnyMDMjZJqiSIy9U8iA5fTkm67nbFu/T9uBIGZZViPXWTgvgaXeYYzhus= X-Received: by 10.31.150.85 with SMTP id y82mr3709432vkd.150.1524120974890; Wed, 18 Apr 2018 23:56:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.83.136 with HTTP; Wed, 18 Apr 2018 23:55:54 -0700 (PDT) From: Arun M Date: Thu, 19 Apr 2018 12:25:54 +0530 Message-ID: To: 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 feature on Fortville XL710 adapter not working 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 Apr 2018 06:56:16 -0000 Hi Richard, Thank you Richard for replying. As you mentioned, RSS and Flow director won't work simultaneously on a Port. We patched the dpdk rss init (function: i40e_pf_config_rss) code to make it work. In our earlier platform, which uses Intel Niantic, 82599, we were able to make both RSS and Flow director working with older versions (DPDK 1.2 and 1.6) But anyway, I tried FDIR testing with, RSS disabled and still the packets are not steered to the right queue. My understanding regrading input set is, to make new FDIR APIs work for i40e, we need to set Input Selector. I am also using this APIs for the first time. Below fdir_conf is also used. .fdir_conf =3D { .mode =3D RTE_FDIR_MODE_PERFECT, .pballoc =3D RTE_FDIR_PBALLOC_64K, .status =3D RTE_FDIR_REPORT_STATUS, .mask =3D { .vlan_tci_mask =3D 0x0, .ipv4_mask =3D { .src_ip =3D 0xFFFFFFFF, .dst_ip =3D 0xFFFFFFFF, }, .ipv6_mask =3D { .src_ip =3D {0x0, 0x0, 0x0, 0x0}, .dst_ip =3D {0x0, 0x0, 0x0, 0x0}, }, .src_port_mask =3D 0x0, .dst_port_mask =3D 0x0, .mac_addr_byte_mask =3D 0x0, .tunnel_type_mask =3D 0, .tunnel_id_mask =3D 0x0, }, Thanks & Regards, Arun M On Wed, Apr 18, at 12:20 PM, Richard Nutman Richard.Nutman at s-a-m.com wrote: > Hi Arun, > > I wasn't aware you could use RSS and the Flow Director simultaneously. > > Are you setting the fdir_conf mode and mask in the rte_eth_conf structure ? Without the mask set, the Flow Director wont match the values you set in the Flow Director filter. > > I'm not sure what the input selector achieves, we don=E2=80=99t use that = in our Flow Director usage. Is this what allows RSS and Flow Director together ? > > -Richard. > > > -----Original Message----- > > From: Arun M [mailto:arun.m.b at gmail.com] > > Sent: 18 April 2018 06:50 > > To: users at dpdk.org > > Subject: [dpdk-users] Flow Director feature on Fortville XL710 adapter > > not working > > > > Hello, > > > > We use Flow director feature in i40e DPDK user space driver to steer > > the packets onto a specific queue. > > A rule is created to filter IPv4 packets on a specific combination of > > v4 Src IP and Dst IP. > > DPDK user space APIs(DPDK 16.11.04) are used for the same. > > > > However the packets do not get steered to the specific queue. Instead > > they arrive on the remaining queues which are part of RSS group. > > In our DPDK EAL application, we configure a Single port with 4 queues, > > where queues (0,1) are configured in RSS group and the queue (2 & 3) > > is used for FDIR filter. > > > > Below is details of fw and nvm version we are using. > > i40e 0000:3b:00.0: fw 5.0.40043 api 1.5 nvm 5.05 0x80002cfb 0.0.0 > > > > Below is the Packet Dump of the packet which we are trying to steer to > > Queue 3 of Port 0 for which we have created below FDIR Rule. > > > > 00000000: AB CD EF DE AD EB 70 AC BE AF 12 34 91 00 00 03 | > > ......p....4.... > > > > 00000010: 08 00 45 00 00 3F 00 00 00 00 00 11 B7 E7 7F 04 | > > ..E..?.......... > > > > 00000020: 01 01 7F 06 03 BC 27 10 27 10 00 2B 00 00 86 00 | > > ......'.'..+.... > > > > 00000030: 01 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 | > > ................ > > > > 00000040: 00 00 00 00 00 00 00 00 00 00 02 00 00 00 01 00 | > > ................ > > > > 00000050: 00 | | | | | | | | | | | | | | | | . > > > > > > Code Block 1 for Filter Input Set Select and Code block 2 for Flow > > Director rule creation. > > We tried two Filter options, ipv4-other and ip4-udp. In both case FDIR > > rule was not hit. > > DPDK version used is 16.11.04. Are we missing something here? > > > > > > Code Snippet For Configuring FDIR using DPDK APIs: > > > > > > portid =3D 0; > > > > /* Check FDIR Support and Flush FDIR Entries */ > > > > retval =3D rte_eth_dev_filter_supported(portid, > > RTE_ETH_FILTER_FDIR); > > > > if (retval < 0) { > > > > rte_panic("flow director is not supported on port > > %u.\n",portid); > > > > } > > > > > > > > retval =3D rte_eth_dev_filter_ctrl(portid, RTE_ETH_FILTER_FDIR, > > > > RTE_ETH_FILTER_FLUSH, NULL); > > > > if (retval < 0) { > > > > rte_panic("flow director table flushing error: (%s)\n", > > strerror(-retval)); > > > > } > > > > > > */* Start of Code Block 1 - For Input Set Select*/* > > struct rte_eth_fdir_filter_info filter_info; > > memset(&filter_info, 0, sizeof(filter_info)); > > > > printf("Inside %s: Set Select filter Ctrl for %d \n", __func__, > > port_id); > > filter_info.info_type =3D RTE_ETH_FDIR_FILTER_INPUT_SET_SELECT; > > #if 1 > > /* Try flow-type ipv4-other */ > > filter_info.info.input_set_conf.flow_type =3D > > *RTE_ETH_FLOW_NONFRAG_IPV4_OTHER*; > > filter_info.info.input_set_conf.inset_size =3D 2; > > filter_info.info.input_set_conf.field[0] =3D > > RTE_ETH_INPUT_SET_L3_SRC_IP4; > > filter_info.info.input_set_conf.field[1] =3D > > RTE_ETH_INPUT_SET_L3_DST_IP4; > > #else > > /* Try flow-type ipv4-udp */ > > filter_info.info.input_set_conf.flow_type =3D > > RTE_ETH_FLOW_NONFRAG_IPV4_UDP; > > filter_info.info.input_set_conf.inset_size =3D 2; > > filter_info.info.input_set_conf.field[0] =3D > > RTE_ETH_INPUT_SET_L3_DST_IP4; > > filter_info.info.input_set_conf.field[1] =3D > > RTE_ETH_INPUT_SET_L4_UDP_DST_PORT; > > #endif > > filter_info.info.input_set_conf.op =3D RTE_ETH_INPUT_SET_SELECT; > > > > retval =3D rte_eth_dev_filter_ctrl(portid, RTE_ETH_FILTER_FDIR, > > RTE_ETH_FILTER_SET, &filter_info); > > if (retval !=3D 0) { > > rte_panic("Error: Could not set fdir info: %s\n", > > strerror(-retval)); > > } > > */* End of Code Block 1 */* > > > > > > */* Start of Code Block 2 =E2=80=93 For Flow Director Filter Rule = creation > > */* > > struct rte_eth_fdir_filter entry; > > > > /* Create the filter data capture */ > > memset(&entry, 0, sizeof(struct rte_eth_fdir_filter)); > > entry.soft_id =3D 2; > > #if 1 > > entry.input.flow_type =3D RTE_ETH_FLOW_NONFRAG_IPV4_OTHER; > > entry.input.flow.ip4_flow.src_ip =3D IPv4(0x7f, 0x04, 0x01, 0x01)= ; > > /* > > 0x7F040101 */ > > entry.input.flow.ip4_flow.dst_ip =3D IPv4(0x7f, 0x06, 0x03, 0xBC)= ; > > /* 0x7F0603BC - Dummy IP Address */ #else > > entry.input.flow_type =3D RTE_ETH_FLOW_NONFRAG_IPV4_UDP; > > entry.input.flow.udp4_flow.ip.dst_ip =3D IPv4(0x7f, 0x06, 0x03, > > 0xBC); > > entry.input.flow.udp4_flow.dst_port =3D rte_cpu_to_be_16(10000)= ; > > #endif > > > > entry.action.*rx_queue =3D 3*; > > entry.action.behavior =3D RTE_ETH_FDIR_ACCEPT; > > entry.action.report_status =3D RTE_ETH_FDIR_NO_REPORT_STATUS; > > > > /* Create FDIR Filter Rule */ > > retval =3D rte_eth_dev_filter_ctrl(port_id, RTE_ETH_FILTER_FDIR, > > RTE_ETH_FILTER_ADD, &entry); > > if (retval !=3D 0) { > > rte_panic("Error: Could not add fdir UDP filter: %s\n", > > strerror(-retval)); > > } > > else { > > flag_is_port_fdir_initialised[portid] =3D 1; > > printf("Successfully added FDIR Filter Ctrl for NIC queue 3 > > of Port 0\n"); > > } > > > > /* fdir_create_filter_rule() will help in initializing the flow > > director table for portid > > * This takes time. So let us sleep(1), this will help in > > initializing properly the table > > * before we go ahead for adding other filter > > */ > > sleep(1); > > fdir_get_infos(portid); > > > > > > > > Thank you & Regards, > > Arun M