diff mbox

[14/14] ehea: Add GRO support

Message ID 20110405214501.111d3638@kryten
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Anton Blanchard April 5, 2011, 11:45 a.m. UTC
Add GRO support to the ehea driver.

Signed-off-by: Anton Blanchard <anton@samba.org>
---


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jesse Gross April 5, 2011, 9:29 p.m. UTC | #1
On Tue, Apr 5, 2011 at 4:45 AM, Anton Blanchard <anton@samba.org> wrote:
> @@ -728,7 +716,14 @@ static int ehea_proc_rwqes(struct net_de
>                        }
>
>                        processed_bytes += skb->len;
> -                       ehea_proc_skb(pr, cqe, skb);
> +
> +                       if ((cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) &&
> +                           pr->port->vgrp) {
> +                               vlan_gro_receive(&pr->napi, pr->port->vgrp,
> +                                       cqe->vlan_tag, skb);

Thank you for removing the old LRO code but the vlan-specific GRO
entry point is deprecated as well so please don't add new uses of it.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

Index: linux-2.6/drivers/net/ehea/ehea_main.c
===================================================================
--- linux-2.6.orig/drivers/net/ehea/ehea_main.c	2011-04-05 20:47:47.870323182 +1000
+++ linux-2.6/drivers/net/ehea/ehea_main.c	2011-04-05 20:47:50.709998860 +1000
@@ -634,18 +634,6 @@  static int ehea_treat_poll_error(struct
 	return 0;
 }
 
-static void ehea_proc_skb(struct ehea_port_res *pr, struct ehea_cqe *cqe,
-			  struct sk_buff *skb)
-{
-	int vlan_extracted = ((cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) &&
-			      pr->port->vgrp);
-
-	if (vlan_extracted)
-		vlan_hwaccel_receive_skb(skb, pr->port->vgrp, cqe->vlan_tag);
-	else
-		netif_receive_skb(skb);
-}
-
 static int ehea_proc_rwqes(struct net_device *dev,
 			   struct ehea_port_res *pr,
 			   int budget)
@@ -728,7 +716,14 @@  static int ehea_proc_rwqes(struct net_de
 			}
 
 			processed_bytes += skb->len;
-			ehea_proc_skb(pr, cqe, skb);
+
+			if ((cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) &&
+			    pr->port->vgrp) {
+				vlan_gro_receive(&pr->napi, pr->port->vgrp,
+					cqe->vlan_tag, skb);
+			} else {
+				napi_gro_receive(&pr->napi, skb);
+			}
 		} else {
 			pr->p_stats.poll_receive_errors++;
 			port_reset = ehea_treat_poll_error(pr, rq, cqe,
@@ -3045,7 +3040,7 @@  struct ehea_port *ehea_setup_single_port
 	dev->netdev_ops = &ehea_netdev_ops;
 	ehea_set_ethtool_ops(dev);
 
-	dev->features = NETIF_F_SG | NETIF_F_TSO
+	dev->features = NETIF_F_SG | NETIF_F_TSO | NETIF_F_GRO
 		      | NETIF_F_HIGHDMA | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX
 		      | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER;
 	dev->vlan_features = NETIF_F_SG | NETIF_F_TSO | NETIF_F_HIGHDMA |