net/sfc: handle ingress mport in EF100 Rx prefix

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 <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
This commit is contained in:
Igor Romanov 2021-10-11 17:48:43 +03:00 committed by Ferruh Yigit
parent 8dae7087c7
commit d0f981a3ef

View File

@ -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;
}
@ -809,6 +821,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);