Re: [PATCH net-next v2] openvswitch: enable NSH support

2 messages, 2 authors, 2017-08-13 · open the first message on its own page

Re: [PATCH net-next v2] openvswitch: enable NSH support

From: Jiri Benc <hidden>
Date: 2017-08-11 10:22:56

On Fri, 11 Aug 2017 10:09:36 +0000, Jan Scheurich wrote:
Unless someone can explain to me why the datapath should understand the
internal structure/format of metadata in push_nsh, I would strongly
vote to keep the metadata as variable length octet sequence in the
non-structured OVS_ACTION_ATTR_PUSH_NSH
Could be but it still needs to be in a different attribute and not in
the ovs_action_push_nsh structure.

Separate attributes for MD1/MD2 has the advantage of easier validation:
with a separate MD1 type attribute, the size check is easier. With an
unstructured MD attribute, we'd need to look into the
OVS_ACTION_ATTR_NSH_BASE_HEADER attribute for mdtype and then validate
the unstructured MD attribute size manually. Not a big deal, though.
I don't have strong opinion here.

But I do have strong opinion that MD needs to go into a separate
attribute, whether there are separate attributes for MD1/2 or not.

 Jiri

RE: [PATCH net-next v2] openvswitch: enable NSH support

From: Jan Scheurich <hidden>
Date: 2017-08-13 21:13:59

From: Jiri Benc [mailto:jbenc@redhat.com]
Sent: Friday, 11 August, 2017 12:23

On Fri, 11 Aug 2017 10:09:36 +0000, Jan Scheurich wrote:
quoted
Unless someone can explain to me why the datapath should understand the
internal structure/format of metadata in push_nsh, I would strongly
vote to keep the metadata as variable length octet sequence in the
non-structured OVS_ACTION_ATTR_PUSH_NSH
Could be but it still needs to be in a different attribute and not in
the ovs_action_push_nsh structure.

Separate attributes for MD1/MD2 has the advantage of easier validation:
with a separate MD1 type attribute, the size check is easier. With an
unstructured MD attribute, we'd need to look into the
OVS_ACTION_ATTR_NSH_BASE_HEADER attribute for mdtype and then validate
the unstructured MD attribute size manually. Not a big deal, though.
I don't have strong opinion here.

But I do have strong opinion that MD needs to go into a separate
attribute, whether there are separate attributes for MD1/2 or not.
Jiri, I am not too familiar with conventions on the OVS netlink interface regarding the handling of variable length fields. What is the benefit of structuring the push_nsh action into

OVS_ACTION_ATTR_PUSH_NSH
+-- OVS_ACTION_ATTR_NSH_BASE_HEADER
+-- OVS_ACTION_ATTR_NSH_MD

instead of grouping the base header fields and the variable length MD into a single monolithic attribute OVS_ACTION_ATTR_PUSH_NSH? Is the main concern a potential future need to add additional parameters to the push_nsh datapath action? Are there examples for such structured actions other than OVS_ACTION_ATTR_CT where the need is obvious because it is very polymorphic?

BR, Jan

BTW:  The name OVS_ACTION_ATTR_NSH_BASE_HEADER is misleading because in the NSH draft the term base header is used for the first 32-bit word, whereas here it includes also the 32-bit Service Path header.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help