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:	Fri, 5 Feb 2010 17:20:12 -0700
From:	"Tantilov, Emil S" <emil.s.tantilov@...el.com>
To:	Sridhar Samudrala <sri@...ibm.com>,
	Herbert Xu <herbert@...dor.apana.org.au>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	netdev <netdev@...r.kernel.org>
Subject: RE: [PATCH v2 net-next-2.6] packet: Add GSO/csum offload support.

Sridhar Samudrala wrote:
> This patch adds GSO/checksum offload to af_packet sockets using
> virtio_net_hdr. Based on Rusty's patch to add this support to tun.
> It allows GSO/checksum offload to be enabled when using raw socket
> backend with virtio_net.
> Adds PACKET_VNET_HDR socket option to prepend virtio_net_hdr in the
> receive path and process/skip virtio_net_hdr in the send path. This
> option is only allowed with SOCK_RAW sockets attached to ethernet
> type devices.
> 
> v2 updates
> ----------
> Michael's Comments
> - Perform length check in packet_snd() when GSO is off even when
>   vnet_hdr is present.
> - Check for SKB_GSO_FCOE type and return -EINVAL
> - don't allow tx/rx ring when vnet_hdr is enabled.
> Herbert's Comments
> - Removed ethernet specific code.
> - protocol value is assumed to be passed in by the caller.
> 
> Signed-off-by: Sridhar Samudrala <sri@...ibm.com>
> 

<snip>

> @@ -1826,6 +1968,22 @@ packet_setsockopt(struct socket *sock, int
>  		level, int optname, char __user *optv po->origdev = !!val;
>  		return 0;
>  	}
> +	case PACKET_VNET_HDR:
> +	{
> +		int val;
> +
> +		if (sock->type != SOCK_RAW)
> +			return -EINVAL;
> +		if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)

I am seeing a build failure on one of my systems that has kernel with CONFIG_PACKET_MMAP disabled, which appears to be caused by this patch:

net/packet/af_packet.c: In function 'packet_setsockopt':
net/packet/af_packet.c:1977: error: 'struct packet_sock' has no member named 'rx_ring'
net/packet/af_packet.c:1977: error: 'struct packet_sock' has no member named 'tx_ring'

Thanks,
Emil

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