DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check
@ 2020-04-28 13:37 Andrew Rybchenko
  2020-04-28 13:37 ` [dpdk-dev] [PATCH 2/3] net/sfc/base: use simpler EF10 family run-time checks Andrew Rybchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andrew Rybchenko @ 2020-04-28 13:37 UTC (permalink / raw)
  To: dev; +Cc: stable

Fixes: 4f12e20c85dc ("net/sfc/base: introduce EVB module for SR-IOV")
Fixes: 18c8e84d7726 ("net/sfc/base: support proxy auth operations for SR-IOV")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_evb.c  | 4 ++--
 drivers/net/sfc/base/efx_evb.c   | 4 ++--
 drivers/net/sfc/base/efx_proxy.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
index a1528508ea..f290339f2f 100644
--- a/drivers/net/sfc/base/ef10_evb.c
+++ b/drivers/net/sfc/base/ef10_evb.c
@@ -9,7 +9,7 @@
 
 #if EFSYS_OPT_EVB
 
-#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
+#if EFX_OPTS_EF10()
 
 	__checkReturn	efx_rc_t
 ef10_evb_init(
@@ -549,5 +549,5 @@ ef10_evb_vport_stats(
 			EFX_STATS_UPLOAD, 0));
 }
 
-#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
+#endif /* EFX_OPTS_EF10() */
 #endif /* EFSYS_OPT_EVB */
diff --git a/drivers/net/sfc/base/efx_evb.c b/drivers/net/sfc/base/efx_evb.c
index 9725ba1f45..17318b7e11 100644
--- a/drivers/net/sfc/base/efx_evb.c
+++ b/drivers/net/sfc/base/efx_evb.c
@@ -28,7 +28,7 @@ static const efx_evb_ops_t	__efx_evb_dummy_ops = {
 };
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
+#if EFX_OPTS_EF10()
 static const efx_evb_ops_t	__efx_evb_ef10_ops = {
 	ef10_evb_init,			/* eeo_init */
 	ef10_evb_fini,			/* eeo_fini */
@@ -44,7 +44,7 @@ static const efx_evb_ops_t	__efx_evb_ef10_ops = {
 	ef10_evb_vport_reconfigure,	/* eeo_vport_reconfigure */
 	ef10_evb_vport_stats,		/* eeo_vport_stats */
 };
-#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
+#endif /* EFX_OPTS_EF10() */
 
 	__checkReturn	efx_rc_t
 efx_evb_init(
diff --git a/drivers/net/sfc/base/efx_proxy.c b/drivers/net/sfc/base/efx_proxy.c
index 5b4e98c381..24baa5a3a4 100644
--- a/drivers/net/sfc/base/efx_proxy.c
+++ b/drivers/net/sfc/base/efx_proxy.c
@@ -23,7 +23,7 @@ static const efx_proxy_ops_t	__efx_proxy_dummy_ops = {
 };
 #endif /* EFSYS_OPT_SIENA */
 
-#if EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2
+#if EFX_OPTS_EF10()
 static const efx_proxy_ops_t			__efx_proxy_ef10_ops = {
 	ef10_proxy_auth_init,			/* epo_init */
 	ef10_proxy_auth_fini,			/* epo_fini */
@@ -35,7 +35,7 @@ static const efx_proxy_ops_t			__efx_proxy_ef10_ops = {
 	ef10_proxy_auth_exec_cmd,		/* epo_exec_cmd */
 	ef10_proxy_auth_get_privilege_mask,	/* epo_get_privilege_mask */
 };
-#endif /* EFSYS_OPT_HUNTINGTON || EFSYS_OPT_MEDFORD || EFSYS_OPT_MEDFORD2 */
+#endif /* EFX_OPTS_EF10() */
 
 	__checkReturn	efx_rc_t
 efx_proxy_auth_init(
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 2/3] net/sfc/base: use simpler EF10 family run-time checks
  2020-04-28 13:37 [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check Andrew Rybchenko
@ 2020-04-28 13:37 ` Andrew Rybchenko
  2020-04-28 13:37 ` [dpdk-dev] [PATCH 3/3] net/sfc/base: fix build when EVB is enabled Andrew Rybchenko
  2020-05-01 14:21 ` [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check Ferruh Yigit
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Rybchenko @ 2020-04-28 13:37 UTC (permalink / raw)
  To: dev; +Cc: stable

Fixes: 4625c4f5277d ("net/sfc/base: factor out upstream port vAdaptor allocation")
Fixes: 4f12e20c85dc ("net/sfc/base: introduce EVB module for SR-IOV")
Fixes: 18c8e84d7726 ("net/sfc/base: support proxy auth operations for SR-IOV")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_evb.c   | 8 ++------
 drivers/net/sfc/base/ef10_nic.c   | 4 +---
 drivers/net/sfc/base/ef10_proxy.c | 8 ++------
 3 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
index f290339f2f..d541db4980 100644
--- a/drivers/net/sfc/base/ef10_evb.c
+++ b/drivers/net/sfc/base/ef10_evb.c
@@ -15,9 +15,7 @@
 ef10_evb_init(
 	__in		efx_nic_t *enp)
 {
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		enp->en_family == EFX_FAMILY_MEDFORD ||
-		enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 
 	return (0);
 }
@@ -26,9 +24,7 @@ ef10_evb_init(
 ef10_evb_fini(
 	__in		efx_nic_t *enp)
 {
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		enp->en_family == EFX_FAMILY_MEDFORD ||
-		enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 }
 
 	__checkReturn	efx_rc_t
diff --git a/drivers/net/sfc/base/ef10_nic.c b/drivers/net/sfc/base/ef10_nic.c
index d1802da0bd..34fa45e8c1 100644
--- a/drivers/net/sfc/base/ef10_nic.c
+++ b/drivers/net/sfc/base/ef10_nic.c
@@ -2288,9 +2288,7 @@ ef10_nic_init(
 	efx_rc_t rc;
 	boolean_t alloc_vadaptor = B_TRUE;
 
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-	    enp->en_family == EFX_FAMILY_MEDFORD ||
-	    enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 
 	/* Enable reporting of some events (e.g. link change) */
 	if ((rc = efx_mcdi_log_ctrl(enp)) != 0)
diff --git a/drivers/net/sfc/base/ef10_proxy.c b/drivers/net/sfc/base/ef10_proxy.c
index 9be9e221d5..19c11c6ebc 100644
--- a/drivers/net/sfc/base/ef10_proxy.c
+++ b/drivers/net/sfc/base/ef10_proxy.c
@@ -13,9 +13,7 @@
 ef10_proxy_auth_init(
 	__in		efx_nic_t *enp)
 {
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		enp->en_family == EFX_FAMILY_MEDFORD ||
-		enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 
 	return (0);
 }
@@ -24,9 +22,7 @@ ef10_proxy_auth_init(
 ef10_proxy_auth_fini(
 	__in		efx_nic_t *enp)
 {
-	EFSYS_ASSERT(enp->en_family == EFX_FAMILY_HUNTINGTON ||
-		enp->en_family == EFX_FAMILY_MEDFORD ||
-		enp->en_family == EFX_FAMILY_MEDFORD2);
+	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 }
 
 static	__checkReturn	efx_rc_t
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [dpdk-dev] [PATCH 3/3] net/sfc/base: fix build when EVB is enabled
  2020-04-28 13:37 [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check Andrew Rybchenko
  2020-04-28 13:37 ` [dpdk-dev] [PATCH 2/3] net/sfc/base: use simpler EF10 family run-time checks Andrew Rybchenko
@ 2020-04-28 13:37 ` Andrew Rybchenko
  2020-05-01 14:21 ` [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check Ferruh Yigit
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Rybchenko @ 2020-04-28 13:37 UTC (permalink / raw)
  To: dev; +Cc: stable

Make local MCDI helper functions static.

Fixes: f0bda0cd680d ("net/sfc/base: add MCDI wrappers for vPort and vSwitch in EVB")
Fixes: ea94d14dbea0 ("net/sfc/base: provide APIs to configure and reset vPort")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/ef10_evb.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/sfc/base/ef10_evb.c b/drivers/net/sfc/base/ef10_evb.c
index d541db4980..aeeaa5189f 100644
--- a/drivers/net/sfc/base/ef10_evb.c
+++ b/drivers/net/sfc/base/ef10_evb.c
@@ -27,7 +27,7 @@ ef10_evb_fini(
 	EFSYS_ASSERT(EFX_FAMILY_IS_EF10(enp));
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_vswitch_alloc(
 	__in		efx_nic_t *enp,
 	__in		efx_vport_id_t vport_id,
@@ -94,7 +94,7 @@ efx_mcdi_vswitch_alloc(
 	return (rc);
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_vswitch_free(
 	__in		efx_nic_t *enp)
 {
@@ -125,7 +125,7 @@ efx_mcdi_vswitch_free(
 	return (rc);
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_vport_alloc(
 	__in		efx_nic_t *enp,
 	__in		efx_vport_type_t vport_type,
@@ -188,7 +188,7 @@ efx_mcdi_vport_alloc(
 	return (rc);
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_vport_free(
 	__in		efx_nic_t *enp,
 	__in		efx_vport_id_t vport_id)
@@ -219,7 +219,7 @@ efx_mcdi_vport_free(
 	return (rc);
 }
 
-	__checkReturn			efx_rc_t
+static	__checkReturn			efx_rc_t
 efx_mcdi_vport_mac_addr_add(
 	__in				efx_nic_t *enp,
 	__in				efx_vport_id_t vport_id,
@@ -254,7 +254,7 @@ efx_mcdi_vport_mac_addr_add(
 	return (rc);
 }
 
-	__checkReturn			efx_rc_t
+static	__checkReturn			efx_rc_t
 efx_mcdi_vport_mac_addr_del(
 	__in				efx_nic_t *enp,
 	__in				efx_vport_id_t vport_id,
@@ -289,7 +289,7 @@ efx_mcdi_vport_mac_addr_del(
 	return (rc);
 }
 
-	__checkReturn	efx_rc_t
+static	__checkReturn	efx_rc_t
 efx_mcdi_port_assign(
 	__in		efx_nic_t *enp,
 	__in		efx_vport_id_t vport_id,
@@ -326,7 +326,7 @@ efx_mcdi_port_assign(
 	return (rc);
 }
 
-	__checkReturn				efx_rc_t
+static	__checkReturn				efx_rc_t
 efx_mcdi_vport_reconfigure(
 	__in					efx_nic_t *enp,
 	__in					efx_vport_id_t vport_id,
-- 
2.17.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check
  2020-04-28 13:37 [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check Andrew Rybchenko
  2020-04-28 13:37 ` [dpdk-dev] [PATCH 2/3] net/sfc/base: use simpler EF10 family run-time checks Andrew Rybchenko
  2020-04-28 13:37 ` [dpdk-dev] [PATCH 3/3] net/sfc/base: fix build when EVB is enabled Andrew Rybchenko
@ 2020-05-01 14:21 ` Ferruh Yigit
  2 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2020-05-01 14:21 UTC (permalink / raw)
  To: Andrew Rybchenko, dev; +Cc: stable

On 4/28/2020 2:37 PM, Andrew Rybchenko wrote:
> Fixes: 4f12e20c85dc ("net/sfc/base: introduce EVB module for SR-IOV")
> Fixes: 18c8e84d7726 ("net/sfc/base: support proxy auth operations for SR-IOV")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-01 14:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 13:37 [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check Andrew Rybchenko
2020-04-28 13:37 ` [dpdk-dev] [PATCH 2/3] net/sfc/base: use simpler EF10 family run-time checks Andrew Rybchenko
2020-04-28 13:37 ` [dpdk-dev] [PATCH 3/3] net/sfc/base: fix build when EVB is enabled Andrew Rybchenko
2020-05-01 14:21 ` [dpdk-dev] [PATCH 1/3] net/sfc/base: use simpler EF10 family conditional code check Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).