[ovs-discuss] Adding a new OpenFlow action to ovs, ctx->xin->packet is null

Christian Stigen Larsen cslarsen at gmail.com
Sat May 10 15:57:41 UTC 2014


Ben Pfaff <blp at nicira.com>:
>> Is do_xlate_actions ("translate actions"?) the wrong place for this kind of
>> stuff?  How can I get a pointer to the raw packet data?
> 
> Usually, ofproto-dpif-xlate should not actually implement the OpenFlow
> actions.  Rather, it should output a set of datapath (kernel) actions
> that implement the OpenFlow actions.  Otherwise, every packet in the
> flow has to go from the kernel to userspace, which is slow.

Yes, I figured this was not the place.  So should I add a new action to
ovs_action_attr instead, then add it as a datapath action during
translation?

> If you do want to actually implement your actions during translation,
> then you can do it, but you have to mark the flow as "slow".  There are
> a few uses of this mechanism already, so look around for examples.

I don't *have* to, I just dived in to start somewhere.  The only problem is
that debugging kernel modules is kinda tricky, but I could install ovs in
userspace instead, I guess.

-- 
Christian Stigen Larsen


More information about the discuss mailing list