dpaa2-eth: Configure Rx flow classification key
For firmware versions that support it, configure an Rx flow classification key at probe time. Hardware expects all rules in the classification table to share the same key. So we setup a key containing all supported fields at driver init and when a user adds classification rules through ethtool, we will just mask out the unused header fields. Since the key composition process is the same for flow classification and hashing, reuse existing code where possible. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
f76c483a0b
commit
4aaaf9b95a
@@ -82,6 +82,7 @@
|
||||
#define DPNI_CMDID_GET_OFFLOAD DPNI_CMD(0x26B)
|
||||
#define DPNI_CMDID_SET_OFFLOAD DPNI_CMD(0x26C)
|
||||
|
||||
#define DPNI_CMDID_SET_RX_FS_DIST DPNI_CMD(0x273)
|
||||
#define DPNI_CMDID_SET_RX_HASH_DIST DPNI_CMD(0x274)
|
||||
|
||||
/* Macros for accessing command fields smaller than 1byte */
|
||||
@@ -517,6 +518,17 @@ struct dpni_rsp_get_api_version {
|
||||
__le16 minor;
|
||||
};
|
||||
|
||||
#define DPNI_RX_FS_DIST_ENABLE_SHIFT 0
|
||||
#define DPNI_RX_FS_DIST_ENABLE_SIZE 1
|
||||
struct dpni_cmd_set_rx_fs_dist {
|
||||
__le16 dist_size;
|
||||
u8 enable;
|
||||
u8 tc;
|
||||
__le16 miss_flow_id;
|
||||
__le16 pad;
|
||||
__le64 key_cfg_iova;
|
||||
};
|
||||
|
||||
#define DPNI_RX_HASH_DIST_ENABLE_SHIFT 0
|
||||
#define DPNI_RX_HASH_DIST_ENABLE_SIZE 1
|
||||
struct dpni_cmd_set_rx_hash_dist {
|
||||
|
Reference in New Issue
Block a user