netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Gavin Shan <gwshan@linux.vnet.ibm.com>, netdev@vger.kernel.org
Cc: benh@kernel.crashing.org, davem@davemloft.net
Subject: Re: [PATCH RFC v1 7/7] net/faraday: Enable offload checksum according to device-tree
Date: Tue, 6 Oct 2015 17:19:10 +0300	[thread overview]
Message-ID: <5613D85E.30608@cogentembedded.com> (raw)
In-Reply-To: <1444100989-3437-8-git-send-email-gwshan@linux.vnet.ibm.com>

Hello.

On 10/6/2015 6:09 AM, Gavin Shan wrote:

> This enables IP/UDP/TCP offload checksum according to information
> passed on from bootloader through device-tree. The offload doesn't
> working properly when the interface works in NCSI mode.
>
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
> ---
>   drivers/net/ethernet/faraday/ftgmac100.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index 1b13fd4..8caed35 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -1377,7 +1377,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
>
>   	netdev->ethtool_ops = &ftgmac100_ethtool_ops;
>   	netdev->netdev_ops = &ftgmac100_netdev_ops;
> -	netdev->features = NETIF_F_IP_CSUM | NETIF_F_GRO;
> +	if (pdev->dev.of_node &&
> +	    of_get_property(pdev->dev.of_node, "no-hw-checksum", NULL))

    Why not of_property_read_bool()?

> +		netdev->features = NETIF_F_GRO;
> +	else
> +		netdev->features = NETIF_F_IP_CSUM | NETIF_F_GRO;

    Why not set NETIF_F_GRO outside of *if*?

[...]

MBR, Sergei

  reply	other threads:[~2015-10-06 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06  3:09 [PATCH RFC v1 0/7] NCSI Support Gavin Shan
2015-10-06  3:09 ` [PATCH RFC v1 1/7] net/ncsi: Resource management Gavin Shan
2015-10-06  3:09 ` [PATCH RFC v1 2/7] net/ncsi: Packet handler Gavin Shan
2015-10-06  3:09 ` [PATCH RFC v1 3/7] net/ncsi: Manage NCSI device Gavin Shan
2015-10-06  3:09 ` [PATCH RFC v1 4/7] net/ncsi: Netlink support Gavin Shan
2015-10-06  3:09 ` [PATCH RFC v1 5/7] net/faraday: Replace use_nc_si with use_ncsi Gavin Shan
2015-10-06  3:09 ` [PATCH RFC v1 6/7] net/faraday: Enable NCSI interface Gavin Shan
2015-10-06  3:09 ` [PATCH RFC v1 7/7] net/faraday: Enable offload checksum according to device-tree Gavin Shan
2015-10-06 14:19   ` Sergei Shtylyov [this message]
2015-10-06 23:19     ` Gavin Shan
2015-10-06 23:03 ` [PATCH RFC v1 0/7] NCSI Support Gavin Shan
2015-11-09  0:12 ` Gavin Shan

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=5613D85E.30608@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=gwshan@linux.vnet.ibm.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).