diff options
author | Ajit Khaparde <ajit.khaparde@broadcom.com> | 2016-02-10 22:45:53 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-11 03:46:59 -0500 |
commit | 622190669403fb7a7557a8b618e57c0a3f703056 (patch) | |
tree | efabe5c966f4c3d0af139f89170fd6f6384aa38a /drivers/net/ethernet/emulex/benet/be_cmds.c | |
parent | aaa5672052cb0f18a5ab0ab19e9ef71c50e018a8 (diff) | |
download | linux-stable-622190669403fb7a7557a8b618e57c0a3f703056.tar.gz linux-stable-622190669403fb7a7557a8b618e57c0a3f703056.tar.bz2 linux-stable-622190669403fb7a7557a8b618e57c0a3f703056.zip |
be2net: Request RSS capability of Rx interface depending on number of Rx rings
Currently we request RSS capability even if a single Rx ring is created.
As a result in few cases we unnecessarily consume an RSS capable interface
which is a limited resource in the chip.
This patch enables RSS on an interface only if more than one Rx ring
is created.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be_cmds.c')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_cmds.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c index 7d51d4733890..33cbbde218be 100644 --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -1513,34 +1513,25 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags, return status; } -/* Uses MCCQ */ +/* Uses MCCQ if available else MBOX */ int be_cmd_if_destroy(struct be_adapter *adapter, int interface_id, u32 domain) { - struct be_mcc_wrb *wrb; + struct be_mcc_wrb wrb = {0}; struct be_cmd_req_if_destroy *req; int status; if (interface_id == -1) return 0; - spin_lock_bh(&adapter->mcc_lock); - - wrb = wrb_from_mccq(adapter); - if (!wrb) { - status = -EBUSY; - goto err; - } - req = embedded_payload(wrb); + req = embedded_payload(&wrb); be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, OPCODE_COMMON_NTWK_INTERFACE_DESTROY, - sizeof(*req), wrb, NULL); + sizeof(*req), &wrb, NULL); req->hdr.domain = domain; req->interface_id = cpu_to_le32(interface_id); - status = be_mcc_notify_wait(adapter); -err: - spin_unlock_bh(&adapter->mcc_lock); + status = be_cmd_notify_wait(adapter, &wrb); return status; } |