[ovs-dev] Where to add GTP tunnel headers in datapath flow table of open vSwitch

Ajmer Singh ajmersingh.tu06 at gmail.com
Mon Feb 29 06:29:16 UTC 2016


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?

Regards,
Ajmer



More information about the dev mailing list