summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNelio Laranjeiro <nelio.laranjeiro@6wind.com>2018-02-27 10:36:43 +0100
committerYuanhan Liu <yliu@fridaylinux.org>2018-02-27 17:47:08 +0800
commit829da4bb879768d3e2f467c0e8d2cf60830a23e6 (patch)
treec02fb6588cf2a11f3fe9e48090fbc4850b1c84bc
parentadf59a9cf84336ed910548696fd835b06232495a (diff)
downloaddpdk-stable-829da4bb879768d3e2f467c0e8d2cf60830a23e6.zip
dpdk-stable-829da4bb879768d3e2f467c0e8d2cf60830a23e6.tar.gz
dpdk-stable-829da4bb879768d3e2f467c0e8d2cf60830a23e6.tar.xz
Revert "net/mlx5: fix flow priority on queue action"
This patch depends on another one not backported. For now it should be reverted to backport first the one missing and then re-apply this one. This reverts commit 0ec3529b056a826cee94104e20dfd3d58d64ab67.
-rw-r--r--drivers/net/mlx5/mlx5_flow.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 82efddc..c18c77d 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -882,6 +882,8 @@ priv_flow_convert_items_validate(struct priv *priv,
}
if (parser->drop) {
parser->drop_q.offset += cur_item->dst_sz;
+ } else if (parser->queues_n == 1) {
+ parser->queue[HASH_RXQ_ETH].offset += cur_item->dst_sz;
} else {
for (n = 0; n != hash_rxq_init_n; ++n)
parser->queue[n].offset += cur_item->dst_sz;
@@ -1124,6 +1126,19 @@ priv_flow_convert(struct priv *priv,
if (!parser->drop_q.ibv_attr)
return ENOMEM;
parser->drop_q.offset = sizeof(struct ibv_flow_attr);
+ } else if (parser->queues_n == 1) {
+ unsigned int priority =
+ attr->priority +
+ hash_rxq_init[HASH_RXQ_ETH].flow_priority;
+ unsigned int offset = parser->queue[HASH_RXQ_ETH].offset;
+
+ parser->queue[HASH_RXQ_ETH].ibv_attr =
+ priv_flow_convert_allocate(priv, priority,
+ offset, error);
+ if (!parser->queue[HASH_RXQ_ETH].ibv_attr)
+ return ENOMEM;
+ parser->queue[HASH_RXQ_ETH].offset =
+ sizeof(struct ibv_flow_attr);
} else {
for (i = 0; i != hash_rxq_init_n; ++i) {
unsigned int priority =
@@ -1173,9 +1188,22 @@ priv_flow_convert(struct priv *priv,
* Last step. Complete missing specification to reach the RSS
* configuration.
*/
- if (!parser->drop) {
+ if (parser->drop) {
+ /*
+ * Drop queue priority needs to be adjusted to
+ * their most specific layer priority.
+ */
+ parser->drop_q.ibv_attr->priority =
+ attr->priority +
+ hash_rxq_init[parser->layer].flow_priority;
+ } else if (parser->queues_n > 1) {
priv_flow_convert_finalise(priv, parser);
} else {
+ /*
+ * Action queue have their priority overridden with
+ * Ethernet priority, this priority needs to be adjusted to
+ * their most specific layer priority.
+ */
parser->queue[HASH_RXQ_ETH].ibv_attr->priority =
attr->priority +
hash_rxq_init[parser->layer].flow_priority;