lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 7 Oct 2015 10:19:25 +1100
From:	Gavin Shan <gwshan@...ux.vnet.ibm.com>
To:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc:	Gavin Shan <gwshan@...ux.vnet.ibm.com>, netdev@...r.kernel.org,
	benh@...nel.crashing.org, davem@...emloft.net
Subject: Re: [PATCH RFC v1 7/7] net/faraday: Enable offload checksum
 according to device-tree

On Tue, Oct 06, 2015 at 05:19:10PM +0300, Sergei Shtylyov wrote:
>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@...ux.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()?
>

of_property_read_bool() is more appropriate here though both functions
are wrappers of of_find_property().

>>+		netdev->features = NETIF_F_GRO;
>>+	else
>>+		netdev->features = NETIF_F_IP_CSUM | NETIF_F_GRO;
>
>   Why not set NETIF_F_GRO outside of *if*?
>

Ok.

Thanks,
Gavin

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ