net/octeontx2: error on loopback mode for VFs

Message ID 20191126070358.11322-1-skori@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series net/octeontx2: error on loopback mode for VFs |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/iol-compilation success Compile Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS

Commit Message

Sunil Kumar Kori Nov. 26, 2019, 7:03 a.m. UTC
  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")

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
---
 drivers/net/octeontx2/otx2_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jerin Jacob Nov. 26, 2019, 7:34 a.m. UTC | #1
On Tue, Nov 26, 2019 at 4:04 PM Sunil Kumar Kori <skori@marvell.com> wrote:
>
> 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")

Cc: stable@dpdk.org

>
> Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
> ---

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

Acked-by: Jerin Jacob <jerinj@marvell.com>

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


>  drivers/net/octeontx2/otx2_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
> index ddab3aa06..70eebaef1 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.c
> +++ b/drivers/net/octeontx2/otx2_ethdev.c
> @@ -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
>
  

Patch

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index ddab3aa06..70eebaef1 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -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);