[ovs-dev] [PATCH v6] gre: Restructure tunneling.
Pravin Shelar
pshelar at nicira.com
Fri Jun 21 06:14:30 UTC 2013
On Thu, Jun 20, 2013 at 5:50 PM, Jesse Gross <jesse at nicira.com> wrote:
> On Thu, Jun 20, 2013 at 5:19 PM, Pravin B Shelar <pshelar at nicira.com> wrote:
>> diff --git a/datapath/linux/compat/skbuff-openvswitch.c b/datapath/linux/compat/skbuff-openvswitch.c
>> index ef43ba9..720bc18 100644
>> --- a/datapath/linux/compat/skbuff-openvswitch.c
>> +++ b/datapath/linux/compat/skbuff-openvswitch.c
>> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
>> +int skb_checksum_help(struct sk_buff *skb, int inward)
>> +#else
>> +int skb_checksum_help(struct sk_buff *skb)
>> +#endif
>> +{
>> + /* Use default features for dst device. */
>> + if (unlikely(skb_is_nonlinear(skb))) {
>> + int err;
>
> I think the above comment no longer applies since we're not pulling
> any device features.
>
>> diff --git a/datapath/vport-gre.c b/datapath/vport-gre.c
>> index dae35ac..fda6481 100644
>> --- a/datapath/vport-gre.c
>> +++ b/datapath/vport-gre.c
>> +static int __send(struct vport *vport, struct sk_buff *skb,
>> + int tunnel_hlen,
>> + __be32 seq, __be16 gre64_flag)
> [...]
>> - ovs_tnl_rcv(vport, skb, &tun_key);
>> - return 0;
>> + /* Push Tunnel header. */
>> + skb = __build_header(skb, tunnel_hlen, seq, gre64_flag);
>> + if (unlikely(!skb)) {
>> + err = 0;
>> + goto err_free_rt;
>> + }
>>
>> + df = OVS_CB(skb)->tun_key->tun_flags & TUNNEL_DONT_FRAGMENT ?
>> + htons(IP_DF) : 0;
>> +
>> + /*
>> + * Allow our local IP stack to fragment the outer packet even
>> + * if the DF bit is set as a last resort. We also need to
>> + * force selection of an IP ID here because Linux will
>> + * otherwise leave it at 0 if the packet originally had DF set.
>> + */
>
> I believe this comment was deleted/moved in the upstream version.
>
> Those are both minor though so
> Acked-by: Jesse Gross <jesse at nicira.com>
Thanks,
I pushed code with above changes and compat checksum check in
iptunnel_pull_header().
More information about the dev
mailing list