net/sfc/base: fix name of the argument to store RSS flags
[dpdk.git] / drivers / net / sfc / base / efx_mcdi.h
index d2cd1e9..4007240 100644 (file)
@@ -384,6 +384,17 @@ efx_mcdi_phy_module_get_info(
        (((mask) & (MC_CMD_PRIVILEGE_MASK_IN_GRP_ ## priv)) ==          \
        (MC_CMD_PRIVILEGE_MASK_IN_GRP_ ## priv))
 
+/*
+ * The buffer size must be a multiple of dword to ensure that MCDI works
+ * properly with Siena based boards (which use on-chip buffer). Also, it
+ * should be at minimum the size of two dwords to allow space for extended
+ * error responses if the request/response buffer sizes are smaller.
+ */
+#define EFX_MCDI_DECLARE_BUF(_name, _in_len, _out_len)                 \
+       uint8_t _name[P2ROUNDUP(MAX(MAX(_in_len, _out_len),             \
+                                   (2 * sizeof (efx_dword_t))),        \
+                               sizeof (efx_dword_t))] = {0}
+
 typedef enum efx_mcdi_feature_id_e {
        EFX_MCDI_FEATURE_FW_UPDATE = 0,
        EFX_MCDI_FEATURE_LINK_CONTROL,