From: Yongseok Koh Date: Wed, 10 Jan 2018 17:50:38 +0000 (-0800) Subject: net/mlx5: fix missing attribute size for drop action X-Git-Tag: spdx-start~317 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=64a5a065cfb2b468ce47b09ffe9a62859656bc26;p=dpdk.git net/mlx5: fix missing attribute size for drop action Adding the size of ibv_flow_spec_action_drop is missing. This can cause overflow when converting rte_flow to ibv_flow and thus corrupt memory. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Cc: stable@dpdk.org Signed-off-by: Yongseok Koh Acked-by: Nelio Laranjeiro --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 305b2ec019..ff9fd78d5f 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -868,6 +868,10 @@ priv_flow_convert_items_validate(struct priv *priv, parser->queue[n].offset += cur_item->dst_sz; } } + if (parser->drop) { + parser->queue[HASH_RXQ_ETH].offset += + sizeof(struct ibv_flow_spec_action_drop); + } if (parser->mark) { for (i = 0; i != hash_rxq_init_n; ++i) parser->queue[i].offset +=