[ovs-dev] [patch_ports (rebased) 3/4] ofproto-dpif: Implement patch ports in userspace.

Ethan Jackson ethan at nicira.com
Fri Jan 25 18:59:40 UTC 2013


Yep that's my fault, sorry about that.  I'm planning to send out the
flow based tunneling series for final review on monday.  In this
series, I'll pull netdev-vport out of the linux specific code, and
build it everywhere instead.  This should solve the problem. Would you
mind using a slightly older version of master until then?

Ethan

On Thu, Jan 24, 2013 at 10:40 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Fri, Jan 25, 2013 at 03:24:32PM +0900, YAMAMOTO Takashi wrote:
>> > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
>> > index 5c5d261..7732f49 100644
>> > --- a/ofproto/ofproto-dpif.c
>> > +++ b/ofproto/ofproto-dpif.c
>>
>> > @@ -5224,6 +5292,29 @@ send_packet(const struct ofport_dpif *ofport, struct ofpbuf *packet)
>> >      int error;
>> >
>> >      flow_extract(packet, 0, 0, NULL, OFPP_LOCAL, &flow);
>> > +    if (netdev_vport_is_patch(ofport->up.netdev)) {
>> > +        struct ofproto_dpif *peer_ofproto;
>> > +        struct dpif_flow_stats stats;
>> > +        struct ofport_dpif *peer;
>> > +        struct rule_dpif *rule;
>> > +
>> > +        peer = ofport_get_peer(ofport);
>> > +        if (!peer) {
>> > +            return ENODEV;
>> > +        }
>> > +
>> > +        dpif_flow_stats_extract(&flow, packet, time_msec(), &stats);
>> > +        netdev_vport_patch_inc_tx(ofport->up.netdev, &stats);
>> > +        netdev_vport_patch_inc_rx(peer->up.netdev, &stats);
>> > +
>> > +        flow.in_port = peer->up.ofp_port;
>> > +        peer_ofproto = ofproto_dpif_cast(peer->up.ofproto);
>> > +        rule = rule_dpif_lookup(peer_ofproto, &flow);
>> > +        rule_dpif_execute(rule, &flow, packet);
>> > +
>> > +        return 0;
>> > +    }
>> > +
>>
>> this and similar changes in this file break !LINUX_DATAPATH builds,
>> where netdev-vport won't be built.
>
> Thanks for reporting that.
>
> There's nothing Linux-specific about the patch port implementation any
> longer, so I guess we should build at least the patch port part of
> netdev-vport everywhere.



More information about the dev mailing list