- mod = (struct ibv_wq_attr){
- .attr_mask = IBV_WQ_ATTR_FLAGS,
- .flags_mask = IBV_WQ_FLAGS_CVLAN_STRIPPING,
- .flags = vlan_offloads,
- };
- ret = mlx5_glue->modify_wq(rxq_ctrl->obj->wq, &mod);
+ if (rxq_ctrl->obj->type == MLX5_RXQ_OBJ_TYPE_IBV) {
+ mod = (struct ibv_wq_attr){
+ .attr_mask = IBV_WQ_ATTR_FLAGS,
+ .flags_mask = IBV_WQ_FLAGS_CVLAN_STRIPPING,
+ .flags = vlan_offloads,
+ };
+ ret = mlx5_glue->modify_wq(rxq_ctrl->obj->wq, &mod);
+ } else if (rxq_ctrl->obj->type == MLX5_RXQ_OBJ_TYPE_DEVX_RQ) {
+ struct mlx5_devx_modify_rq_attr rq_attr;
+
+ memset(&rq_attr, 0, sizeof(rq_attr));
+ rq_attr.rq_state = MLX5_RQC_STATE_RDY;
+ rq_attr.state = MLX5_RQC_STATE_RDY;
+ rq_attr.vsd = (on ? 0 : 1);
+ rq_attr.modify_bitmask = MLX5_MODIFY_RQ_IN_MODIFY_BITMASK_VSD;
+ ret = mlx5_devx_cmd_modify_rq(rxq_ctrl->obj->rq, &rq_attr);
+ }