From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua0-f180.google.com (mail-ua0-f180.google.com [209.85.217.180]) by dpdk.org (Postfix) with ESMTP id 219978D8C for ; Wed, 18 Apr 2018 07:50:26 +0200 (CEST) Received: by mail-ua0-f180.google.com with SMTP id g10so356449ual.6 for ; Tue, 17 Apr 2018 22:50:26 -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=WBqWKOPnAiT5WlfjYgAtqQZxC0uZSy+HFv8VMC/YYuA=; b=a/xsW5PalzBsAJbIiLqCS2L2+LvTCoS7YYlajjO+V+JOMyoM40l89NXKYX6xwr80j1 e+6f0uU3mK73Sc3SRVUvjIBInVZECw8IYkJoIoQjU4uLMceBi7iH2sfYHoLRpJf1hukb ZfEfjuPMxbitxu3j7olNlprXIfbFCvMC8zUqPvWQSf+X1WD11Lx+84/oJ9fCnoZNmxh4 Eag5CaphS/zEimb4F5AehxFkBU8IX+UTQ3fM2ahRhwp1SmaXmxUciz2ZIUMXpR7DKev9 LmfI4qrsd6Fqn97ywROrXw9isw8xPwcSlF5FXch5ybocUPXInoBRYz15Q1JDsji7GQQo Lx6A== 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=WBqWKOPnAiT5WlfjYgAtqQZxC0uZSy+HFv8VMC/YYuA=; b=Oa3OYKgUgu0S1i5SEc5/UFMUyYwjaKVV7I6sDyw7HQSnYsby9lGWPT+13wItFvDkUi VgpjD54q2EkhElG++vL5pgTAaUTAVdMK6hU4Gmok9UWPVBf7TW7qFuRZ9wKy0Wy2o56Y v7I1vmaCvGhcH0mWKdq5kGkA/Okx3XuV/pJf3HlxF7H19/s7lZh4k4YrakwxVhEnduua w20xxLCgi26c2/1QriuDK9JnQRD4DvUiC/24GGX58+RUuh+4P4lnMeAsffOATvBtxPsx t2F8t6cVu4svM9C/fMKcicgpMwoPgOhc1U86icWoVmL75i12DP1cZoNNn/Mza+8lYlhT 3mbA== X-Gm-Message-State: ALQs6tA/JwU+sKGyJfuli7D02jOquqgVGppHfkwe5lInR5h5LOJrPCRe 58C8q6UBA+Cmk8ivIBTk8ZvonXLwrAV1rs7UAfvHesAt X-Google-Smtp-Source: AIpwx49NVcfnqmvsUhO3n8/iQ9R0frmHLEHqc9TawgZesUKth8mfenHcyM2CQqWScqW6Y26kYmasAorPJAEz/jC04BY= X-Received: by 10.176.24.108 with SMTP id j44mr452771uag.25.1524030625091; Tue, 17 Apr 2018 22:50:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.83.136 with HTTP; Tue, 17 Apr 2018 22:50:04 -0700 (PDT) From: Arun M Date: Wed, 18 Apr 2018 11:20:04 +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: [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: Wed, 18 Apr 2018 05:50:26 -0000 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 crea= tion */* 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