From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BA2DFA0C43; Fri, 27 Aug 2021 09:00:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B1DB3412B2; Fri, 27 Aug 2021 08:58:48 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 5644A412A3 for ; Fri, 27 Aug 2021 08:58:42 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 122) id 230F27F6DF; Fri, 27 Aug 2021 09:58:42 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shelob.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 7000B7F6EB; Fri, 27 Aug 2021 09:57:35 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 7000B7F6EB Authentication-Results: shelob.oktetlabs.ru/7000B7F6EB; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: dev@dpdk.org Cc: Igor Romanov , Andy Moreton , Ivan Malov Date: Fri, 27 Aug 2021 09:57:03 +0300 Message-Id: <20210827065717.1838258-25-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210827065717.1838258-1-andrew.rybchenko@oktetlabs.ru> References: <20210827065717.1838258-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 24/38] net/sfc: handle ingress m-port in EF100 Rx prefix X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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: Igor Romanov Set ingress mport dynamic field in mbuf in EF100. For a given PF, Rx queues of representor devices function on top of the only Rx queue operated by the PF representor proxy facility. This field is a means to demultiplex traffic hitting the queue. Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko Reviewed-by: Andy Moreton Reviewed-by: Ivan Malov --- drivers/net/sfc/sfc_ef100_rx.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/sfc/sfc_ef100_rx.c b/drivers/net/sfc/sfc_ef100_rx.c index 15fce55361..bbf3bf4dc0 100644 --- a/drivers/net/sfc/sfc_ef100_rx.c +++ b/drivers/net/sfc/sfc_ef100_rx.c @@ -62,6 +62,7 @@ struct sfc_ef100_rxq { #define SFC_EF100_RXQ_RSS_HASH 0x10 #define SFC_EF100_RXQ_USER_MARK 0x20 #define SFC_EF100_RXQ_FLAG_INTR_EN 0x40 +#define SFC_EF100_RXQ_INGRESS_MPORT 0x80 unsigned int ptr_mask; unsigned int evq_phase_bit_shift; unsigned int ready_pkts; @@ -370,6 +371,8 @@ static const efx_rx_prefix_layout_t sfc_ef100_rx_prefix_layout = { SFC_EF100_RX_PREFIX_FIELD(LENGTH, B_FALSE), SFC_EF100_RX_PREFIX_FIELD(RSS_HASH_VALID, B_FALSE), SFC_EF100_RX_PREFIX_FIELD(CLASS, B_FALSE), + EFX_RX_PREFIX_FIELD(INGRESS_MPORT, + ESF_GZ_RX_PREFIX_INGRESS_MPORT, B_FALSE), SFC_EF100_RX_PREFIX_FIELD(RSS_HASH, B_FALSE), SFC_EF100_RX_PREFIX_FIELD(USER_MARK, B_FALSE), @@ -419,6 +422,15 @@ sfc_ef100_rx_prefix_to_offloads(const struct sfc_ef100_rxq *rxq, } } + if (rxq->flags & SFC_EF100_RXQ_INGRESS_MPORT) { + ol_flags |= sfc_dp_mport_override; + *RTE_MBUF_DYNFIELD(m, + sfc_dp_mport_offset, + typeof(&((efx_mport_id_t *)0)->id)) = + EFX_XWORD_FIELD(rx_prefix[0], + ESF_GZ_RX_PREFIX_INGRESS_MPORT); + } + m->ol_flags = ol_flags; return true; } @@ -806,6 +818,12 @@ sfc_ef100_rx_qstart(struct sfc_dp_rxq *dp_rxq, unsigned int evq_read_ptr, else rxq->flags &= ~SFC_EF100_RXQ_USER_MARK; + if ((unsup_rx_prefix_fields & + (1U << EFX_RX_PREFIX_FIELD_INGRESS_MPORT)) == 0) + rxq->flags |= SFC_EF100_RXQ_INGRESS_MPORT; + else + rxq->flags &= ~SFC_EF100_RXQ_INGRESS_MPORT; + rxq->prefix_size = pinfo->erpl_length; rxq->rearm_data = sfc_ef100_mk_mbuf_rearm_data(rxq->dp.dpq.port_id, rxq->prefix_size); -- 2.30.2