summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h
diff options
context:
space:
mode:
authorIoana Radulescu <ruxandra.radulescu@nxp.com>2018-10-01 13:44:55 +0300
committerDavid S. Miller <davem@davemloft.net>2018-10-02 22:24:08 -0700
commitdf85aeb9b6326e965f3c92315cf43b67006ccf3e (patch)
treeca1c48949313ae4926d95893d53bd9efda32f15d /drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h
parentf3edc2dbe0ad0bbbd8450cd37328f99acf215fd8 (diff)
dpaa2-eth: Use new API for Rx flow hashing
The Management Complex (MC) firmware initially allowed the configuration of a single key to be used both for Rx flow hashing and flow classification. This prevented us from supporting Rx flow classification through ethtool. Starting with version 10.7.0, the Management Complex(MC) offers a new set of APIs for separate configuration of Rx hashing and classification keys. Update the Rx flow hashing support to use the new API, if available. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h')
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h b/drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h
index 83698abce8b4..a5285c72d2be 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h
+++ b/drivers/net/ethernet/freescale/dpaa2/dpni-cmd.h
@@ -82,6 +82,8 @@
#define DPNI_CMDID_GET_OFFLOAD DPNI_CMD(0x26B)
#define DPNI_CMDID_SET_OFFLOAD DPNI_CMD(0x26C)
+#define DPNI_CMDID_SET_RX_HASH_DIST DPNI_CMD(0x274)
+
/* Macros for accessing command fields smaller than 1byte */
#define DPNI_MASK(field) \
GENMASK(DPNI_##field##_SHIFT + DPNI_##field##_SIZE - 1, \
@@ -515,4 +517,14 @@ struct dpni_rsp_get_api_version {
__le16 minor;
};
+#define DPNI_RX_HASH_DIST_ENABLE_SHIFT 0
+#define DPNI_RX_HASH_DIST_ENABLE_SIZE 1
+struct dpni_cmd_set_rx_hash_dist {
+ __le16 dist_size;
+ u8 enable;
+ u8 tc;
+ __le32 pad;
+ __le64 key_cfg_iova;
+};
+
#endif /* _FSL_DPNI_CMD_H */