From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 3750EA0495 for ; Mon, 10 Jun 2019 09:41:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AA0401BF17; Mon, 10 Jun 2019 09:39:29 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 8BA591BE9A for ; Mon, 10 Jun 2019 09:38:57 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us5.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 971174C0058 for ; Mon, 10 Jun 2019 07:38:56 +0000 (UTC) Received: from ocex03.SolarFlarecom.com (10.20.40.36) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 10 Jun 2019 00:38:51 -0700 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 10 Jun 2019 00:38:51 -0700 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 x5A7co91008861; Mon, 10 Jun 2019 08:38:50 +0100 Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 3F9DD1627D7; Mon, 10 Jun 2019 08:38:50 +0100 (BST) From: Andrew Rybchenko To: CC: Gautam Dawar Date: Mon, 10 Jun 2019 08:38:40 +0100 Message-ID: <1560152324-20538-26-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1560152324-20538-1-git-send-email-arybchenko@solarflare.com> References: <1560152324-20538-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.1010-24664.003 X-TM-AS-Result: No-7.049200-4.000000-10 X-TMASE-MatchedRID: NBaf7L9yAkq0B54WkceBoD42t8NRMRfESWg+u4ir2NN6pt1oU+C/pLBg Nae+Ddx18XVI39JCRnSlskwMhnibr3rSP9RtGZYonFVnNmvv47uWODD/yzpvdwdkFovAReUoilv Ab18i4hPOyF6ndNLLTfgHYWmXSrt9dVWVaWkHC+szL6MySEJ0VqR07tNu9vNjrxqsCgumzlz4CU kNhHKCAhErTGvLwa6lgF2CU61NPqQfE8yM4pjsDwtuKBGekqUpI/NGWt0UYPCb/hYrgPDosZdZC CaOAA28QW7+dy0neJZDjviKYhhFI9fNdKo4Qp+n X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--7.049200-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24664.003 X-MDID: 1560152337-sRK5ci7tiEaK Subject: [dpdk-dev] [PATCH 25/29] net/sfc/base: implement proxy auth MCDI event handling 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" From: Gautam Dawar Add the capability to receive MCDI proxy event from firmware and invoke the client driver registered function to handle it. Signed-off-by: Gautam Dawar Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/ef10_ev.c | 7 +++++++ drivers/net/sfc/base/efx.h | 3 +++ drivers/net/sfc/base/efx_check.h | 9 ++++++++- drivers/net/sfc/base/efx_mcdi.c | 12 ++++++++++++ drivers/net/sfc/base/efx_mcdi.h | 7 +++++++ 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/drivers/net/sfc/base/ef10_ev.c b/drivers/net/sfc/base/ef10_ev.c index 99cae3f..8cabb4e 100644 --- a/drivers/net/sfc/base/ef10_ev.c +++ b/drivers/net/sfc/base/ef10_ev.c @@ -1227,6 +1227,13 @@ break; #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */ +#if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER + case MCDI_EVENT_CODE_PROXY_REQUEST: + efx_mcdi_ev_proxy_request(enp, + MCDI_EV_FIELD(eqp, PROXY_REQUEST_BUFF_INDEX)); + break; +#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */ + case MCDI_EVENT_CODE_LINKCHANGE: { efx_link_mode_t link_mode; diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h index 8a3eb17..97c4e62 100644 --- a/drivers/net/sfc/base/efx.h +++ b/drivers/net/sfc/base/efx.h @@ -243,6 +243,9 @@ enum { #if EFSYS_OPT_MCDI_PROXY_AUTH void (*emt_ev_proxy_response)(void *, uint32_t, efx_rc_t); #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */ +#if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER + void (*emt_ev_proxy_request)(void *, uint32_t); +#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */ } efx_mcdi_transport_t; extern __checkReturn efx_rc_t diff --git a/drivers/net/sfc/base/efx_check.h b/drivers/net/sfc/base/efx_check.h index 85edaef..06983dc 100644 --- a/drivers/net/sfc/base/efx_check.h +++ b/drivers/net/sfc/base/efx_check.h @@ -119,8 +119,15 @@ # endif #endif /* EFSYS_OPT_MCDI_LOGGING */ +#if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER +/* Support MCDI proxy authorization (server) */ +# if !EFSYS_OPT_MCDI_PROXY_AUTH +# error "MCDI_PROXY_AUTH_SERVER requires MCDI_PROXY_AUTH" +# endif +#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */ + #if EFSYS_OPT_MCDI_PROXY_AUTH -/* Support MCDI proxy authorization */ +/* Support MCDI proxy authorization (client) */ # if !EFSYS_OPT_MCDI # error "MCDI_PROXY_AUTH requires MCDI" # endif diff --git a/drivers/net/sfc/base/efx_mcdi.c b/drivers/net/sfc/base/efx_mcdi.c index 584fd4d..325c2e4 100644 --- a/drivers/net/sfc/base/efx_mcdi.c +++ b/drivers/net/sfc/base/efx_mcdi.c @@ -845,6 +845,18 @@ } #endif /* EFSYS_OPT_MCDI_PROXY_AUTH */ +#if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER + void +efx_mcdi_ev_proxy_request( + __in efx_nic_t *enp, + __in unsigned int index) +{ + const efx_mcdi_transport_t *emtp = enp->en_mcdi.em_emtp; + + if (emtp->emt_ev_proxy_request != NULL) + emtp->emt_ev_proxy_request(emtp->emt_context, index); +} +#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */ void efx_mcdi_ev_death( __in efx_nic_t *enp, diff --git a/drivers/net/sfc/base/efx_mcdi.h b/drivers/net/sfc/base/efx_mcdi.h index a9e0255..56c0ab1 100644 --- a/drivers/net/sfc/base/efx_mcdi.h +++ b/drivers/net/sfc/base/efx_mcdi.h @@ -87,6 +87,13 @@ struct efx_mcdi_req_s { __in unsigned int status); #endif +#if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER +extern void +efx_mcdi_ev_proxy_request( + __in efx_nic_t *enp, + __in unsigned int index); +#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */ + extern void efx_mcdi_ev_death( __in efx_nic_t *enp, -- 1.8.3.1