[v2] net/dpaa2: fix dpdmux default interface

Message ID 20220329220107.2523-1-laitianli@tom.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v2] net/dpaa2: fix dpdmux default interface |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Tianli Lai March 29, 2022, 10:01 p.m. UTC
  if dpdmux objects created by restool tools with
the argument "--default-if=<if-id-number>", this
function would change it to 1

Fixes: 1def64c2d79e ("net/dpaa2: add dpdmux initialization and configuration")
Cc: nipun.gupta@nxp.com

Signed-off-by: Tianli Lai <laitianli@tom.com>
---
 drivers/net/dpaa2/dpaa2_mux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Hemant Agrawal March 31, 2022, 10:19 a.m. UTC | #1
Acked-by:  Hemant Agrawal <hemant.agrawal@nxp.com>

On 3/30/2022 3:31 AM, Tianli Lai wrote:
> if dpdmux objects created by restool tools with
> the argument "--default-if=<if-id-number>", this
> function would change it to 1
>
> Fixes: 1def64c2d79e ("net/dpaa2: add dpdmux initialization and configuration")
> Cc: nipun.gupta@nxp.com
>
> Signed-off-by: Tianli Lai <laitianli@tom.com>
> ---
>   drivers/net/dpaa2/dpaa2_mux.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
> index bd4596b891..e8689a7832 100644
> --- a/drivers/net/dpaa2/dpaa2_mux.c
> +++ b/drivers/net/dpaa2/dpaa2_mux.c
> @@ -296,7 +296,7 @@ dpaa2_create_dpdmux_device(int vdev_fd __rte_unused,
>   	}
>   
>   	ret = dpdmux_if_set_default(&dpdmux_dev->dpdmux, CMD_PRI_LOW,
> -				    dpdmux_dev->token, 1);
> +				    dpdmux_dev->token, attr.default_if);
>   	if (ret) {
>   		DPAA2_PMD_ERR("setting default interface failed in %s",
>   			      __func__);
  
Thomas Monjalon April 7, 2022, 8:33 a.m. UTC | #2
31/03/2022 12:19, Hemant Agrawal:
> Acked-by:  Hemant Agrawal <hemant.agrawal@nxp.com>
> 
> On 3/30/2022 3:31 AM, Tianli Lai wrote:
> > if dpdmux objects created by restool tools with
> > the argument "--default-if=<if-id-number>", this
> > function would change it to 1
> >
> > Fixes: 1def64c2d79e ("net/dpaa2: add dpdmux initialization and configuration")
> > Cc: nipun.gupta@nxp.com
> >
> > Signed-off-by: Tianli Lai <laitianli@tom.com>

Applied in next-net, thanks.
  

Patch

diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c
index bd4596b891..e8689a7832 100644
--- a/drivers/net/dpaa2/dpaa2_mux.c
+++ b/drivers/net/dpaa2/dpaa2_mux.c
@@ -296,7 +296,7 @@  dpaa2_create_dpdmux_device(int vdev_fd __rte_unused,
 	}
 
 	ret = dpdmux_if_set_default(&dpdmux_dev->dpdmux, CMD_PRI_LOW,
-				    dpdmux_dev->token, 1);
+				    dpdmux_dev->token, attr.default_if);
 	if (ret) {
 		DPAA2_PMD_ERR("setting default interface failed in %s",
 			      __func__);