From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D8451A00BE; Tue, 28 Apr 2020 15:37:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4582A1D5E3; Tue, 28 Apr 2020 15:37:42 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id D89AF1D5B3; Tue, 28 Apr 2020 15:37:38 +0200 (CEST) Received: from mx1-us1.ppe-hosted.com (unknown [10.7.65.61]) by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 5AC1E60088; Tue, 28 Apr 2020 13:37:38 +0000 (UTC) Received: from us4-mdac16-31.ut7.mdlocal (unknown [10.7.66.142]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 5932F800A4; Tue, 28 Apr 2020 13:37:38 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.7.66.34]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id C90D180056; Tue, 28 Apr 2020 13:37:37 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 773A3600057; Tue, 28 Apr 2020 13:37:37 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 28 Apr 2020 14:37:33 +0100 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 28 Apr 2020 14:37:33 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 03SDbXsi006727; Tue, 28 Apr 2020 14:37:33 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 1245F1627D7; Tue, 28 Apr 2020 14:37:33 +0100 (BST) From: Andrew Rybchenko To: CC: Date: Tue, 28 Apr 2020 14:37:25 +0100 Message-ID: <1588081046-15862-2-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1588081046-15862-1-git-send-email-arybchenko@solarflare.com> References: <1588081046-15862-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1020-25382.003 X-TM-AS-Result: No-6.817400-8.000000-10 X-TMASE-MatchedRID: p9rK+f8v5s++G6+qk5NchmwTEruL9ObTLjmiN0TsUBY4WKr1PmPdtSfv jIw0L/xOpXgeUFMvSJ3MdHm3E7kFwCHhSBQfglfsA9lly13c/gGOz/LLJUcaHsYnQg0xziu3Vwg /aHwqa2a2+AvuzWOiTkwUN9h43Ep75Wx142l2+L/4KPASpfWnuWcCy3wC35zdmyiLZetSf8mfop 0ytGwvXiq2rl3dzGQ14JOWFX6dWH3ocUyPos8PBEf6UssVtFUJlEfk2N8z/GxHtHn1FJ/oMMC+k sT6a9fy X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--6.817400-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1020-25382.003 X-MDID: 1588081058-Ks2lW3JyME4e Subject: [dpdk-dev] [PATCH 2/3] net/sfc/base: use simpler EF10 family run-time checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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