Re: [PATCH net-next 1/2] nsh: encapsulation module

2016-02-11 Thread Brian Russell
On 11/02/16 16:39, David Miller wrote: > From: Brian Russell > Date: Thu, 11 Feb 2016 10:35:13 + > >> +++ b/include/net/nsh.h >> +struct nsh_metadata { >> +u_short class; >> +u_char crit; >> +u_char type; >> +u_int len; /* 4 byte words */ >> +void *data; > > Do not use

Re: [PATCH net-next 1/2] nsh: encapsulation module

2016-02-11 Thread David Miller
From: Brian Russell Date: Thu, 11 Feb 2016 10:35:13 + > +++ b/include/net/nsh.h > +struct nsh_metadata { > + u_short class; > + u_char crit; > + u_char type; > + u_int len; /* 4 byte words */ > + void *data; Do not use these shorthands, spell out "unsigned short" etc. ex

Re: [PATCH net-next 1/2] nsh: encapsulation module

2016-02-11 Thread Brian Russell
On 11/02/16 16:17, Robert Shearman wrote: > On 11/02/16 11:35, Brian Russell wrote: > ... >> diff --git a/include/net/nsh.h b/include/net/nsh.h >> new file mode 100644 >> index 000..7a5fb95 >> --- /dev/null >> +++ b/include/net/nsh.h >> @@ -0,0 +1,158 @@ >> +/* >> + * Network Service Header (

Re: [PATCH net-next 1/2] nsh: encapsulation module

2016-02-11 Thread Robert Shearman
On 11/02/16 11:35, Brian Russell wrote: ... diff --git a/include/net/nsh.h b/include/net/nsh.h new file mode 100644 index 000..7a5fb95 --- /dev/null +++ b/include/net/nsh.h @@ -0,0 +1,158 @@ +/* + * Network Service Header (NSH) inserted onto encapsulated packets + * or frames to realize servi

[PATCH net-next 1/2] nsh: encapsulation module

2016-02-11 Thread Brian Russell
Support encap/decap of Network Service Header (NSH) as defined in https://tools.ietf.org/html/draft-ietf-sfc-nsh-01 Includes support for Type 1 and Type 2 metadata and a simple registration for listeners to see decapsulated packets based on the Type/Class. Signed-off-by: Brian Russell --- inclu