* [dpdk-dev] [PATCH] net/mlx5: fix VLAN configuration after port stop
@ 2017-12-13 14:03 Shahaf Shuler
2017-12-21 14:45 ` [dpdk-dev] [dpdk-stable] " Shahaf Shuler
0 siblings, 1 reply; 2+ messages in thread
From: Shahaf Shuler @ 2017-12-13 14:03 UTC (permalink / raw)
To: nelio.laranjeiro, yskoh, adrien.mazarguil; +Cc: dev, stable
Ethdev layer has an API to configure vlan setting on the flight, i.e.
when the port state is start.
calling such API when the port is stopped may cause segmentation fault
as the related Verbs contexts has not been created yet.
Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue objects")
Cc: nelio.laranjeiro@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_vlan.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_vlan.c b/drivers/net/mlx5/mlx5_vlan.c
index 6fc315ef3..198a69e3c 100644
--- a/drivers/net/mlx5/mlx5_vlan.c
+++ b/drivers/net/mlx5/mlx5_vlan.c
@@ -127,6 +127,11 @@ priv_vlan_strip_queue_set(struct priv *priv, uint16_t idx, int on)
DEBUG("set VLAN offloads 0x%x for port %d queue %d",
vlan_offloads, rxq->port_id, idx);
+ if (!rxq_ctrl->ibv) {
+ /* Update related bits in RX queue. */
+ rxq->vlan_strip = !!on;
+ return;
+ }
mod = (struct ibv_wq_attr){
.attr_mask = IBV_WQ_ATTR_FLAGS,
.flags_mask = IBV_WQ_FLAGS_CVLAN_STRIPPING,
--
2.12.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/mlx5: fix VLAN configuration after port stop
2017-12-13 14:03 [dpdk-dev] [PATCH] net/mlx5: fix VLAN configuration after port stop Shahaf Shuler
@ 2017-12-21 14:45 ` Shahaf Shuler
0 siblings, 0 replies; 2+ messages in thread
From: Shahaf Shuler @ 2017-12-21 14:45 UTC (permalink / raw)
To: Shahaf Shuler, Nélio Laranjeiro, Yongseok Koh, Adrien Mazarguil
Cc: dev, stable
Wednesday, December 13, 2017 4:03 PM, Shahaf Shuler:
> Ethdev layer has an API to configure vlan setting on the flight, i.e.
> when the port state is start.
>
> calling such API when the port is stopped may cause segmentation fault as
> the related Verbs contexts has not been created yet.
>
> Fixes: 09cb5b581762 ("net/mlx5: separate DPDK from verbs Rx queue
> objects")
> Cc: nelio.laranjeiro@6wind.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
Applied to next-net-mlx, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-21 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-13 14:03 [dpdk-dev] [PATCH] net/mlx5: fix VLAN configuration after port stop Shahaf Shuler
2017-12-21 14:45 ` [dpdk-dev] [dpdk-stable] " Shahaf Shuler
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).