Add a flag to request support for ingress m-port on an RxQ.
Implement it only for Riverhead, other families will return an error
if the flag is set.
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>
EFSYS_ASSERT(params.es_bufs_per_desc == 0);
#endif /* EFSYS_OPT_RX_ES_SUPER_BUFFER */
+ if (flags & EFX_RXQ_FLAG_INGRESS_MPORT) {
+ rc = ENOTSUP;
+ goto fail12;
+ }
+
/* Scatter can only be disabled if the firmware supports doing so */
if (flags & EFX_RXQ_FLAG_SCATTER)
params.disable_scatter = B_FALSE;
if ((rc = efx_mcdi_init_rxq(enp, ndescs, eep, label, index,
esmp, ¶ms)) != 0)
- goto fail12;
+ goto fail13;
erp->er_eep = eep;
erp->er_label = label;
return (0);
+fail13:
+ EFSYS_PROBE(fail13);
fail12:
EFSYS_PROBE(fail12);
#if EFSYS_OPT_RX_ES_SUPER_BUFFER
EFX_RX_PREFIX_FIELD_USER_MARK_VALID,
EFX_RX_PREFIX_FIELD_CSUM_FRAME,
EFX_RX_PREFIX_FIELD_INGRESS_VPORT,
+ EFX_RX_PREFIX_FIELD_INGRESS_MPORT = EFX_RX_PREFIX_FIELD_INGRESS_VPORT,
EFX_RX_PREFIX_NFIELDS
} efx_rx_prefix_field_t;
* the driver.
*/
#define EFX_RXQ_FLAG_RSS_HASH 0x4
+/*
+ * Request ingress mport field in the Rx prefix of a queue.
+ */
+#define EFX_RXQ_FLAG_INGRESS_MPORT 0x8
LIBEFX_API
extern __checkReturn efx_rc_t
goto fail2;
}
- if (flags & EFX_RXQ_FLAG_SCATTER) {
#if EFSYS_OPT_RX_SCATTER
- jumbo = B_TRUE;
+#define SUPPORTED_RXQ_FLAGS EFX_RXQ_FLAG_SCATTER
#else
+#define SUPPORTED_RXQ_FLAGS EFX_RXQ_FLAG_NONE
+#endif
+ /* Reject flags for unsupported queue features */
+ if ((flags & ~SUPPORTED_RXQ_FLAGS) != 0) {
rc = EINVAL;
goto fail3;
-#endif /* EFSYS_OPT_RX_SCATTER */
}
+#undef SUPPORTED_RXQ_FLAGS
+
+ if (flags & EFX_RXQ_FLAG_SCATTER)
+ jumbo = B_TRUE;
/* Set up the new descriptor queue */
EFX_POPULATE_OWORD_7(oword,
return (0);
-#if !EFSYS_OPT_RX_SCATTER
fail3:
EFSYS_PROBE(fail3);
-#endif
fail2:
EFSYS_PROBE(fail2);
fail1:
fields_mask |= 1U << EFX_RX_PREFIX_FIELD_RSS_HASH_VALID;
}
+ if (flags & EFX_RXQ_FLAG_INGRESS_MPORT)
+ fields_mask |= 1U << EFX_RX_PREFIX_FIELD_INGRESS_MPORT;
+
/*
* LENGTH is required in EF100 host interface, as receive events
* do not include the packet length.