From: Arun M <arun.m.b@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] Flow Director feature on Fortville XL710 adapter not working
Date: Wed, 18 Apr 2018 11:20:04 +0530 [thread overview]
Message-ID: <CAKe1bTE+2oMASTsuoNBFUyrEguHKntJpYWZYrXmeJGAYwA_DBA@mail.gmail.com> (raw)
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 = 0;
/* Check FDIR Support and Flush FDIR Entries */
retval = 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 = 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 = RTE_ETH_FDIR_FILTER_INPUT_SET_SELECT;
#if 1
/* Try flow-type ipv4-other */
filter_info.info.input_set_conf.flow_type =
*RTE_ETH_FLOW_NONFRAG_IPV4_OTHER*;
filter_info.info.input_set_conf.inset_size = 2;
filter_info.info.input_set_conf.field[0] =
RTE_ETH_INPUT_SET_L3_SRC_IP4;
filter_info.info.input_set_conf.field[1] =
RTE_ETH_INPUT_SET_L3_DST_IP4;
#else
/* Try flow-type ipv4-udp */
filter_info.info.input_set_conf.flow_type =
RTE_ETH_FLOW_NONFRAG_IPV4_UDP;
filter_info.info.input_set_conf.inset_size = 2;
filter_info.info.input_set_conf.field[0] =
RTE_ETH_INPUT_SET_L3_DST_IP4;
filter_info.info.input_set_conf.field[1] =
RTE_ETH_INPUT_SET_L4_UDP_DST_PORT;
#endif
filter_info.info.input_set_conf.op = RTE_ETH_INPUT_SET_SELECT;
retval = rte_eth_dev_filter_ctrl(portid, RTE_ETH_FILTER_FDIR,
RTE_ETH_FILTER_SET, &filter_info);
if (retval != 0) {
rte_panic("Error: Could not set fdir info: %s\n",
strerror(-retval));
}
*/* End of Code Block 1 */*
*/* Start of Code Block 2 – 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 = 2;
#if 1
entry.input.flow_type = RTE_ETH_FLOW_NONFRAG_IPV4_OTHER;
entry.input.flow.ip4_flow.src_ip = IPv4(0x7f, 0x04, 0x01, 0x01); /*
0x7F040101 */
entry.input.flow.ip4_flow.dst_ip = IPv4(0x7f, 0x06, 0x03, 0xBC); /*
0x7F0603BC - Dummy IP Address */
#else
entry.input.flow_type = RTE_ETH_FLOW_NONFRAG_IPV4_UDP;
entry.input.flow.udp4_flow.ip.dst_ip = IPv4(0x7f, 0x06, 0x03,
0xBC);
entry.input.flow.udp4_flow.dst_port = rte_cpu_to_be_16(10000);
#endif
entry.action.*rx_queue = 3*;
entry.action.behavior = RTE_ETH_FDIR_ACCEPT;
entry.action.report_status = RTE_ETH_FDIR_NO_REPORT_STATUS;
/* Create FDIR Filter Rule */
retval = rte_eth_dev_filter_ctrl(port_id, RTE_ETH_FILTER_FDIR,
RTE_ETH_FILTER_ADD, &entry);
if (retval != 0) {
rte_panic("Error: Could not add fdir UDP filter: %s\n",
strerror(-retval));
}
else {
flag_is_port_fdir_initialised[portid] = 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
next reply other threads:[~2018-04-18 5:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 5:50 Arun M [this message]
2018-04-18 10:20 ` Richard Nutman
2018-04-19 6:55 Arun M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKe1bTE+2oMASTsuoNBFUyrEguHKntJpYWZYrXmeJGAYwA_DBA@mail.gmail.com \
--to=arun.m.b@gmail.com \
--cc=users@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).