* [PATCH 0/3] be2net: patch set
@ 2014-01-06 7:32 Sathya Perla
2014-01-06 7:32 ` [PATCH 1/3] be2net: disable RSS when number of RXQs is reduced to 1 via set-channels Sathya Perla
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Sathya Perla @ 2014-01-06 7:32 UTC (permalink / raw)
To: netdev
Pls apply the following bug fixes to the 'net' tree. Thanks.
Suresh Reddy (2):
be2net: increase the timeout value for loopback-test FW cmd
be2net: fix max_evt_qs calculation for BE3 in SR-IOV config
Vasundhara Volam (1):
be2net: disable RSS when number of RXQs is reduced to 1 via
set-channels
drivers/net/ethernet/emulex/benet/be.h | 3 +-
drivers/net/ethernet/emulex/benet/be_cmds.c | 33 ++++++++++++++++++--------
drivers/net/ethernet/emulex/benet/be_main.c | 29 ++++++++++++++---------
3 files changed, 43 insertions(+), 22 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/3] be2net: disable RSS when number of RXQs is reduced to 1 via set-channels
2014-01-06 7:32 [PATCH 0/3] be2net: patch set Sathya Perla
@ 2014-01-06 7:32 ` Sathya Perla
2014-01-06 7:32 ` [PATCH 2/3] be2net: increase the timeout value for loopback-test FW cmd Sathya Perla
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Sathya Perla @ 2014-01-06 7:32 UTC (permalink / raw)
To: netdev
From: Vasundhara Volam <vasundhara.volam@emulex.com>
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>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 3 +++
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 e0e8bc1..b84902e 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,
0x3ea83c02, 0x4a110304};
int status;
+ if (!(be_if_cap_flags(adapter) & BE_IF_FLAGS_RSS))
+ return 0;
+
if (mutex_lock_interruptible(&adapter->mbox_lock))
return -1;
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 0fde69d..6b774a5 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)
if (!BEx_chip(adapter))
adapter->rss_flags |= RSS_ENABLE_UDP_IPV4 |
RSS_ENABLE_UDP_IPV6;
+ } else {
+ /* Disable RSS, if only default RX Q is created */
+ adapter->rss_flags = RSS_ENABLE_NONE;
+ }
- rc = be_cmd_rss_config(adapter, rsstable, adapter->rss_flags,
- 128);
- if (rc) {
- adapter->rss_flags = 0;
- return rc;
- }
+ rc = be_cmd_rss_config(adapter, rsstable, adapter->rss_flags,
+ 128);
+ if (rc) {
+ adapter->rss_flags = RSS_ENABLE_NONE;
+ return rc;
}
/* First time posting */
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] be2net: increase the timeout value for loopback-test FW cmd
2014-01-06 7:32 [PATCH 0/3] be2net: patch set Sathya Perla
2014-01-06 7:32 ` [PATCH 1/3] be2net: disable RSS when number of RXQs is reduced to 1 via set-channels Sathya Perla
@ 2014-01-06 7:32 ` Sathya Perla
2014-01-06 7:32 ` [PATCH 3/3] be2net: fix max_evt_qs calculation for BE3 in SR-IOV config Sathya Perla
2014-01-06 18:10 ` [PATCH 0/3] be2net: patch set David Miller
3 siblings, 0 replies; 9+ messages in thread
From: Sathya Perla @ 2014-01-06 7:32 UTC (permalink / raw)
To: netdev
From: Suresh Reddy <suresh.reddy@emulex.com>
The loopback test FW cmd may need upto 15 seconds to complete on
certain PHYs. This patch also fixes the name of the completion variable
used to synchronize FW cmd completions as it not used by the flashing
cmd alone anymore.
Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
drivers/net/ethernet/emulex/benet/be.h | 2 +-
drivers/net/ethernet/emulex/benet/be_cmds.c | 30 ++++++++++++++++++---------
drivers/net/ethernet/emulex/benet/be_main.c | 2 +-
3 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 5878df6..2e031f2 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -480,7 +480,7 @@ struct be_adapter {
struct list_head entry;
u32 flash_status;
- struct completion flash_compl;
+ struct completion et_cmd_compl;
struct be_resources res; /* resources available for the func */
u16 num_vfs; /* Number of VFs provisioned by PF */
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index b84902e..94c35c8 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -141,11 +141,17 @@ static int be_mcc_compl_process(struct be_adapter *adapter,
subsystem = resp_hdr->subsystem;
}
+ if (opcode == OPCODE_LOWLEVEL_LOOPBACK_TEST &&
+ subsystem == CMD_SUBSYSTEM_LOWLEVEL) {
+ complete(&adapter->et_cmd_compl);
+ return 0;
+ }
+
if (((opcode == OPCODE_COMMON_WRITE_FLASHROM) ||
(opcode == OPCODE_COMMON_WRITE_OBJECT)) &&
(subsystem == CMD_SUBSYSTEM_COMMON)) {
adapter->flash_status = compl_status;
- complete(&adapter->flash_compl);
+ complete(&adapter->et_cmd_compl);
}
if (compl_status == MCC_STATUS_SUCCESS) {
@@ -2163,7 +2169,7 @@ int lancer_cmd_write_object(struct be_adapter *adapter, struct be_dma_mem *cmd,
be_mcc_notify(adapter);
spin_unlock_bh(&adapter->mcc_lock);
- if (!wait_for_completion_timeout(&adapter->flash_compl,
+ if (!wait_for_completion_timeout(&adapter->et_cmd_compl,
msecs_to_jiffies(60000)))
status = -1;
else
@@ -2258,8 +2264,8 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
be_mcc_notify(adapter);
spin_unlock_bh(&adapter->mcc_lock);
- if (!wait_for_completion_timeout(&adapter->flash_compl,
- msecs_to_jiffies(40000)))
+ if (!wait_for_completion_timeout(&adapter->et_cmd_compl,
+ msecs_to_jiffies(40000)))
status = -1;
else
status = adapter->flash_status;
@@ -2370,6 +2376,7 @@ int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
{
struct be_mcc_wrb *wrb;
struct be_cmd_req_loopback_test *req;
+ struct be_cmd_resp_loopback_test *resp;
int status;
spin_lock_bh(&adapter->mcc_lock);
@@ -2384,8 +2391,8 @@ int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
be_wrb_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_LOWLEVEL,
OPCODE_LOWLEVEL_LOOPBACK_TEST, sizeof(*req), wrb, NULL);
- req->hdr.timeout = cpu_to_le32(4);
+ req->hdr.timeout = cpu_to_le32(15);
req->pattern = cpu_to_le64(pattern);
req->src_port = cpu_to_le32(port_num);
req->dest_port = cpu_to_le32(port_num);
@@ -2393,12 +2400,15 @@ int be_cmd_loopback_test(struct be_adapter *adapter, u32 port_num,
req->num_pkts = cpu_to_le32(num_pkts);
req->loopback_type = cpu_to_le32(loopback_type);
- status = be_mcc_notify_wait(adapter);
- if (!status) {
- struct be_cmd_resp_loopback_test *resp = embedded_payload(wrb);
- status = le32_to_cpu(resp->status);
- }
+ be_mcc_notify(adapter);
+
+ spin_unlock_bh(&adapter->mcc_lock);
+ wait_for_completion(&adapter->et_cmd_compl);
+ resp = embedded_payload(wrb);
+ status = le32_to_cpu(resp->status);
+
+ return status;
err:
spin_unlock_bh(&adapter->mcc_lock);
return status;
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 6b774a5..fa44bba 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -4208,7 +4208,7 @@ static int be_ctrl_init(struct be_adapter *adapter)
spin_lock_init(&adapter->mcc_lock);
spin_lock_init(&adapter->mcc_cq_lock);
- init_completion(&adapter->flash_compl);
+ init_completion(&adapter->et_cmd_compl);
pci_save_state(adapter->pdev);
return 0;
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] be2net: fix max_evt_qs calculation for BE3 in SR-IOV config
2014-01-06 7:32 [PATCH 0/3] be2net: patch set Sathya Perla
2014-01-06 7:32 ` [PATCH 1/3] be2net: disable RSS when number of RXQs is reduced to 1 via set-channels Sathya Perla
2014-01-06 7:32 ` [PATCH 2/3] be2net: increase the timeout value for loopback-test FW cmd Sathya Perla
@ 2014-01-06 7:32 ` Sathya Perla
2014-01-06 18:10 ` [PATCH 0/3] be2net: patch set David Miller
3 siblings, 0 replies; 9+ messages in thread
From: Sathya Perla @ 2014-01-06 7:32 UTC (permalink / raw)
To: netdev
From: Suresh Reddy <suresh.reddy@emulex.com>
The driver wrongly assumes 16 EQs/vectors are available for each BE3 PF.
When SR-IOV is enabled, a BE3 PF can support only a max of 8 EQs.
Signed-off-by: Suresh Reddy <suresh.reddy@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
drivers/net/ethernet/emulex/benet/be.h | 1 +
drivers/net/ethernet/emulex/benet/be_main.c | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h
index 2e031f2..4ccaf9a 100644
--- a/drivers/net/ethernet/emulex/benet/be.h
+++ b/drivers/net/ethernet/emulex/benet/be.h
@@ -104,6 +104,7 @@ static inline char *nic_name(struct pci_dev *pdev)
#define BE3_MAX_RSS_QS 16
#define BE3_MAX_TX_QS 16
#define BE3_MAX_EVT_QS 16
+#define BE3_SRIOV_MAX_EVT_QS 8
#define MAX_RX_QS 32
#define MAX_EVT_QS 32
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index fa44bba..bf40fda 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -3127,11 +3127,11 @@ static void BEx_get_resources(struct be_adapter *adapter,
{
struct pci_dev *pdev = adapter->pdev;
bool use_sriov = false;
+ int max_vfs;
- if (BE3_chip(adapter) && sriov_want(adapter)) {
- int max_vfs;
+ max_vfs = pci_sriov_get_totalvfs(pdev);
- max_vfs = pci_sriov_get_totalvfs(pdev);
+ if (BE3_chip(adapter) && sriov_want(adapter)) {
res->max_vfs = max_vfs > 0 ? min(MAX_VFS, max_vfs) : 0;
use_sriov = res->max_vfs;
}
@@ -3162,7 +3162,11 @@ static void BEx_get_resources(struct be_adapter *adapter,
BE3_MAX_RSS_QS : BE2_MAX_RSS_QS;
res->max_rx_qs = res->max_rss_qs + 1;
- res->max_evt_qs = be_physfn(adapter) ? BE3_MAX_EVT_QS : 1;
+ if (be_physfn(adapter))
+ res->max_evt_qs = (max_vfs > 0) ?
+ BE3_SRIOV_MAX_EVT_QS : BE3_MAX_EVT_QS;
+ else
+ res->max_evt_qs = 1;
res->if_cap_flags = BE_IF_CAP_FLAGS_WANT;
if (!(adapter->function_caps & BE_FUNCTION_CAPS_RSS))
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] be2net: patch set
2014-01-06 7:32 [PATCH 0/3] be2net: patch set Sathya Perla
` (2 preceding siblings ...)
2014-01-06 7:32 ` [PATCH 3/3] be2net: fix max_evt_qs calculation for BE3 in SR-IOV config Sathya Perla
@ 2014-01-06 18:10 ` David Miller
3 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2014-01-06 18:10 UTC (permalink / raw)
To: sathya.perla; +Cc: netdev
From: Sathya Perla <sathya.perla@emulex.com>
Date: Mon, 6 Jan 2014 13:02:22 +0530
> Pls apply the following bug fixes to the 'net' tree. Thanks.
Series applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 0/3] be2net: patch set
@ 2015-03-20 10:28 Sathya Perla
2015-03-20 17:26 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Sathya Perla @ 2015-03-20 10:28 UTC (permalink / raw)
To: netdev
Hi David, this patch set includes 3 bug fixes to the be2net driver.
Patch 1 fixes a vlan isolation issue with VFs. When a VF is placed in
promiscous mode, it could receive packets belonging to any vlan, as
the PF driver grants vlan promisc capability to VFs. The PF
driver now disables the vlan promisc capability for VFs to fix this
problem.
Patch 2 fixes the call to MODIFY_EQ_DELAY FW cmd to not include more
than 8 EQs per cmd. The FW is not capable of handling more than 8 EQs
per cmd.
Patch 3 fixes an EEH error detection issue. On Power platforms,
when an EEH error occurs, the slot disconnect state is more reliably
detected via an MMIO read compared to a config read. So, the error
register reads that occur every second are now done via MMIO.
Pls apply this patch set to the "net" tree. Thanks!
Suresh Reddy (2):
be2net: restrict MODIFY_EQ_DELAY cmd to a max of 8 EQs
be2net: use PCI MMIO read instead of config read for errors
Vasundhara Volam (1):
be2net: Prevent VFs from enabling VLAN promiscuous mode
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] be2net: patch set
2015-03-20 10:28 Sathya Perla
@ 2015-03-20 17:26 ` David Miller
0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2015-03-20 17:26 UTC (permalink / raw)
To: sathya.perla; +Cc: netdev
From: Sathya Perla <sathya.perla@emulex.com>
Date: Fri, 20 Mar 2015 06:28:22 -0400
> Hi David, this patch set includes 3 bug fixes to the be2net driver.
Series applied, thank you.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 0/3] be2net: patch set
@ 2015-08-05 7:27 Sathya Perla
2015-08-07 18:57 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Sathya Perla @ 2015-08-05 7:27 UTC (permalink / raw)
To: netdev
Hi David,
This patch set contains 2 driver fixes to a Lancer HW issue and a fix
to a double free bug. Pls apply to the "net" tree. Thanks!
Patch 1 now enables filters only after creating RXQs. This is done as
HW issues were observed on Lancer adapters if filters
(flags, mac addrs etc) are enabled *before* creating RXQs. This patch
changes the driver design by enabling filters in be_open() --
instead of be_setup() -- after RXQs are created and buffers posted.
Patch 2 fixes an RX stall issue that was seen on Lancer adapters when
RXQs are destroyed while they are in an "out of buffer" state.
This patch fixes this issue by posting 64 buffers to each RXQ before
destroying them in the close path. This is done after ensuring that no
more new packets are selected for transfer to the RXQs by disabling
interface filters.
Patch 3 protects eqo->affinity_mask variable from being freed twice and
resulting in a crash. It's now freed only when EQs haven't yet been
destroyed.
Kalesh AP (3):
be2net: enable IFACE filters only after creating RXQs
be2net: post buffers before destroying RXQs in Lancer
be2net: protect eqo->affinity_mask from getting freed twice
drivers/net/ethernet/emulex/benet/be_cmds.h | 5 +
drivers/net/ethernet/emulex/benet/be_main.c | 187 ++++++++++++++++++----------
2 files changed, 125 insertions(+), 67 deletions(-)
--
2.4.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] be2net: patch set
2015-08-05 7:27 Sathya Perla
@ 2015-08-07 18:57 ` David Miller
0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2015-08-07 18:57 UTC (permalink / raw)
To: sathya.perla; +Cc: netdev
From: Sathya Perla <sathya.perla@avagotech.com>
Date: Wed, 5 Aug 2015 03:27:47 -0400
> This patch set contains 2 driver fixes to a Lancer HW issue and a fix
> to a double free bug. Pls apply to the "net" tree. Thanks!
>
> Patch 1 now enables filters only after creating RXQs. This is done as
> HW issues were observed on Lancer adapters if filters
> (flags, mac addrs etc) are enabled *before* creating RXQs. This patch
> changes the driver design by enabling filters in be_open() --
> instead of be_setup() -- after RXQs are created and buffers posted.
>
> Patch 2 fixes an RX stall issue that was seen on Lancer adapters when
> RXQs are destroyed while they are in an "out of buffer" state.
> This patch fixes this issue by posting 64 buffers to each RXQ before
> destroying them in the close path. This is done after ensuring that no
> more new packets are selected for transfer to the RXQs by disabling
> interface filters.
>
> Patch 3 protects eqo->affinity_mask variable from being freed twice and
> resulting in a crash. It's now freed only when EQs haven't yet been
> destroyed.
Series applied, thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-08-07 18:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-06 7:32 [PATCH 0/3] be2net: patch set Sathya Perla
2014-01-06 7:32 ` [PATCH 1/3] be2net: disable RSS when number of RXQs is reduced to 1 via set-channels Sathya Perla
2014-01-06 7:32 ` [PATCH 2/3] be2net: increase the timeout value for loopback-test FW cmd Sathya Perla
2014-01-06 7:32 ` [PATCH 3/3] be2net: fix max_evt_qs calculation for BE3 in SR-IOV config Sathya Perla
2014-01-06 18:10 ` [PATCH 0/3] be2net: patch set David Miller
-- strict thread matches above, loose matches on Subject: below --
2015-03-20 10:28 Sathya Perla
2015-03-20 17:26 ` David Miller
2015-08-05 7:27 Sathya Perla
2015-08-07 18:57 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).