net/ice: enable flow redirect on switch
[dpdk.git] / drivers / net / octeontx2 / otx2_ethdev.c
index e10033e..3116e5c 100644 (file)
@@ -112,6 +112,12 @@ nix_lf_switch_header_type_enable(struct otx2_eth_dev *dev, bool enable)
        if (dev->npc_flow.switch_header_type == 0)
                return 0;
 
+       if (dev->npc_flow.switch_header_type == OTX2_PRIV_FLAGS_LEN_90B &&
+           !otx2_dev_is_sdp(dev)) {
+               otx2_err("chlen90b is not supported on non-SDP device");
+               return -EINVAL;
+       }
+
        /* Notify AF about higig2 config */
        req = otx2_mbox_alloc_msg_npc_set_pkind(mbox);
        req->mode = dev->npc_flow.switch_header_type;