diff options
author | Vasundhara Volam <vasundhara.volam@emulex.com> | 2014-01-06 02:32:23 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-06 13:09:21 -0500 |
commit | da1388d655292a11b5e9c011532e9ca83f77e1d3 (patch) | |
tree | b10a1b61a74de13307b7cf245d463e40acfb93be /drivers/net | |
parent | f35f76ee76df008131bbe01a2297de0c55ee2297 (diff) |
be2net: disable RSS when number of RXQs is reduced to 1 via set-channels
When *only* the default RXQ is used, the RSS policy must be disabled so
that all IP and no-IP traffic is placed into the default RXQ. If not,
IP traffic is dropped.
Also, issue the RSS_CONFIG cmd only if FW advertises RSS capability for
the interface.
Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index e0e8bc1ef14c..b84902e451fa 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c | |||
@@ -2017,6 +2017,9 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, | |||
2017 | 0x3ea83c02, 0x4a110304}; | 2017 | 0x3ea83c02, 0x4a110304}; |
2018 | int status; | 2018 | int status; |
2019 | 2019 | ||
2020 | if (!(be_if_cap_flags(adapter) & BE_IF_FLAGS_RSS)) | ||
2021 | return 0; | ||
2022 | |||
2020 | if (mutex_lock_interruptible(&adapter->mbox_lock)) | 2023 | if (mutex_lock_interruptible(&adapter->mbox_lock)) |
2021 | return -1; | 2024 | return -1; |
2022 | 2025 | ||
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 0fde69d5cb6a..6b774a5279af 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c | |||
@@ -2744,13 +2744,16 @@ static int be_rx_qs_create(struct be_adapter *adapter) | |||
2744 | if (!BEx_chip(adapter)) | 2744 | if (!BEx_chip(adapter)) |
2745 | adapter->rss_flags |= RSS_ENABLE_UDP_IPV4 | | 2745 | adapter->rss_flags |= RSS_ENABLE_UDP_IPV4 | |
2746 | RSS_ENABLE_UDP_IPV6; | 2746 | RSS_ENABLE_UDP_IPV6; |
2747 | } else { | ||
2748 | /* Disable RSS, if only default RX Q is created */ | ||
2749 | adapter->rss_flags = RSS_ENABLE_NONE; | ||
2750 | } | ||
2747 | 2751 | ||
2748 | rc = be_cmd_rss_config(adapter, rsstable, adapter->rss_flags, | 2752 | rc = be_cmd_rss_config(adapter, rsstable, adapter->rss_flags, |
2749 | 128); | 2753 | 128); |
2750 | if (rc) { | 2754 | if (rc) { |
2751 | adapter->rss_flags = 0; | 2755 | adapter->rss_flags = RSS_ENABLE_NONE; |
2752 | return rc; | 2756 | return rc; |
2753 | } | ||
2754 | } | 2757 | } |
2755 | 2758 | ||
2756 | /* First time posting */ | 2759 | /* First time posting */ |