aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx5/mlx5_fdir.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2017-07-03 15:13:28 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2017-07-03 15:14:25 +0100
commit5c594d59c6927b6374fa59e16da3830507300321 (patch)
tree17ec0a2158cf2460e8f2ea3a1cf86ce87164e138 /drivers/net/mlx5/mlx5_fdir.c
parent155502af1a45fa9474d56d4389dcba4e1e2c9f6d (diff)
parentbf7567fd2a5b0b28ab724046143c24561d38d015 (diff)
Merge 17.05.1 into 17.05.x
Change-Id: I65fdca844ad178ec6e2c086d45b901df93b55e58 Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_fdir.c')
-rw-r--r--drivers/net/mlx5/mlx5_fdir.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/mlx5/mlx5_fdir.c b/drivers/net/mlx5/mlx5_fdir.c
index f80c58b4..c8d47489 100644
--- a/drivers/net/mlx5/mlx5_fdir.c
+++ b/drivers/net/mlx5/mlx5_fdir.c
@@ -144,6 +144,7 @@ fdir_filter_to_flow_desc(const struct rte_eth_fdir_filter *fdir_filter,
case RTE_ETH_FLOW_NONFRAG_IPV4_TCP:
desc->src_port = fdir_filter->input.flow.udp4_flow.src_port;
desc->dst_port = fdir_filter->input.flow.udp4_flow.dst_port;
+ /* fallthrough */
case RTE_ETH_FLOW_NONFRAG_IPV4_OTHER:
desc->src_ip[0] = fdir_filter->input.flow.ip4_flow.src_ip;
desc->dst_ip[0] = fdir_filter->input.flow.ip4_flow.dst_ip;
@@ -733,9 +734,11 @@ priv_fdir_disable(struct priv *priv)
/* Destroy flow director context in each RX queue. */
for (i = 0; (i != priv->rxqs_n); i++) {
- struct rxq_ctrl *rxq_ctrl =
- container_of((*priv->rxqs)[i], struct rxq_ctrl, rxq);
+ struct rxq_ctrl *rxq_ctrl;
+ if (!(*priv->rxqs)[i])
+ continue;
+ rxq_ctrl = container_of((*priv->rxqs)[i], struct rxq_ctrl, rxq);
if (!rxq_ctrl->fdir_queue)
continue;
priv_fdir_queue_destroy(priv, rxq_ctrl->fdir_queue);