]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
be2net: Enable RSS UDP hashing for Lancer and Skyhawk
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Thu, 12 Jul 2012 03:57:47 +0000 (03:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jul 2012 15:16:47 +0000 (08:16 -0700)
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be.h
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_cmds.h

index e2dfe3114eb1f98492fdd77d9bd2560b531773b2..330d59af0576ad5cb10394ae64c771e1188a48ab 100644 (file)
@@ -457,6 +457,9 @@ struct be_adapter {
 #define lancer_chip(adapter)   ((adapter->pdev->device == OC_DEVICE_ID3) || \
                                 (adapter->pdev->device == OC_DEVICE_ID4))
 
+#define skyhawk_chip(adapter)  (adapter->pdev->device == OC_DEVICE_ID5)
+
+
 #define be_roce_supported(adapter) ((adapter->if_type == SLI_INTF_TYPE_3 || \
                                adapter->sli_family == SKYHAWK_SLI_FAMILY) && \
                                (adapter->function_mode & RDMA_ENABLED))
index 8730f0e6af307f792ef69f404973996cfb11c1c5..ddfca658559d57c09105a9c1ea9dd1cb7a1b8c30 100644 (file)
@@ -1792,6 +1792,13 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
        req->if_id = cpu_to_le32(adapter->if_handle);
        req->enable_rss = cpu_to_le16(RSS_ENABLE_TCP_IPV4 | RSS_ENABLE_IPV4 |
                                      RSS_ENABLE_TCP_IPV6 | RSS_ENABLE_IPV6);
+
+       if (lancer_chip(adapter) || skyhawk_chip(adapter)) {
+               req->hdr.version = 1;
+               req->enable_rss |= cpu_to_le16(RSS_ENABLE_UDP_IPV4 |
+                                              RSS_ENABLE_UDP_IPV6);
+       }
+
        req->cpu_table_size_log2 = cpu_to_le16(fls(table_size) - 1);
        memcpy(req->cpu_table, rsstable, table_size);
        memcpy(req->hash, myhash, sizeof(myhash));
index 88f72374599c6eabfdb0d5120bf8d53f00df4b22..45d70def92d6d3d07ccd16349cf1e7ae93db07f8 100644 (file)
@@ -1089,6 +1089,8 @@ struct be_cmd_resp_query_fw_cfg {
 #define RSS_ENABLE_TCP_IPV4                    0x2
 #define RSS_ENABLE_IPV6                                0x4
 #define RSS_ENABLE_TCP_IPV6                    0x8
+#define RSS_ENABLE_UDP_IPV4                    0x10
+#define RSS_ENABLE_UDP_IPV6                    0x20
 
 struct be_cmd_req_rss_config {
        struct be_cmd_req_hdr hdr;