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: <CAKQ1sVNu9AN=gaRQfgqWq635YBZjEHegz0Ljj3xvvcDSoFaU=A@mail.gmail.com>
Date:	Fri, 31 Oct 2014 01:38:13 +0100
From:	Yann Ylavic <ylavic.dev@...il.com>
To:	Or Gerlitz <ogerlitz@...lanox.com>
Cc:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Matan Barak <matanb@...lanox.com>,
	Amir Vadai <amirv@...lanox.com>,
	Saeed Mahameed <saeedm@...lanox.com>,
	Shani Michaeli <shanim@...lanox.com>,
	Jerry Chu <hkchu@...gle.com>
Subject: Re: [PATCH net-next 8/8] net/mlx4_en: Extend checksum offloading by
 CHECKSUM COMPLETE

Hi,

On Thu, Oct 30, 2014 at 5:06 PM, Or Gerlitz <ogerlitz@...lanox.com> wrote:
[...]
> +static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, int hwtstamp_rx_filter)
> +{
> +       __wsum hw_checksum = 0;
> +
> +       void *hdr = (u8 *)skb->data + sizeof(struct ethhdr);
> +
> +       hw_checksum = csum_unfold((__force __sum16)cqe->checksum);
> +
> +       if (((struct ethhdr *)skb->data)->h_proto == htons(ETH_P_8021Q) &&
> +           hwtstamp_rx_filter != HWTSTAMP_FILTER_NONE) {
> +               /* next protocol non IPv4 or IPv6 */
> +               if (((struct vlan_hdr *)hdr)->h_vlan_encapsulated_proto
> +                   != htons(ETH_P_IP) ||

Shouldn't this be a AND (&&)?

> +                   ((struct vlan_hdr *)hdr)->h_vlan_encapsulated_proto
> +                   != htons(ETH_P_IPV6))
> +                       return -1;

Regards,
Yann.
--
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