On 6/5/2020 11:00 AM, Luca Mancini wrote:

Hi Greg,
I realized I didn’t give a lot of context..
Basically, I’m implementing a custom action which is meant to buffer an x 
amount of dp_packets that match a certain flow, and then send a new packet 
directly from the switch, containing the buffer of packets, as its payload. At 
some other switch this payload is then meant to be extracted so that I can 
retrieve the buffer of dp_packets and send the single packets contained in the 
buffer to the correct hosts.
My action is implemented in userspace only for now since efficiency isn’t a 
concern for me atm. I already implemented the buffering mechanism and it works, 
and now I’m trying to create this custom udp packet so that I can store the 
buffer in it. For now I’m only trying to create a dummy udp packet with a 
“hello world” string as its payload just to see if I can create this custom 
packet however I just can’t figure out what I’m missing. My most recent attempt 
is the following:

1.Extract flow from one of the previously stored dp_packets
2.create a new dp_packet with dp_packet_new(65035)
3.use flow_compose() function on new packet to create a valid packet
4.add payload with dp_packet_put

Code:
struct flow flow;
flow_extract(&dp_packet_buff1[0].packet, &flow);
flow_compose(packetAggr, &flow, NULL, 0);
char * payload = "hello world";
dp_packet_put(packetAggr, payload, sizeof payload);

Pseudo code looks fine but the devil is in all the other details.  I
need to see a patch to put it in context.

- Greg
_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to