All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Russell <brian.russell@brocade.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2 1/2] nsh: encapsulation module
Date: Tue, 1 Mar 2016 11:11:33 +0000	[thread overview]
Message-ID: <56D578E5.2030704@brocade.com> (raw)
In-Reply-To: <20160217033132.GA47212@ast-mbp.thefacebook.com>

On 17/02/16 03:31, Alexei Starovoitov wrote:
> On Thu, Feb 11, 2016 at 07:57:05PM +0000, Brian Russell wrote:
>> Support encap/decap of Network Service Header (NSH) as defined in
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_draft-2Dietf-2Dsfc-2Dnsh-2D01&d=CwIBAg&c=IL_XqQWOjubgfqINi2jTzg&r=Doie302MT-sezztwQymkPQ3_4X5Q3a0mKbiZzzoNm-0&m=TRPN3Zh-t31lBDA9ENrL1q3xeXBbMVLbXQhuldfgGN4&s=2lOXPH9TaoFa0x2lbk74kXi0vaLni54K6Hwjlb_Zs5k&e= 
>>
>> 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 <brussell@brocade.com>
> ...
>> +int nsh_register_listener(struct nsh_listener *listener)
>> +{
>> +	if (listener->max_ctx_hdrs > limit_ctx_hdrs)
>> +		return -ENOMEM;
>> +
>> +	mutex_lock(&nsh_listener_mutex);
>> +	list_add(&listener->list, &nsh_listeners);
>> +	mutex_unlock(&nsh_listener_mutex);
>> +	return 0;
>> +}
>> +EXPORT_SYMBOL(nsh_register_listener);
>> +EXPORT_SYMBOL(nsh_unregister_listener);
> 
> looks like this patch doesn't actually implement the protocol,
> but rather provides a placeholder for out of tree modules?
> 

It implements the protocol in terms of the NSH base and service path headers and it decaps the metadata if present. However, the actual interpretation of that metadata is left to registered listeners which might be out of tree modules. The NSH standard defines the mechanism to carry metadata but does not limit how it is used.

Thanks,

Brian

  reply	other threads:[~2016-03-01 11:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-11 19:57 [PATCH net-next v2 0/2] NSH and VxLAN-GPE Brian Russell
2016-02-11 19:57 ` [PATCH net-next v2 1/2] nsh: encapsulation module Brian Russell
2016-02-15 17:01   ` Jiri Benc
2016-03-01 11:11     ` Brian Russell
2016-02-17  3:31   ` Alexei Starovoitov
2016-03-01 11:11     ` Brian Russell [this message]
2016-02-11 19:57 ` [PATCH net-next v2 2/2] vxlan: support GPE/NSH Brian Russell
2016-02-15 16:49   ` Jiri Benc
2016-03-01 11:10     ` Brian Russell
2016-03-01 18:20       ` Jiri Benc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56D578E5.2030704@brocade.com \
    --to=brian.russell@brocade.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.