* [PATCH net-next 0/5] be2net patch-set
@ 2013-04-22 9:28 Sathya Perla
2013-04-22 19:50 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Sathya Perla @ 2013-04-22 9:28 UTC (permalink / raw)
To: netdev
Pls apply.
Craig Hada (1):
be2net: enable IOMMU pass through for be2net
Vasundhara Volam (4):
be2net: Use TXQ_CREATE_V2 cmd
be2net: Don't log "Out of MCCQ wrbs" error
be2net: Avoid flashing BE3 UFI on BE3-R chip.
be2net: Use GET_PROFILE_CONFIG V1 cmd for BE3-R
drivers/net/ethernet/emulex/benet/be.h | 2 +
drivers/net/ethernet/emulex/benet/be_cmds.c | 136 +++++++++++++++++++--------
drivers/net/ethernet/emulex/benet/be_cmds.h | 63 +++++--------
drivers/net/ethernet/emulex/benet/be_hw.h | 7 +-
drivers/net/ethernet/emulex/benet/be_main.c | 68 ++++++++++----
5 files changed, 177 insertions(+), 99 deletions(-)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 0/5] be2net patch-set
2013-04-22 9:28 [PATCH net-next 0/5] be2net patch-set Sathya Perla
@ 2013-04-22 19:50 ` David Miller
0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2013-04-22 19:50 UTC (permalink / raw)
To: sathya.perla; +Cc: netdev
From: Sathya Perla <sathya.perla@emulex.com>
Date: Mon, 22 Apr 2013 14:58:13 +0530
> Pls apply.
All applied.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 0/5] be2net: patch-set
@ 2016-10-09 4:28 Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 1/5] be2net: Provide an alternate way to read pf_num for BEx chips Sriharsha Basavapatna
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Sriharsha Basavapatna @ 2016-10-09 4:28 UTC (permalink / raw)
To: netdev
Hi David,
The following patch set contains a few bug fixes.
Please consider applying this to the net-next tree.
Thanks.
Patch-1 Obtains proper PF number for BEx chips
Patch-2 Fixes a FW update issue seen with BEx chips
Patch-3 Updates copyright string
Patch-4 Fixes TX stats for TSO packets
Patch-5 Enables VF link state setting for BE3
******
Sriharsha Basavapatna (4):
be2net: Provide an alternate way to read pf_num for BEx chips
be2net: NCSI FW section should be properly updated with ethtool for
BE3
be2net: Update Copyright string in be_hw.h
be2net: Fix TX stats for TSO packets
Suresh Reddy (1):
be2net: Enable VF link state setting for BE3
drivers/net/ethernet/emulex/benet/be_cmds.c | 31 +++++++++++++++++++++++++++--
drivers/net/ethernet/emulex/benet/be_cmds.h | 6 +++++-
drivers/net/ethernet/emulex/benet/be_hw.h | 2 +-
drivers/net/ethernet/emulex/benet/be_main.c | 14 +++++++++++--
4 files changed, 47 insertions(+), 6 deletions(-)
--
2.10.0.478.g3ef7618
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH net-next 1/5] be2net: Provide an alternate way to read pf_num for BEx chips
2016-10-09 4:28 [PATCH net-next 0/5] be2net: patch-set Sriharsha Basavapatna
@ 2016-10-09 4:28 ` Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 2/5] be2net: NCSI FW section should be properly updated with ethtool for BE3 Sriharsha Basavapatna
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Sriharsha Basavapatna @ 2016-10-09 4:28 UTC (permalink / raw)
To: netdev
The driver gets the pf_num for Skyhawk and Lancer using
GET_FUNC_CONFIG FW command. But since that command is not
supported in BEx, we need to get it from some other command.
Otherwise TPE recovery would fail since all NIC PFs would
end up with a func num of 0. There's a pci function number
field in the response of GET_CNTL_ATTRIBUTES command that
can be read to get the same info for BEx adapters.
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 5 +++++
drivers/net/ethernet/emulex/benet/be_cmds.h | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 9cffe48..45d1742 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -3527,6 +3527,11 @@ int be_cmd_get_cntl_attributes(struct be_adapter *adapter)
for (i = 0; i < CNTL_SERIAL_NUM_WORDS; i++)
adapter->serial_num[i] = le32_to_cpu(serial_num[i]) &
(BIT_MASK(16) - 1);
+ /* For BEx, since GET_FUNC_CONFIG command is not
+ * supported, we read funcnum here as a workaround.
+ */
+ if (BEx_chip(adapter))
+ adapter->pf_num = attribs->hba_attribs.pci_funcnum;
}
err:
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.h b/drivers/net/ethernet/emulex/benet/be_cmds.h
index 1bd82bc..09da2d8 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.h
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.h
@@ -1720,7 +1720,11 @@ struct mgmt_hba_attribs {
u32 rsvd2[55];
u8 rsvd3[3];
u8 phy_port;
- u32 rsvd4[13];
+ u32 rsvd4[15];
+ u8 rsvd5[2];
+ u8 pci_funcnum;
+ u8 rsvd6;
+ u32 rsvd7[6];
} __packed;
struct mgmt_controller_attrib {
--
2.10.0.478.g3ef7618
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 2/5] be2net: NCSI FW section should be properly updated with ethtool for BE3
2016-10-09 4:28 [PATCH net-next 0/5] be2net: patch-set Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 1/5] be2net: Provide an alternate way to read pf_num for BEx chips Sriharsha Basavapatna
@ 2016-10-09 4:28 ` Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 3/5] be2net: Update Copyright string in be_hw.h Sriharsha Basavapatna
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Sriharsha Basavapatna @ 2016-10-09 4:28 UTC (permalink / raw)
To: netdev
The driver has a check to ensure that NCSI FW section is updated only
if the current FW version in the card supports it. This FW version check
is done using memcmp() which obviously fails in some cases. Fix this by
breaking up the version string into integer version components and
comparing them.
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 45d1742..7e9be9f4 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -2728,6 +2728,26 @@ static int be_flash(struct be_adapter *adapter, const u8 *img,
return 0;
}
+#define NCSI_UPDATE_LOG "NCSI section update is not supported in FW ver %s\n"
+static bool be_fw_ncsi_supported(char *ver)
+{
+ int v1[4] = {3, 102, 148, 0}; /* Min ver that supports NCSI FW */
+ int v2[4];
+ int i;
+
+ if (sscanf(ver, "%d.%d.%d.%d", &v2[0], &v2[1], &v2[2], &v2[3]) != 4)
+ return false;
+
+ for (i = 0; i < 4; i++) {
+ if (v1[i] < v2[i])
+ return true;
+ else if (v1[i] > v2[i])
+ return false;
+ }
+
+ return true;
+}
+
/* For BE2, BE3 and BE3-R */
static int be_flash_BEx(struct be_adapter *adapter,
const struct firmware *fw,
@@ -2805,8 +2825,10 @@ static int be_flash_BEx(struct be_adapter *adapter,
continue;
if ((pflashcomp[i].optype == OPTYPE_NCSI_FW) &&
- memcmp(adapter->fw_ver, "3.102.148.0", 11) < 0)
+ !be_fw_ncsi_supported(adapter->fw_ver)) {
+ dev_info(dev, NCSI_UPDATE_LOG, adapter->fw_ver);
continue;
+ }
if (pflashcomp[i].optype == OPTYPE_PHY_FW &&
!phy_flashing_required(adapter))
--
2.10.0.478.g3ef7618
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 3/5] be2net: Update Copyright string in be_hw.h
2016-10-09 4:28 [PATCH net-next 0/5] be2net: patch-set Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 1/5] be2net: Provide an alternate way to read pf_num for BEx chips Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 2/5] be2net: NCSI FW section should be properly updated with ethtool for BE3 Sriharsha Basavapatna
@ 2016-10-09 4:28 ` Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 4/5] be2net: Fix TX stats for TSO packets Sriharsha Basavapatna
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Sriharsha Basavapatna @ 2016-10-09 4:28 UTC (permalink / raw)
To: netdev
This patch updates the year and company name in the copyright string
in be_hw.h.
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
---
drivers/net/ethernet/emulex/benet/be_hw.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_hw.h b/drivers/net/ethernet/emulex/benet/be_hw.h
index 92942c8..36e4232 100644
--- a/drivers/net/ethernet/emulex/benet/be_hw.h
+++ b/drivers/net/ethernet/emulex/benet/be_hw.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 - 2015 Emulex
+ * Copyright (C) 2005-2016 Broadcom.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or
--
2.10.0.478.g3ef7618
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 4/5] be2net: Fix TX stats for TSO packets
2016-10-09 4:28 [PATCH net-next 0/5] be2net: patch-set Sriharsha Basavapatna
` (2 preceding siblings ...)
2016-10-09 4:28 ` [PATCH net-next 3/5] be2net: Update Copyright string in be_hw.h Sriharsha Basavapatna
@ 2016-10-09 4:28 ` Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 5/5] be2net: Enable VF link state setting for BE3 Sriharsha Basavapatna
2016-10-09 13:31 ` [PATCH net-next 0/5] be2net: patch-set David Miller
5 siblings, 0 replies; 9+ messages in thread
From: Sriharsha Basavapatna @ 2016-10-09 4:28 UTC (permalink / raw)
To: netdev
TX stats update does not take into account headers which get duplicated
when the TSO packet is split into segments by HW. Fix this for both
tunneled (vxlan) and non-tunneled TSO packets.
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
---
drivers/net/ethernet/emulex/benet/be_main.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index dcb930a..cece8a0 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -724,14 +724,24 @@ void be_link_status_update(struct be_adapter *adapter, u8 link_status)
netdev_info(netdev, "Link is %s\n", link_status ? "Up" : "Down");
}
+static int be_gso_hdr_len(struct sk_buff *skb)
+{
+ if (skb->encapsulation)
+ return skb_inner_transport_offset(skb) +
+ inner_tcp_hdrlen(skb);
+ return skb_transport_offset(skb) + tcp_hdrlen(skb);
+}
+
static void be_tx_stats_update(struct be_tx_obj *txo, struct sk_buff *skb)
{
struct be_tx_stats *stats = tx_stats(txo);
- u64 tx_pkts = skb_shinfo(skb)->gso_segs ? : 1;
+ u32 tx_pkts = skb_shinfo(skb)->gso_segs ? : 1;
+ /* Account for headers which get duplicated in TSO pkt */
+ u32 dup_hdr_len = tx_pkts > 1 ? be_gso_hdr_len(skb) * (tx_pkts - 1) : 0;
u64_stats_update_begin(&stats->sync);
stats->tx_reqs++;
- stats->tx_bytes += skb->len;
+ stats->tx_bytes += skb->len + dup_hdr_len;
stats->tx_pkts += tx_pkts;
if (skb->encapsulation && skb->ip_summed == CHECKSUM_PARTIAL)
stats->tx_vxlan_offload_pkts += tx_pkts;
--
2.10.0.478.g3ef7618
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH net-next 5/5] be2net: Enable VF link state setting for BE3
2016-10-09 4:28 [PATCH net-next 0/5] be2net: patch-set Sriharsha Basavapatna
` (3 preceding siblings ...)
2016-10-09 4:28 ` [PATCH net-next 4/5] be2net: Fix TX stats for TSO packets Sriharsha Basavapatna
@ 2016-10-09 4:28 ` Sriharsha Basavapatna
2016-10-09 13:31 ` [PATCH net-next 0/5] be2net: patch-set David Miller
5 siblings, 0 replies; 9+ messages in thread
From: Sriharsha Basavapatna @ 2016-10-09 4:28 UTC (permalink / raw)
To: netdev
From: Suresh Reddy <suresh.reddy@broadcom.com>
The VF link state setting feature now works on BE3 chips too from
FW ver 11.1.192.0 onwards.
Signed-off-by: Suresh Reddy <suresh.reddy@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
---
drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/emulex/benet/be_cmds.c b/drivers/net/ethernet/emulex/benet/be_cmds.c
index 7e9be9f4..1fb5d72 100644
--- a/drivers/net/ethernet/emulex/benet/be_cmds.c
+++ b/drivers/net/ethernet/emulex/benet/be_cmds.c
@@ -4977,7 +4977,7 @@ int be_cmd_set_logical_link_config(struct be_adapter *adapter,
{
int status;
- if (BEx_chip(adapter))
+ if (BE2_chip(adapter))
return -EOPNOTSUPP;
status = __be_cmd_set_logical_link_config(adapter, link_state,
--
2.10.0.478.g3ef7618
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH net-next 0/5] be2net: patch-set
2016-10-09 4:28 [PATCH net-next 0/5] be2net: patch-set Sriharsha Basavapatna
` (4 preceding siblings ...)
2016-10-09 4:28 ` [PATCH net-next 5/5] be2net: Enable VF link state setting for BE3 Sriharsha Basavapatna
@ 2016-10-09 13:31 ` David Miller
5 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2016-10-09 13:31 UTC (permalink / raw)
To: sriharsha.basavapatna; +Cc: netdev
From: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Date: Sun, 9 Oct 2016 09:58:48 +0530
> The following patch set contains a few bug fixes.
> Please consider applying this to the net-next tree.
> Thanks.
>
> Patch-1 Obtains proper PF number for BEx chips
> Patch-2 Fixes a FW update issue seen with BEx chips
> Patch-3 Updates copyright string
> Patch-4 Fixes TX stats for TSO packets
> Patch-5 Enables VF link state setting for BE3
Please do not target real bug fixes at net-next, they should
target 'net' instead.
And that's where I have applied this series.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-10-09 13:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-09 4:28 [PATCH net-next 0/5] be2net: patch-set Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 1/5] be2net: Provide an alternate way to read pf_num for BEx chips Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 2/5] be2net: NCSI FW section should be properly updated with ethtool for BE3 Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 3/5] be2net: Update Copyright string in be_hw.h Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 4/5] be2net: Fix TX stats for TSO packets Sriharsha Basavapatna
2016-10-09 4:28 ` [PATCH net-next 5/5] be2net: Enable VF link state setting for BE3 Sriharsha Basavapatna
2016-10-09 13:31 ` [PATCH net-next 0/5] be2net: patch-set David Miller
-- strict thread matches above, loose matches on Subject: below --
2013-04-22 9:28 [PATCH net-next 0/5] be2net patch-set Sathya Perla
2013-04-22 19:50 ` 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).