On Sat, Apr 25, 2020 at 08:29:24AM +0000, Luca Mancini wrote:
> Hi Ben,
> Firstly thank you for the swift response,
> In order to get a better understanding of what I was doing (I’ve starting 
> working with openvswitch a week ago) I tried defining an action called 
> OFPAT_RAW_BUFFER (that did absolutely nothing)
> just like the FAQ says and my mininet topology did in fact recognize it as a 
> valid action.
> Now I was starting the actual implementation of the action and that’s where 
> my problems arise, I know how I’m going to program it I just don’t know where 
> I’m meant to implement it and it’s somewhat frustrating.
> 
> Based on what you said :
> “You'll need to make the action send packets that need to be buffered to 
> userspace, with a "userspace" kernel action”
> How exactly is this done? I believe the kernel receives the packet, and the 
> datapath folder contains the code where the packet is recvd and processed, 
> how exactly is it then sent to userspace, I’m having a tough time 
> understanding how packets work in ovs.
> Diving in the code I found the ovs_dp_process_packet should be what I’m 
> looking for, but I’m not quite sure.

I don't think you need to modify kernel code at all, or even look at
it.  When userspace sets up the kernel flow, it would add a "userspace"
kernel action to the flow.  Userspace would receive the packet and
buffer it.  When buffering was no longer needed, it would pass it back
to the kernel.

> I guess a more accurate question for my case would be, where does
> someone who is new to ovs start from in order to understand the ovs
> codebase and learn how to implement a new action such as this one?

It might help to look at previous commits that added actions.
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to