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]
Message-ID: <545F2268.9010108@mellanox.com>
Date:	Sun, 9 Nov 2014 10:14:32 +0200
From:	Amir Vadai <amirv@...lanox.com>
To:	Or Gerlitz <ogerlitz@...lanox.com>,
	"David S. Miller" <davem@...emloft.net>
CC:	<netdev@...r.kernel.org>, Matan Barak <matanb@...lanox.com>,
	"Saeed Mahameed" <saeedm@...lanox.com>,
	Shani Michaeli <shanim@...lanox.com>,
	"Ido Shamay" <idos@...lanox.com>, Jerry Chu <hkchu@...gle.com>
Subject: Re: [PATCH V2 net-next 2/2] net/mlx4_en: Extend checksum offloading
 by CHECKSUM COMPLETE

On 11/6/2014 6:28 PM, Or Gerlitz wrote:
> From: Shani Michaeli <shanim@...lanox.com>
> 
> When processing received traffic, pass CHECKSUM_COMPLETE status to the
> stack, with calculated checksum for non TCP/UDP packets (such
> as GRE or ICMP).
> 
> Although the stack expects checksum which doesn't include the pseudo
> header, the HW adds it. To address that, we are subtracting the pseudo
> header checksum from the checksum value provided by the HW.
> 
> In the IPv6 case, we also compute/add the IP header checksum which
> is not added by the HW for such packets.
> 
> Cc: Jerry Chu <hkchu@...gle.com>
> Signed-off-by: Shani Michaeli <shanim@...lanox.com>
> Signed-off-by: Matan Barak <matanb@...lanox.com>
> Signed-off-by: Or Gerlitz <ogerlitz@...lanox.com>
> ---
>  drivers/net/ethernet/mellanox/mlx4/en_ethtool.c |    2 +-
>  drivers/net/ethernet/mellanox/mlx4/en_netdev.c  |    5 +
>  drivers/net/ethernet/mellanox/mlx4/en_port.c    |    2 +
>  drivers/net/ethernet/mellanox/mlx4/en_rx.c      |  127 +++++++++++++++++++++--
>  drivers/net/ethernet/mellanox/mlx4/main.c       |    9 ++
>  drivers/net/ethernet/mellanox/mlx4/mlx4_en.h    |    5 +-
>  include/linux/mlx4/device.h                     |    1 +
>  7 files changed, 142 insertions(+), 9 deletions(-)
> 

[...]

> @@ -702,8 +787,8 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
>  		 * and not performing the selftest or flb disabled
>  		 */
>  		if (priv->flags & MLX4_EN_FLAG_RX_FILTER_NEEDED) {
> -			struct ethhdr *ethh;
>  			dma_addr_t dma;
> +			struct ethhdr *ethh;
>  			/* Get pointer to first fragment since we haven't
>  			 * skb yet and cast it to ethhdr struct
>  			 */
This  hunk is not needed


> @@ -744,13 +829,26 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
>  			(cqe->vlan_my_qpn & cpu_to_be32(MLX4_CQE_L2_TUNNEL));

[...]

Amir
--
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