On Mon, Mar 14, 2016 at 06:47:34PM +0530, Ajmer Singh wrote:
> Hi,
> I have a requirement of adding GTP headers in open Vswitch source code. We
> need to define 2 new actions: STRIP_GTP and ENCAP_GTP. these are the
> extensions.
>
> As per openflow specifications 1.0 and 1.1. If we add our 2 new actions
> then following structure will look like as follows.
>
> enum ofp_action_type {
> OFPAT_OUTPUT = 0, /* Output to switch port. */
> OFPAT_COPY_TTL_OUT = 11, /* Copy TTL "outwards" -- from
> next-to-outermost
> to outermost */
> OFPAT_COPY_TTL_IN = 12, /* Copy TTL "inwards" -- from outermost to
> next-to-outermost */
> OFPAT_SET_MPLS_TTL = 15, /* MPLS TTL */
> OFPAT_DEC_MPLS_TTL = 16, /* Decrement MPLS TTL */
> OFPAT_PUSH_VLAN = 17, /* Push a new VLAN tag */
> OFPAT_POP_VLAN = 18, /* Pop the outer VLAN tag */
> OFPAT_PUSH_MPLS = 19, /* Push a new MPLS tag */
> OFPAT_POP_MPLS = 20, /* Pop the outer MPLS tag */
> OFPAT_SET_QUEUE = 21, /* Set queue id when outputting to a port */
> OFPAT_GROUP = 22, /* Apply group. */
> OFPAT_SET_NW_TTL = 23, /* IP TTL. */
> OFPAT_DEC_NW_TTL = 24, /* Decrement IP TTL. */
> OFPAT_SET_FIELD = 25, /* Set a header field using OXM TLV format. */
> OFPAT_PUSH_PBB = 26, /*Push a new PBB service tag (I-TAG) */
> OFPAT_POP_PBB = 27, /* Pop the outer PBB service tag (I-TAG) */
> OFPAT_STRIP_GTP = 0xfffd, /* Strip GTP to get inner payload. */
> OFPAT_ENCAP_GTP = 0xfffe, /* Add external IP header, UDP header and
> GTP header */
> OFPAT_EXPERIMENTER = 0xffff
> };
> but I try to support this in open Vswitch code. and I find there is one raw
> action structure named as ofp_raw_action_type (/lib/ofp-actions.c), defined
> as.
>
> enum ofp_raw_action_type {
> /* ## ----------------- ## */
> /* ## Standard actions. ## */
> /* ## ----------------- ## */
>
> /* OF1.0(0): struct ofp10_action_output. */
> OFPAT_RAW10_OUTPUT,
> /* OF1.1+(0): struct ofp11_action_output. */
> OFPAT_RAW11_OUTPUT,
> }
>
> now I need to add Raw enum constants for these 2 new actions (STRIP_GTP and
> ENCAP_GTP) in this structure. we have same structures for these 2 new
> actions across all openflow versions. but facing issue in defining comment
> line before these constants.
> /* OF1.0(0): struct ofp10_action_output. */
> here, OF->for standard open flow actions
> 1.0->openflow protocol version
> (0)->action type number in specification
> struct ofp10_action_output -> corresponding structure for this action.
>
> Here, I m facing issue in defining these comments since these two new
> actions are not standard openflow actions. these are vendor actions. then
> how to write the comments for these new actions.
Did you read the large comment just above enum ofp_raw_action_type? It
has lots of information.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev