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:	Mon, 4 Nov 2013 17:16:31 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Atzm Watanabe <atzm@...atosphere.co.jp>
CC:	David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
	<stephen@...workplumber.org>
Subject: Re: [PATCH RESEND] packet: Deliver VLAN TPID to userspace

On Wed, 2013-10-30 at 16:03 +0900, Atzm Watanabe wrote:
[...]
> Should it be structures as below?
>
> struct tpacket_hdr_variant1 {
>         __u32   tp_rxhash;
>         __u32   tp_vlan_tci;
> };
> 
> struct tpacket_hdr_variant2 {
>         __u32   tp_rxhash;
>         __u32   tp_vlan_tci;
>         __u32   tp_vlan_tpid;
> };
> 
> struct tpacket3_hdr {
>         __u32           tp_next_offset;
>         __u32           tp_sec;
>         __u32           tp_nsec;
>         __u32           tp_snaplen;
>         __u32           tp_len;
>         __u32           tp_status;
>         __u16           tp_mac;
>         __u16           tp_net;
>         /* pkt_hdr variants */
>         union {
>                 struct tpacket_hdr_variant1 hv1;
>                 struct tpacket_hdr_variant2 hv2;
>         };
> };
> 
> If it's ok, I'd like to send the patch v2.
[...]

I think this makes sense.

Also add a BUILD_BUG_ON(TPACKET3_HDRLEN != 48) somewhere.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

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