[ovs-dev] Where to add GTP tunnel headers in datapath flow table of open vSwitch
Jesse Gross
jesse at kernel.org
Tue Mar 8 22:26:46 UTC 2016
On Sun, Feb 28, 2016 at 10:29 PM, Ajmer Singh <ajmersingh.tu06 at gmail.com> wrote:
> Hi,
>
> We are working on open Vswitch 2.4 and the requirement is to add GTP tunnel
> headers in flow table so that onos controller can add flows for GTP packets
> and the switch captures GTP packets as well. What we have identified so far:
> 1. Struct sk_buff :-> the structure containing the received packet
> 2. Struct sw_flow_key ->structure to extract flow key
> 3. Struct flow_table -> actual flow table resides at switch side
> 4. Struct sw_flow -> temp structure containing flows to match against
> flow_table
>
> our findings for GTP tunnel header addition:
> 1. no need to make changes in struct sk_buff since it has a variable
> element "data". this will contain GTP data also.
> 2. need to make changes in sw_flow_key; have to add GTP specific headers
>
> our query is; we need to add GTP headers in flow_table structure:
> struct flow_table {
> struct table_instance __rcu *ti;
> struct table_instance __rcu *ufid_ti;
> struct mask_cache_entry __percpu *mask_cache;
> struct mask_array __rcu *mask_array;
> unsigned long last_rehash;
> unsigned int count;
> unsigned int ufid_count;
> };
> we are facing difficulty in finding the structure where we can add GTP
> specific headers: following is the GTP specific fields:
> enum oxm_ofb_match_fields_experimenter {
> OFPXMT_GTP_TEID = 40, /* Tunnel Id */
> OFPXMT_GTP_VERSION = 41, /* GTP Version */
> OFPXMT_GTP_MSG_TYPE = 42, /* GTP Message Type */
> OFPXMT_GTP_TUNNEL_TYPE = 43 /* Type of Tunnel */
> };
>
> can anyone help in updating this structure?
As you said, tunnel headers go in struct sw_flow_key. At least some of
the fields you list above have existing members that you should be
able to use, such as tunnel ID. There is no need to modify struct
flow_table.
There are numerous people who have said that they are planning on
working on GTP in the past. I would recommend searching the mailing
list and attempting to work together.
More information about the dev
mailing list