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

2014-05-14 Thread Ben Pfaff
On Wed, May 14, 2014 at 05:24:03AM +0200, Christian Stigen Larsen wrote: > Hi, > > > Den 11. mai 2014 kl. 04:19 skrev Ben Pfaff : > > > >> On Sat, May 10, 2014 at 06:11:29PM +0200, Christian Stigen Larsen wrote: > >> > >> Ben Pfaff : > Is do_xlate_actions ("translate actions"?) the wrong pl

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

2014-05-13 Thread Christian Stigen Larsen
Hi, > Den 11. mai 2014 kl. 04:19 skrev Ben Pfaff : > >> On Sat, May 10, 2014 at 06:11:29PM +0200, Christian Stigen Larsen wrote: >> >> Ben Pfaff : 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? >>> >>

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

2014-05-11 Thread Christian Stigen Larsen
Christian Stigen Larsen : > I think I've almost got it, but for some reason my action doesn't seem to be > triggered. Never mind, I got it to trigger now in odp-execute when setting the slow bit. -- Christian Stigen Larsen ___ discuss mailing list dis

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

2014-05-11 Thread Christian Stigen Larsen
Christian Stigen Larsen : > When translating the action, I do: > > struct ofpbuf* odp_actions = &ctx->xout->odp_actions; > nl_msg_put_unspec(odp_actions, OVS_ACTION_ATTR_FOO, > &foo, sizeof(struct ovs_action_foo)); This is done in do_xlate_actions, but I haven't ad

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

2014-05-11 Thread Christian Stigen Larsen
Hi, Ben Pfaff : >> 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? > > Yes, that's the way to do it. I think I've almost got it, but for some reason my action doesn't seem to be triggered.

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

2014-05-10 Thread Ben Pfaff
On Sat, May 10, 2014 at 06:11:29PM +0200, Christian Stigen Larsen wrote: > > Ben Pfaff : > >> 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

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

2014-05-10 Thread Ben Pfaff
On Sat, May 10, 2014 at 05:57:41PM +0200, Christian Stigen Larsen wrote: > Ben Pfaff : > >> 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

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

2014-05-10 Thread Christian Stigen Larsen
Ben Pfaff : >> 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. Sorry for being trigger-happy, but even if I chose to implem

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

2014-05-10 Thread Christian Stigen Larsen
Ben Pfaff : >> 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 >

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

2014-05-10 Thread Ben Pfaff
On Fri, May 09, 2014 at 11:12:44PM +0200, Christian Stigen Larsen wrote: > I'm trying to add a new OpenFlow action to Open vSwitch. > > So far, I'm able to install it using ovs-ofctl. It's clearly in the > flow-table and my entry function is called from do_xlate_actions in > ofproto-dpif-xlate.c.

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

2014-05-09 Thread Christian Stigen Larsen
Hi, I'm trying to add a new OpenFlow action to Open vSwitch. So far, I'm able to install it using ovs-ofctl. It's clearly in the flow-table and my entry function is called from do_xlate_actions in ofproto-dpif-xlate.c. However, I'm confused if this is the correct place for actually *executing* t