Patent attributes
Embodiments herein describe branch statements for a segment routing (SR) list that are inserted into a packet header for use when performing Service function chaining (SFC). For example, the branch statement may be embedded within a SR list and includes a serverless function ID and two different segment IDs (SIDs). When reaching a network node assigned to perform the serverless function, the node uses the function ID to determine the appropriate serverless function to use when evaluating the packet and then uses the results of that function to determine which segment to use when forwarding the packet. Thus, rather than forming a linear chain, the branch statement permits the SR list to form different routes (depending on the results of the serverless function) as part of SFC.