qed: add Rx flow hash/indirection support.
authorSudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Sun, 10 Apr 2016 09:43:00 +0000 (12:43 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Apr 2016 04:43:20 +0000 (00:43 -0400)
Adds the required API for passing RSS-related configuration from qede.

Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com>
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_l2.c
include/linux/qed/qed_eth_if.h
include/linux/qed/qed_if.h

index e848d5a1f7f6900c9107baa53edc8c95cbf0b1fd..5005497ee23eaadecf740c9424641ba645d84743 100644 (file)
 #include "qed_reg_addr.h"
 #include "qed_sp.h"
 
-enum qed_rss_caps {
-       QED_RSS_IPV4            = 0x1,
-       QED_RSS_IPV6            = 0x2,
-       QED_RSS_IPV4_TCP        = 0x4,
-       QED_RSS_IPV6_TCP        = 0x8,
-       QED_RSS_IPV4_UDP        = 0x10,
-       QED_RSS_IPV6_UDP        = 0x20,
-};
-
-/* Should be the same as ETH_RSS_IND_TABLE_ENTRIES_NUM */
-#define QED_RSS_IND_TABLE_SIZE 128
-#define QED_RSS_KEY_SIZE 10 /* size in 32b chunks */
-
 struct qed_rss_params {
        u8      update_rss_config;
        u8      rss_enable;
@@ -1744,9 +1731,7 @@ static int qed_update_vport(struct qed_dev *cdev,
                sp_rss_params.update_rss_capabilities = 1;
                sp_rss_params.update_rss_ind_table = 1;
                sp_rss_params.update_rss_key = 1;
-               sp_rss_params.rss_caps = QED_RSS_IPV4 |
-                                        QED_RSS_IPV6 |
-                                        QED_RSS_IPV4_TCP | QED_RSS_IPV6_TCP;
+               sp_rss_params.rss_caps = params->rss_params.rss_caps;
                sp_rss_params.rss_table_size_log = 7; /* 2^7 = 128 */
                memcpy(sp_rss_params.rss_ind_table,
                       params->rss_params.rss_ind_table,
index e00c8dbfc3247ad431f7140cea7ad197a7385a93..795c9902e02f1b7afac40717c37646cea5e7a75b 100644 (file)
@@ -27,6 +27,7 @@ struct qed_dev_eth_info {
 struct qed_update_vport_rss_params {
        u16     rss_ind_table[128];
        u32     rss_key[10];
+       u8      rss_caps;
 };
 
 struct qed_update_vport_params {
index b007011e1c82fb19384fd5d1b5b8eb6ae77e5111..67e8c206b2c14e67b8362e4c81ab20251d828a2d 100644 (file)
@@ -515,4 +515,15 @@ static inline void internal_ram_wr(void __iomem *addr,
        __internal_ram_wr(NULL, addr, size, data);
 }
 
+enum qed_rss_caps {
+       QED_RSS_IPV4            = 0x1,
+       QED_RSS_IPV6            = 0x2,
+       QED_RSS_IPV4_TCP        = 0x4,
+       QED_RSS_IPV6_TCP        = 0x8,
+       QED_RSS_IPV4_UDP        = 0x10,
+       QED_RSS_IPV6_UDP        = 0x20,
+};
+
+#define QED_RSS_IND_TABLE_SIZE 128
+#define QED_RSS_KEY_SIZE 10 /* size in 32b chunks */
 #endif