<div dir="ltr">Hi all<div><br></div><div>I am interested in add some new header support to OVS.</div><div><br></div><div>I find some instructions at the end of this page.</div><div><a href="https://github.com/openvswitch/ovs/blob/7169d4fdc8e564331c7a5ad910bc1d99cb413712/FAQ.rst">https://github.com/openvswitch/ovs/blob/7169d4fdc8e564331c7a5ad910bc1d99cb413712/FAQ.rst</a><br></div><div><br></div><div>I read the OVS code in related parts. Following is my understanding of how the fields are processed:</div><div><br></div><div>1. The compiler first parses the enum mf_field_id in meta-flow.h, and read the <u><b>comment </b></u>in enum mf_field_id to construct the match field id in OXM and NXM. eg. NXM: NXM_NX_MPLS_TTL(30) since v2.6 will make the id of this field as 30 in NXM.</div><div><br></div><div>2. The compiler also parses the field name in the comment, and match it with the name in the struct flow?<u>(this part i am not sure) </u></div><div>eg.     MFF_CT_STATE,       /* &quot;ct_zone&quot;. .....    , this will parse the MFF_CT_STATE in the ct_zone in the struct flow?</div><div><br></div><div>3. In run time, miniflow_extract will push the value of different fields in the packet into the corresponding field of the struct flow.</div><div><br></div><div>4. Since the compiler already links the field id in step one, so the controller can send the match instruction using the class and id described in step.</div><div><br></div><div>Questions:</div><div><br></div><div>1. am I right for the steps described above</div><div><br></div><div>2. I am not sure about what nx_put_raw does. Is it used for parsing the enum mf_field_id and its comment?</div><div><br></div><div>3. Is it ok that I add a new field, eg. MFF_MY_Field.  NXM: NXM_NX_MY_FIELD(#ID). and the #ID is not same as the ids already defined in the enum mf_field_id?</div><div><br></div><div>4. Is there any experimenter match class api i can use?</div><div><br></div><div>6. If at the switch side, I have MFF_MY_Field.  NXM: NXM_NX_MY_FIELD(#ID) ready, At the controller side, I just need to construct the oxm_fields according to the setup in the switch. </div><div><br></div><div>7. There is two NXM class in OXM class: OFPXMC_NXM_0 OFPXMC_NXM_1. How should I define the class of my match in these two?</div><div><br></div><div>5. Is there any more detailed explanation or tutorial that I can learn about how to do this?</div><div><br></div><div>(PS:</div><div><a href="https://github.com/openvswitch/ovs/blob/7169d4fdc8e564331c7a5ad910bc1d99cb413712/FAQ.rst">https://github.com/openvswitch/ovs/blob/7169d4fdc8e564331c7a5ad910bc1d99cb413712/FAQ.rst</a><br></div><div>This information seems a little out of date, because In 2.7 the &quot;struct flow&quot; is defined in the include/openvswitch/flow.h, and the enum mf_field_id is in include/openvswitch/flow.h.)</div><div><br></div><div><br></div><div><br></div><div>THANKS IN ADVANCE !!!!</div><div><br></div><div>Yours</div><div>Charles</div><div><br></div><div><br></div></div>