From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [dpdk-dev] [Bug 634] i40e: rte_flow doesn't allow RSS action on IPV4 only
Date: Wed, 03 Feb 2021 13:14:57 +0000 [thread overview]
Message-ID: <bug-634-3@http.bugs.dpdk.org/> (raw)
https://bugs.dpdk.org/show_bug.cgi?id=634
Bug ID: 634
Summary: i40e: rte_flow doesn't allow RSS action on IPV4 only
Product: DPDK
Version: 20.11
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: ethdev
Assignee: dev@dpdk.org
Reporter: frederic.coiffier@6cure.com
Target Milestone: ---
Hi,
If I use IPV4+TCP, it works fine :
```
memset(pattern, 0, sizeof(pattern));
memset(action, 0, sizeof(action));
memset(&attr, 0, sizeof(struct rte_flow_attr));
attr.ingress = 1;
action_rss = (struct rte_flow_action_rss){
.types = ETH_RSS_NONFRAG_IPV4_TCP | ETH_RSS_L3_SRC_ONLY,
.key_len = RSS_HASH_KEY_LENGTH,
.queue_num = 0,
.key = default_rss_hash_key,
};
pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4;
pattern[2].type = RTE_FLOW_ITEM_TYPE_TCP;
pattern[3].type = RTE_FLOW_ITEM_TYPE_END;
action[0].type = RTE_FLOW_ACTION_TYPE_RSS;
action[0].conf = &action_rss;
action[1].type = RTE_FLOW_ACTION_TYPE_END;
res = rte_flow_validate(port_id, &attr, pattern, action, error);
if (res) {
LOG_WARNING("rte_flow_validate() fails: %d %s", res, error->message);
return NULL;
}
flow = rte_flow_create(port_id, &attr, pattern, action, error);
if (!flow) {
LOG_WARNING("rte_flow_create() fails: %d %s", res, error->message);
return NULL;
}
LOG_DEBUG("rte_flow_create() success");
```
But as my purpose is to compute on IPv4 source for all IPv4 packets, I would
like :
```
memset(pattern, 0, sizeof(pattern));
memset(action, 0, sizeof(action));
memset(&attr, 0, sizeof(struct rte_flow_attr));
attr.ingress = 1;
action_rss = (struct rte_flow_action_rss){
.types = ETH_RSS_IP | ETH_RSS_L3_SRC_ONLY,
.key_len = RSS_HASH_KEY_LENGTH,
.queue_num = 0,
.key = default_rss_hash_key,
};
pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
pattern[1].type = RTE_FLOW_ITEM_TYPE_IPV4;
pattern[2].type = RTE_FLOW_ITEM_TYPE_END;
action[0].type = RTE_FLOW_ACTION_TYPE_RSS;
action[0].conf = &action_rss;
action[1].type = RTE_FLOW_ACTION_TYPE_END;
res = rte_flow_validate(port_id, &attr, pattern, action, error);
if (res) {
LOG_WARNING("rte_flow_validate() fails: %d %s", res, error->message);
/// TODO
exit(-1);
/// TODO
return NULL;
}
flow = rte_flow_create(port_id, &attr, pattern, action, error);
if (!flow) {
LOG_WARNING("rte_flow_create() fails: %d %s", res, error->message);
}
LOG_DEBUG("rte_flow_create() success\n");
```
But in this case, I get "multi pctype is not supported" error. And this is true
as I need `ETH_RSS_IPV4`, `ETH_RSS_FRAG_IPV4` and `ETH_RSS_NONFRAG_IPV4_OTHER`.
So, is this a limitation of the current i40e driver ? Is there a different way
to treat all IPv4 packets ? (and later, to treat IPv6 packets in the same way)
Regards,
Frédéric
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2021-02-03 13:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 13:14 bugzilla [this message]
2021-02-17 15:34 ` bugzilla
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=bug-634-3@http.bugs.dpdk.org/ \
--to=bugzilla@dpdk.org \
--cc=dev@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).