[ovs-dev] [PATCH V4] ofproto-dpif.c: Modify vsp_realdev_to_vlandev() function

Alex Wang alexw at nicira.com
Tue Jun 4 20:34:47 UTC 2013


Hey Ben,

I found in that the "send_packet()" function in branch-1.10 also invokes
the "realdev_to_vlandev()" function.

@@ -5743,8 +5744,10 @@ send_packet(const struct ofport_dpif *ofport, struct
ofpbuf *packet)
         odp_put_tunnel_action(&flow.tunnel, &odp_actions);
         odp_put_skb_mark_action(flow.skb_mark, &odp_actions);
     } else {
-        odp_port = vsp_realdev_to_vlandev(ofproto, ofport->odp_port,
-                                          flow.vlan_tci);
+        uint16_t vlandev_port;
+        vlandev_port = vsp_realdev_to_vlandev(ofproto, ofport->up.ofp_port,
+                                              flow.vlan_tci);
+        odp_port = ofp_port_to_odp_port(ofproto, vlandev_port);
         if (odp_port != ofport->odp_port) {
             eth_pop_vlan(packet);
             flow.vlan_tci = htons(0);

Thanks,


On Thu, May 30, 2013 at 10:08 PM, Ben Pfaff <blp at nicira.com> wrote:

> On Thu, May 30, 2013 at 06:24:44PM -0700, Alex Wang wrote:
> > Commit 52a90c29 (Implement new "VLAN splinters" feature) passed in
> OpenFlow
> > port number to vsp_realdev_to_vlandev() function which asks for datapath
> port
> > number.
> >
> > This patch fixes this bug by making the vsp_realdev_to_vlandev() function
> > take in and return OpenFlow port number.
> >
> > Signed-off-by: Alex Wang <alexw at nicira.com>
>
> Thanks!  I applied this to master and branch-1.11.  I also backported it
> to branch-1.10, but I want a review of the backport, which is here:
>         http://openvswitch.org/pipermail/dev/2013-May/027942.html
>
> I'll be away from my computer Friday and Monday, so I'd appreciate if
> someone would review this and apply it for me in my absence.
>
> Thanks,
>
> Ben.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130604/71d609d5/attachment-0003.html>


More information about the dev mailing list