Skip to contentSkip to conversation

net/octeontx2: error on loopback mode for VFs

PATCH Applied Sunil Kumar Kori 2 participants 2 messages Nov 26, 2019 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/octeontx2: error on loopback mode for VFs

loopback mode is not supported for VFs so returning error if VF is being configured with loopback mode.

Fixes 920717e4d8ba ("net/octeontx2: add device start operation")
---
 drivers/net/octeontx2/otx2_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/octeontx2/otx2_ethdev.c +1 -1
index ddab3aa06..70eebaef1 100644
@@ -205,7 +205,7 @@ cgx_intlbk_enable(struct otx2_eth_dev *dev, bool en)
 	struct otx2_mbox *mbox = dev->mbox;
 
 	if (otx2_dev_is_vf_or_sdp(dev))
-		return 0;
+		return -ENOTSUP;
 
 	if (en)
 		otx2_mbox_alloc_msg_cgx_intlbk_enable(mbox);
Signature · 1 line
2.17.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 5 lines · Sunil Kumar Kori

loopback mode is not supported for VFs so returning error if VF is being configured with loopback mode.

Fixes 920717e4d8ba ("net/octeontx2: add device start operation")
Quoted 3 lines

---

Changed the subject to: net/octeontx2: fix loopback config return value for VF

Applied to dpdk-next-net-mrvl/master. Thanks

Quoted 19 lines
 drivers/net/octeontx2/otx2_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/octeontx2/otx2_ethdev.c +1 -2
index ddab3aa06..70eebaef1 100644
@@ -205,7 +205,7 @@ cgx_intlbk_enable(struct otx2_eth_dev *dev, bool en)
        struct otx2_mbox *mbox = dev->mbox;
 
        if (otx2_dev_is_vf_or_sdp(dev))
-               return 0;
+               return -ENOTSUP;
 
        if (en)
                otx2_mbox_alloc_msg_cgx_intlbk_enable(mbox);
--

2.17.1