netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver
@ 2014-05-07 12:31 Hariprasad Shenai
  2014-05-07 12:31 ` [PATCH net-next 1/3] cxgb4: Decode the firmware port and module type a bit more for ethtool Hariprasad Shenai
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hariprasad Shenai @ 2014-05-07 12:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, dm, leedom, kumaras, nirranjan, santosh, Hariprasad Shenai

Hi All,
This series of patch provides fixes for cxgb4 and cxgb4vf driver related to
rx checksum counter and decodes module type a bit more for ethtool output.

The patches series is created against David Miller's 'net-next' tree.

We would like to request this patch series to get merged via David Miller's
'net-next' tree.

We have included all the maintainers of respective drivers. Kindly review the
change and let us know in case of any review comments.

Thanks

Hariprasad Shenai (3):
  cxgb4: Decode the firmware port and module type a bit more for ethtool
  cxgb4: Check if rx checksum offload is enabled, while reading hardware
    calculated checksum
  cxgb4vf: Check if rx checksum offload is enabled, while reading
    hardware calculated checksum

 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 15 +++++++++++----
 drivers/net/ethernet/chelsio/cxgb4/sge.c        |  6 +++---
 drivers/net/ethernet/chelsio/cxgb4vf/sge.c      |  7 ++++---
 3 files changed, 18 insertions(+), 10 deletions(-)

-- 
1.8.4

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net-next 1/3] cxgb4: Decode the firmware port and module type a bit more for ethtool
  2014-05-07 12:31 [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver Hariprasad Shenai
@ 2014-05-07 12:31 ` Hariprasad Shenai
  2014-05-07 12:31 ` [PATCH net-next 2/3] cxgb4: Check if rx checksum offload is enabled, while reading hardware calculated checksum Hariprasad Shenai
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Hariprasad Shenai @ 2014-05-07 12:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, dm, leedom, kumaras, nirranjan, santosh, Hariprasad Shenai

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index 6fe5891..bf5eb33 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -2252,12 +2252,19 @@ static int get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 	else if (p->port_type == FW_PORT_TYPE_FIBER_XFI ||
 		 p->port_type == FW_PORT_TYPE_FIBER_XAUI)
 		cmd->port = PORT_FIBRE;
-	else if (p->port_type == FW_PORT_TYPE_SFP) {
-		if (p->mod_type == FW_PORT_MOD_TYPE_TWINAX_PASSIVE ||
-		    p->mod_type == FW_PORT_MOD_TYPE_TWINAX_ACTIVE)
+	else if (p->port_type == FW_PORT_TYPE_SFP ||
+		 p->port_type == FW_PORT_TYPE_QSFP_10G ||
+		 p->port_type == FW_PORT_TYPE_QSFP) {
+		if (p->mod_type == FW_PORT_MOD_TYPE_LR ||
+		    p->mod_type == FW_PORT_MOD_TYPE_SR ||
+		    p->mod_type == FW_PORT_MOD_TYPE_ER ||
+		    p->mod_type == FW_PORT_MOD_TYPE_LRM)
+			cmd->port = PORT_FIBRE;
+		else if (p->mod_type == FW_PORT_MOD_TYPE_TWINAX_PASSIVE ||
+			 p->mod_type == FW_PORT_MOD_TYPE_TWINAX_ACTIVE)
 			cmd->port = PORT_DA;
 		else
-			cmd->port = PORT_FIBRE;
+			cmd->port = PORT_OTHER;
 	} else
 		cmd->port = PORT_OTHER;
 
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net-next 2/3] cxgb4: Check if rx checksum offload is enabled, while reading hardware calculated checksum
  2014-05-07 12:31 [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver Hariprasad Shenai
  2014-05-07 12:31 ` [PATCH net-next 1/3] cxgb4: Decode the firmware port and module type a bit more for ethtool Hariprasad Shenai
@ 2014-05-07 12:31 ` Hariprasad Shenai
  2014-05-07 12:31 ` [PATCH net-next 3/3] cxgb4vf: " Hariprasad Shenai
  2014-05-07 21:43 ` [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Hariprasad Shenai @ 2014-05-07 12:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, dm, leedom, kumaras, nirranjan, santosh, Hariprasad Shenai

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/sge.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index ca95cf2..cced1a3 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -1697,7 +1697,8 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
 		return handle_trace_pkt(q->adap, si);
 
 	pkt = (const struct cpl_rx_pkt *)rsp;
-	csum_ok = pkt->csum_calc && !pkt->err_vec;
+	csum_ok = pkt->csum_calc && !pkt->err_vec &&
+		  (q->netdev->features & NETIF_F_RXCSUM);
 	if ((pkt->l2info & htonl(RXF_TCP)) &&
 	    (q->netdev->features & NETIF_F_GRO) && csum_ok && !pkt->ip_frag) {
 		do_gro(rxq, si, pkt);
@@ -1720,8 +1721,7 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp,
 
 	rxq->stats.pkts++;
 
-	if (csum_ok && (q->netdev->features & NETIF_F_RXCSUM) &&
-	    (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) {
+	if (csum_ok && (pkt->l2info & htonl(RXF_UDP | RXF_TCP))) {
 		if (!pkt->ip_frag) {
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
 			rxq->stats.rx_cso++;
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net-next 3/3] cxgb4vf: Check if rx checksum offload is enabled, while reading hardware calculated checksum
  2014-05-07 12:31 [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver Hariprasad Shenai
  2014-05-07 12:31 ` [PATCH net-next 1/3] cxgb4: Decode the firmware port and module type a bit more for ethtool Hariprasad Shenai
  2014-05-07 12:31 ` [PATCH net-next 2/3] cxgb4: Check if rx checksum offload is enabled, while reading hardware calculated checksum Hariprasad Shenai
@ 2014-05-07 12:31 ` Hariprasad Shenai
  2014-05-07 21:43 ` [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Hariprasad Shenai @ 2014-05-07 12:31 UTC (permalink / raw)
  To: netdev; +Cc: davem, dm, leedom, kumaras, nirranjan, santosh, Hariprasad Shenai

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4vf/sge.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index 9cfa4b4..adebbf8 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -1510,7 +1510,8 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
 {
 	struct sk_buff *skb;
 	const struct cpl_rx_pkt *pkt = (void *)rsp;
-	bool csum_ok = pkt->csum_calc && !pkt->err_vec;
+	bool csum_ok = pkt->csum_calc && !pkt->err_vec &&
+		       (rspq->netdev->features & NETIF_F_RXCSUM);
 	struct sge_eth_rxq *rxq = container_of(rspq, struct sge_eth_rxq, rspq);
 
 	/*
@@ -1538,8 +1539,8 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
 	skb_record_rx_queue(skb, rspq->idx);
 	rxq->stats.pkts++;
 
-	if (csum_ok && (rspq->netdev->features & NETIF_F_RXCSUM) &&
-	    !pkt->err_vec && (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) {
+	if (csum_ok && !pkt->err_vec &&
+	    (be32_to_cpu(pkt->l2info) & (RXF_UDP|RXF_TCP))) {
 		if (!pkt->ip_frag)
 			skb->ip_summed = CHECKSUM_UNNECESSARY;
 		else {
-- 
1.8.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver
  2014-05-07 12:31 [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver Hariprasad Shenai
                   ` (2 preceding siblings ...)
  2014-05-07 12:31 ` [PATCH net-next 3/3] cxgb4vf: " Hariprasad Shenai
@ 2014-05-07 21:43 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2014-05-07 21:43 UTC (permalink / raw)
  To: hariprasad; +Cc: netdev, dm, leedom, kumaras, nirranjan, santosh

From: Hariprasad Shenai <hariprasad@chelsio.com>
Date: Wed, 7 May 2014 18:01:01 +0530

> This series of patch provides fixes for cxgb4 and cxgb4vf driver related to
> rx checksum counter and decodes module type a bit more for ethtool output.
> 
> The patches series is created against David Miller's 'net-next' tree.
> 
> We would like to request this patch series to get merged via David Miller's
> 'net-next' tree.
> 
> We have included all the maintainers of respective drivers. Kindly review the
> change and let us know in case of any review comments.

Series applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-07 21:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 12:31 [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver Hariprasad Shenai
2014-05-07 12:31 ` [PATCH net-next 1/3] cxgb4: Decode the firmware port and module type a bit more for ethtool Hariprasad Shenai
2014-05-07 12:31 ` [PATCH net-next 2/3] cxgb4: Check if rx checksum offload is enabled, while reading hardware calculated checksum Hariprasad Shenai
2014-05-07 12:31 ` [PATCH net-next 3/3] cxgb4vf: " Hariprasad Shenai
2014-05-07 21:43 ` [PATCH net-next 0/3] Misc. fixes for cxgb4 and cxgb4vf driver 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).