On 12/19/25 1:04 PM, Ilya Maximets wrote: > If someone is adding new fields, they need to be aware that the OXM > field id cannot exceed 127, as only 7 bits are reserved for it in the > header. See "7.2.3.2 Flow Match Field Structures" in the OpenFlow 1.5 > spec or the comment at the top of lib/nx-match.c. > > Add a check for the value range, so the build fails if it's incorrect. > Otherwise the field will be truncated or overflow into the class and > break message parsing. > > Exmaple: > > include/openvswitch/meta-flow.h > - * NXM: NXM_NX_REG15(15) since v2.6. <15> > + * NXM: NXM_NX_REG15(130) since v2.6. <15> > > $ make > ./include/openvswitch/meta-flow.h:1029: > NXM_NX_REG15: OXM field is out of range (130 > 127) > > Note: the script calls the number 'oxm_type', which is a little > confusing, since type includes both the class and the field. But > that's a separate story. > > Signed-off-by: Ilya Maximets <[email protected]> > ---
Hi Ilya, Thanks for the fix (and for helping me understand why the patch I was working on didn't function properly due to me using invalid field IDs)! I hope it saves others the trouble of debugging why things don't actually work even if the compilation succeeded. Acked-by: Dumitru Ceara <[email protected]> Regards, Dumitru _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
