Subject: [sfc] Using draft-penno-sfc-yang-14 to specify when a rendered service path should terminate

From: Kyle Larose <[email-masked]>
Date: Wed, 27 Jan 2016 20:47:21 +0000

Hello everyone,

I've been reading https://www.ietf.org/id/draft-penno-sfc-yang-14.txt to try and understand how to write some software which implements an SFF. In particular, I'm interested in mapping the rendered-service-path to the service forwarding state within the SFF.

A simple approach is to build a table mapping a packet's service path index and service index to a "next hop", using the rendered-service-path. What is not clear to me is how to determine when a rendered service path has terminated, so that my SFF can remove the encapsulation and send the packet out to its next hop outside the chain.

>From the SFC architecture doc (https://www.rfc-editor.org/rfc/rfc7665.txt), section 4.3, I see the following comment:

    "When traffic arrives at the SFF after the last SF has finished processing it, the final SFF knows from the service forwarding state that the SFC is complete. "

This means to me that the SFF should have an entry in my simple table indicating that when the final SF returns the packet, the chain should be terminated. But, to have such an entry, I need to know the "final" index. This information is not explicitly called out in the yang model.

So, my question ultimately boils down to this: Given the SFC yang model, how can an SFF "know" that an SFC is complete?

One idea that comes to mind is to look at the total number of hops in the rendered service path, and subtract that from the starting index. That would give us a service index at which the chain should terminate.  This is pretty straightforward. However, it seems odd to me that we are inferring information about the rendered service path using the rendered service path. The yang model for this seems to fairly precisely specify how packets should flow, except for this single case.

Rather than requiring implementations of the yang model to apply an algorithm to figure out when a path should terminate, does it make sense to either specify an 'end index' for the path, or to mark a specific hop as being the terminating hop?

Alternatively, is there a recommended/standard way to infer when a rendered-service-path is complete so that there is no danger of the model being interpreted differently depending on the implementation?
	
Thanks,

Kyle

---

From: "Reinaldo Penno (repenno)" <[email-masked]>
Date: Thu, 28 Jan 2016 01:52:01 +0000

In Opendaylight code we build a this next-hop table (some references here
https://tools.ietf.org/html/draft-penno-sfc-packet-02) and download to the
SFFs. if there is no more next_hop then the chain has ended.  The chain
can also end if SI goes to zero.

Thanks,

On 1/27/16, 12:47 PM, "sfc on behalf of Kyle Larose" <[email-masked]
on behalf of [email-masked]> wrote:

>A simple approach is to build a table mapping a packet's service path
>index and service index to a "next hop", using the rendered-service-path.
>What is not clear to me is how to determine when a rendered service path
>has terminated, so that my SFF can remove the encapsulation and send the
>packet out to its next hop outside the chain.