From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH 2/3] net/sfc/base: use simpler EF10 family run-time checks
Date: Tue, 28 Apr 2020 14:37:25 +0100 [thread overview]
Message-ID: <1588081046-15862-2-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1588081046-15862-1-git-send-email-arybchenko@solarflare.com>
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
next prev parent reply other threads:[~2020-04-28 13:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1588081046-15862-2-git-send-email-arybchenko@solarflare.com \
--to=arybchenko@solarflare.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).