From: Ben Hutchings <bhutchings@solarflare•com>
To: leitao@linux•vnet.ibm.com
Cc: shemminger@vyatta•com, davem@davemloft•net, netdev@vger•kernel.org
Subject: Re: [PATCH] ehea: Fixing LRO configuration
Date: Wed, 08 Dec 2010 18:44:09 +0000 [thread overview]
Message-ID: <1291833849.2560.26.camel@bwh-desktop> (raw)
In-Reply-To: <1291833062-27446-1-git-send-email-leitao@linux.vnet.ibm.com>
On Wed, 2010-12-08 at 16:31 -0200, leitao@linux•vnet.ibm.com wrote:
> 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.
[...]
> 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 &&.
> 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.
> 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.
next prev parent reply other threads:[~2010-12-08 18:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-08 18:31 [PATCH] ehea: Fixing LRO configuration leitao
2010-12-08 18:44 ` Ben Hutchings [this message]
2010-12-08 18:51 ` leitao
2010-12-08 20:19 ` David Miller
2010-12-13 0:39 ` Jesse Gross
2010-12-14 13:01 ` Breno Leitao
2010-12-14 20:55 ` Jesse Gross
2010-12-20 19:02 ` [PATCH] ehea: Avoid changing vlan flags leitao
2010-12-28 21:51 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1291833849.2560.26.camel@bwh-desktop \
--to=bhutchings@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=leitao@linux$(echo .)vnet.ibm.com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=shemminger@vyatta$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox