net/octeontx2: fix VF configuration fail

Message ID 1575297605-26773-1-git-send-email-hkalra@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series net/octeontx2: fix VF configuration fail |

Checks

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

Commit Message

Harman Kalra Dec. 2, 2019, 2:41 p.m. UTC
  Returning -ENOTSUP only in case loopback mode is enabled and
device is VF or SDP.

Fixes: c2c0aa75cd01 ("net/octeontx2: fix loopback config return for VF")
Cc: stable@dpdk.org

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

Comments

Jerin Jacob Jan. 13, 2020, 7:26 a.m. UTC | #1
On Mon, Dec 2, 2019 at 8:11 PM Harman Kalra <hkalra@marvell.com> wrote:
>
> Returning -ENOTSUP only in case loopback mode is enabled and
> device is VF or SDP.
>
> Fixes: c2c0aa75cd01 ("net/octeontx2: fix loopback config return for VF")
> Cc: stable@dpdk.org
>
> Signed-off-by: Harman Kalra <hkalra@marvell.com>
> ---

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 ed329273d..43c6107a8 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.c
> +++ b/drivers/net/octeontx2/otx2_ethdev.c
> @@ -204,7 +204,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))
> +       if (en && otx2_dev_is_vf_or_sdp(dev))
>                 return -ENOTSUP;
>
>         if (en)
> --
> 2.18.0
>
  

Patch

diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index ed329273d..43c6107a8 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -204,7 +204,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))
+	if (en && otx2_dev_is_vf_or_sdp(dev))
 		return -ENOTSUP;
 
 	if (en)