On Wed, 2010-12-08 at 16:31 -0200, leitao@linux.vnet.ibm.com wrote:
quoted text > In order to set LRO on ehea, the user must set a module parameter, which
> is not the standard way to do so. This patch adds a way to set LRO using
> the ethtool tool.
[...]
quoted text > diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
> index a84c389..c7132e8 100644
> --- a/drivers/net/ehea/ehea_main.c
> +++ b/drivers/net/ehea/ehea_main.c
> @@ -675,7 +675,7 @@ static void ehea_proc_skb(struct ehea_port_res *pr, struct ehea_cqe *cqe,
> int vlan_extracted = ((cqe->status & EHEA_CQE_VLAN_TAG_XTRACT) &&
> pr->port->vgrp);
>
> - if (use_lro) {
> + if (skb->dev->features && NETIF_F_LRO) {
Should be & not &&.
quoted text > if (vlan_extracted)
> lro_vlan_hwaccel_receive_skb(&pr->lro_mgr, skb,
> pr->port->vgrp,
> @@ -777,7 +777,7 @@ static int ehea_proc_rwqes(struct net_device *dev,
> }
> cqe = ehea_poll_rq1(qp, &wqe_index);
> }
> - if (use_lro)
> + if (dev->features && NETIF_F_LRO)
Ditto.
Ben.
quoted text > lro_flush_all(&pr->lro_mgr);
>
> pr->rx_packets += processed;
> @@ -3265,6 +3265,9 @@ struct ehea_port *ehea_setup_single_port(struct ehea_adapter *adapter,
> | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER
> | NETIF_F_LLTX;
> dev->watchdog_timeo = EHEA_WATCH_DOG_TIMEOUT;
> +
> + if (use_lro)
> + dev->features |= NETIF_F_LRO;
>
> INIT_WORK(&port->reset_task, ehea_reset_port);
>
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
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