[ovs-dev] [PATCH v6] gre: Restructure tunneling.

Joe Stringer joe at wand.net.nz
Fri Jun 21 08:19:04 UTC 2013


I get a warning in gso.c after this patch:

datapath/linux/gso.c: In function ‘rpl_ip_local_out’:
datapath/linux/gso.c:134:174: warning: ‘id’ may be used uninitialized in
this function [-Wuninitialized]

Could you take a look at this?


On Fri, Jun 21, 2013 at 3:14 PM, Pravin Shelar <pshelar at nicira.com> wrote:

> 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().
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130621/3897a7fd/attachment-0003.html>


More information about the dev mailing list