[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100129213619.GA6404@gondor.apana.org.au>
Date: Sat, 30 Jan 2010 08:36:19 +1100
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Sridhar Samudrala <sri@...ibm.com>
Cc: David Miller <davem@...emloft.net>,
Rusty Russell <rusty@...tcorp.com.au>,
"Michael S. Tsirkin" <mst@...hat.com>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next-2.6] packet: Add GSO/checksum offload support
to af_packet sockets
On Fri, Jan 29, 2010 at 01:25:08PM -0800, Sridhar Samudrala wrote:
>
> This check is to dis-allow processing of packets with virtio_net_hdr
> destined for non-ethernet devices.
> Is it OK if i add a check in packet_bind() to not allow binding to
> a non-ethernet device when PACKET_VNET_HDR option is set?
>
> I need to figure out a way to set the skb protocol correctly based
> on the packet. Any clues?
IMHO the skb protocol should be set by whatever is invoking the
sendmsg call. After all they would know what the L2 header is
and should be able to deduce the protocol correctly.
Adding all this logic into AF_PACKET is just a hack.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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