summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/mcdi.h
diff options
context:
space:
mode:
authorEdward Cree <ecree.xilinx@gmail.com>2023-03-09 14:59:04 +0300
committerJakub Kicinski <kuba@kernel.org>2023-03-11 08:28:59 +0300
commit05ccd8d8a15e6b9c99b86cf8a2fd78e3f0c60a84 (patch)
treeb5b6c2291a157f71587f4a9e845b1b669d2b6d51 /drivers/net/ethernet/sfc/mcdi.h
parent494f642f8cddb49886b6442c9304b30a0c1ec084 (diff)
downloadlinux-05ccd8d8a15e6b9c99b86cf8a2fd78e3f0c60a84.tar.xz
sfc: support offloading TC VLAN push/pop actions to the MAE
EF100 can pop and/or push up to two VLAN tags. Signed-off-by: Edward Cree <ecree.xilinx@gmail.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230309115904.56442-1-edward.cree@amd.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi.h')
-rw-r--r--drivers/net/ethernet/sfc/mcdi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h
index b139b76febff..454e9d51a4c2 100644
--- a/drivers/net/ethernet/sfc/mcdi.h
+++ b/drivers/net/ethernet/sfc/mcdi.h
@@ -233,6 +233,11 @@ void efx_mcdi_sensor_event(struct efx_nic *efx, efx_qword_t *ev);
((void)BUILD_BUG_ON_ZERO(_field ## _LEN != 2), \
le16_to_cpu(*(__force const __le16 *)MCDI_STRUCT_PTR(_buf, _field)))
/* Write a 16-bit field defined in the protocol as being big-endian. */
+#define MCDI_SET_WORD_BE(_buf, _field, _value) do { \
+ BUILD_BUG_ON(MC_CMD_ ## _field ## _LEN != 2); \
+ BUILD_BUG_ON(MC_CMD_ ## _field ## _OFST & 1); \
+ *(__force __be16 *)MCDI_PTR(_buf, _field) = (_value); \
+ } while (0)
#define MCDI_STRUCT_SET_WORD_BE(_buf, _field, _value) do { \
BUILD_BUG_ON(_field ## _LEN != 2); \
BUILD_BUG_ON(_field ## _OFST & 1); \