Difference between revisions of "SPP Command Interface"

From ARL Wiki
Jump to navigationJump to search
Line 16: Line 16:
 
Or a user may want to reserve resources in advance (e.g., port bandwidth and NPE fastpath).
 
Or a user may want to reserve resources in advance (e.g., port bandwidth and NPE fastpath).
  
That command line interface is currently provided through four programs:  ''client'', ''resrv'', ''fltr_ipv4'' and ''create_fp_ipv4''.
+
That command line interface is currently provided through three programs:  ''scfg'' (slice configuration), ''ip_fpc'' (IPv4 filter configuration) and ''ip_fpd'' (IPv4 fastpath daemon).
 
(<font color=red>'''Note:''' These names are likely to change in the near future.</font>
 
(<font color=red>'''Note:''' These names are likely to change in the near future.</font>
The ''client'' and ''resrv'' programs apply to any metanet while ''fltr_ipv4'' and ''create_fp_ipv4'' are specific to the IPv4 code option.
+
The ''scfg'' program applies to any metanet while ''ip_fpc'' and ''ip_fpd'' are specific to the IPv4 code option.
  
 
{| align=center border=1 cellspacing=0 cellpadding=3
 
{| align=center border=1 cellspacing=0 cellpadding=3
 
! Program            || Functionality
 
! Program            || Functionality
 
|-
 
|-
| ''client''        || Interface information, endpoint management, <br>fastpath management, queue management
+
| ''scfg''        || Interface information, endpoint management, <br>fastpath management, queue management,
 +
<br>reservation management
 
|-
 
|-
| ''resrv''         || Resource reservation
+
| ''ip_fpc''     || IPv4 filter management
 
|-
 
|-
| ''fltr_ipv4''     || Filter management
+
| ''ip_fpd'' || IPv4 fastpath configuration, LD and EX traffic handling
|-
 
| ''create_fp_ipv4'' || Fastpath configuration, LD and EX traffic handling
 
 
|}
 
|}
  
Line 36: Line 35:
 
The fact that these programs exist as separate programs is historic.
 
The fact that these programs exist as separate programs is historic.
 
For example, one could have a single ''ipv4_control'' program that included all of the functionality of these programs.
 
For example, one could have a single ''ipv4_control'' program that included all of the functionality of these programs.
Furthermore, a new code option such as ''vnet'' would have a ''vnet_control'' program that included the functionality in the ''client'' and ''resrv'' programs above and vnet-specific functionality for filters and handling LD and EX traffic.
+
Furthermore, a new code option such as ''vnet'' would have a ''vnet_control'' program that included the functionality in the ''scfg'' program above and vnet-specific functionality for filters and handling LD and EX traffic.
(Note:  The programs ''fltr_ipv4'' and ''create_fp_ipv4'' were called ''fltr'' and ''create_fp'' respectively in [[The GEC4 Demo]].)
+
(Note:  The programs ''ip_fpc'' and ''ip_fpd'' were called ''fltr'' and ''create_fp'' respectively in [[The GEC4 Demo]].)
  
 
== Command Interface Syntax ==
 
== Command Interface Syntax ==
  
The ''client'' and ''resrv'' commands use GNU-style ''long options'' (e.g., ''--cmd get_endpoint'', ''--ipaddr 10.1.2.3'').
+
The ''scfg'' command uses GNU-style ''long options'' (e.g., ''--cmd get_endpoint'', ''--ipaddr 10.1.2.3'').
 
And although they both have a few arguments that control their configuration (e.g., message log noise volume), this page only describes the user commands.
 
And although they both have a few arguments that control their configuration (e.g., message log noise volume), this page only describes the user commands.
 
In the descriptions below, the following metasymbols are used in the syntactic descriptions:
 
In the descriptions below, the following metasymbols are used in the syntactic descriptions:
Line 68: Line 67:
 
=== Getting Interface Information ===
 
=== Getting Interface Information ===
  
* client --cmd get_ifaces
+
* scfg --cmd get_ifaces
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Display all interfaces
 
Display all interfaces
 
         </ul>
 
         </ul>
* client --cmd get_ifpeer --ifn <font color=red>N</font>
+
* scfg --cmd get_ifpeer --ifn <font color=red>N</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Display the peer of interface num <font color=red>N</font>
 
Display the peer of interface num <font color=red>N</font>
 
         </ul>
 
         </ul>
* client --cmd get_ifattrs --ifn <font color=red>N</font>
+
* scfg --cmd get_ifattrs --ifn <font color=red>N</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Display the attributes of interface num <font color=red>N</font>
 
Display the attributes of interface num <font color=red>N</font>
 
         </ul>
 
         </ul>
* client --cmd get_ifn --ipaddr <font color=red>A</font>
+
* scfg --cmd get_ifn --ipaddr <font color=red>A</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Display the interface associated with IP address <font color=red>A</font>
 
Display the interface associated with IP address <font color=red>A</font>
Line 90: Line 89:
 
=== Reservation Management ===
 
=== Reservation Management ===
  
* resrv --cmd get_resrvs
+
* scfg --cmd get_resrvs
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Display all slice reservations
 
Display all slice reservations
 
         </ul>
 
         </ul>
* resrv --cmd get_resrv [--date <font color=red>D</font>]
+
* scfg --cmd get_resrv [--date <font color=red>D</font>]
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Display slice reservation for period covered by date <font color=red>D</font> (default: current).
 
Display slice reservation for period covered by date <font color=red>D</font> (default: current).
 
<br>Date format is YYYYMMDDHHMMSS.
 
<br>Date format is YYYYMMDDHHMMSS.
 
         </ul>
 
         </ul>
* resrv --cmd make_resrv --xfile <font color=red>FN</font>
+
* scfg --cmd make_resrv --xfile <font color=red>FN</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Make a reservation described by XML file <font color=red>FN</font>
 
Make a reservation described by XML file <font color=red>FN</font>
 
         </ul>
 
         </ul>
* resrv --cmd cancel_resrv [--date <font color=red>D</font>]
+
* scfg --cmd cancel_resrv [--date <font color=red>D</font>]
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Cancel slice reservation for period covered by date <font color=red>D</font> (default: current).
 
Cancel slice reservation for period covered by date <font color=red>D</font> (default: current).
 
<br>Date format is YYYYMMDDHHMMSS.
 
<br>Date format is YYYYMMDDHHMMSS.
 
         </ul>
 
         </ul>
* resrv --cmd update_resrv --xfile <font color=red>FN</font>
+
* scfg --cmd update_resrv --xfile <font color=red>FN</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Update slice reservation described by XML file <font color=red>FN</font>
 
Update slice reservation described by XML file <font color=red>FN</font>
 
         </ul>
 
         </ul>
* resrv --cmd alloc_plspec
+
* scfg --cmd alloc_plspec
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Allocate GPE slice resources
 
Allocate GPE slice resources
 
         </ul>
 
         </ul>
* resrv --cmd free_plspec
+
* scfg --cmd free_plspec
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Free GPE slice resources
 
Free GPE slice resources
 
         </ul>
 
         </ul>
* resrv --cmd free_fpspec --fpid <font color=red>I</font>
+
* scfg --cmd free_fpspec --fpid <font color=red>I</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Free fastpath slice resources for fastpath <font color=red>I</font>
 
Free fastpath slice resources for fastpath <font color=red>I</font>
Line 128: Line 127:
 
=== Endpoint Management ===
 
=== Endpoint Management ===
  
* client --cmd alloc_endpoint --bw <font color=red>K</font> --ipaddr <font color=red>A</font> --port <font color=red>N</font> --proto <font color=red>P</font>
+
* scfg --cmd alloc_endpoint --bw <font color=red>K</font> --ipaddr <font color=red>A</font> --port <font color=red>N</font> --proto <font color=red>P</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Create the <font color=red>K</font> Kbps capacity LC endpoint (<font color=red>A</font>, <font color=red>N</font>, <font color=red>P</font>)
 
Create the <font color=red>K</font> Kbps capacity LC endpoint (<font color=red>A</font>, <font color=red>N</font>, <font color=red>P</font>)
 
         </ul>
 
         </ul>
* client --cmd free_endpoint --ipaddr <font color=red>A</font> --port <font color=red>N</font> --proto <font color=red>P</font>
+
* scfg --cmd free_endpoint --ipaddr <font color=red>A</font> --port <font color=red>N</font> --proto <font color=red>P</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Remove the LC endpoint (<font color=red>A</font>, <font color=red>N</font>, <font color=red>P</font>)
 
Remove the LC endpoint (<font color=red>A</font>, <font color=red>N</font>, <font color=red>P</font>)
Line 139: Line 138:
 
=== Fastpath Management ===
 
=== Fastpath Management ===
  
* client --cmd alloc_udp_tunnel --fpid <font color=red>I</font> --bw  <font color=red>K</font> --ipaddr <font color=red>A</font> --port <font color=red>N</font>
+
* scfg --cmd alloc_udp_tunnel --fpid <font color=red>I</font> --bw  <font color=red>K</font> --ipaddr <font color=red>A</font> --port <font color=red>N</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Add (<font color=red>A</font>, <font color=red>N</font>) as a local end of a UDP tunnel with capacity <font color=red>K</font> Kbps to fastpath <font color=red>I</font>
 
Add (<font color=red>A</font>, <font color=red>N</font>) as a local end of a UDP tunnel with capacity <font color=red>K</font> Kbps to fastpath <font color=red>I</font>
 
         </ul>
 
         </ul>
* client --cmd free_udp_tunnel --fpid <font color=red>I</font> --ipaddr <font color=red>A</font> --port <font color=red>N</font>
+
* scfg --cmd free_udp_tunnel --fpid <font color=red>I</font> --ipaddr <font color=red>A</font> --port <font color=red>N</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Free (<font color=red>A</font>, <font color=red>N</font>) as a local end of a UDP tunnel
 
Free (<font color=red>A</font>, <font color=red>N</font>) as a local end of a UDP tunnel
Line 163: Line 162:
 
=== Queue Management ===
 
=== Queue Management ===
  
* client --cmd get_queue_params --fpid <font color=red>I</font> --qid <font color=red>Q</font>
+
* scfg --cmd get_queue_params --fpid <font color=red>I</font> --qid <font color=red>Q</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Get the threshold and bandwidth for (fastpath <font color=red>I</font>, queue <font color=red>Q</font>)
 
Get the threshold and bandwidth for (fastpath <font color=red>I</font>, queue <font color=red>Q</font>)
 
         </ul>
 
         </ul>
* client --cmd get_queue_len --fpid <font color=red>I</font> --qid <font color=red>Q</font>
+
* scfg --cmd get_queue_len --fpid <font color=red>I</font> --qid <font color=red>Q</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Get the length (bytes) of (fastpath <font color=red>I</font>, queue <font color=red>Q</font>)
 
Get the length (bytes) of (fastpath <font color=red>I</font>, queue <font color=red>Q</font>)
 
         </ul>
 
         </ul>
* client --cmd bind_queue --fpid <font color=red>I</font> --miid <font color=red>M</font> --qid_list_type 0 --qid_list <font color=red>Q1</font> --qid_list <font color=red>Q2</font> ...
+
* scfg --cmd bind_queue --fpid <font color=red>I</font> --miid <font color=red>M</font> --qid_list_type 0 --qid_list <font color=red>Q1</font> --qid_list <font color=red>Q2</font> ...
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Bind queues <font color=red>Q1</font>, <font color=red>Q2</font>, ... to (fastpath <font color=red>I</font>, meta-interface <font color=red>M</font>)
 
Bind queues <font color=red>Q1</font>, <font color=red>Q2</font>, ... to (fastpath <font color=red>I</font>, meta-interface <font color=red>M</font>)
 
         </ul>
 
         </ul>
* client --cmd bind_queue --fpid <font color=red>I</font> --miid <font color=red>M</font> --qid_list_type 1 --qid_list <font color=red>Q1</font> --qid_list <font color=red>Q2</font>
+
* scfg --cmd bind_queue --fpid <font color=red>I</font> --miid <font color=red>M</font> --qid_list_type 1 --qid_list <font color=red>Q1</font> --qid_list <font color=red>Q2</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Bind queues in the range <font color=red>Q1</font> to <font color=red>Q2</font>-1 inclusive to (fastpath <font color=red>I</font>, meta-interface <font color=red>M</font>)
 
Bind queues in the range <font color=red>Q1</font> to <font color=red>Q2</font>-1 inclusive to (fastpath <font color=red>I</font>, meta-interface <font color=red>M</font>)
 
         </ul>
 
         </ul>
* client --cmd set_queue_params --fpid <font color=red>I</font> --qid <font color=red>Q</font> --threshold <font color=red>B</font> --bw <font color=red>K</font>
+
* scfg --cmd set_queue_params --fpid <font color=red>I</font> --qid <font color=red>Q</font> --threshold <font color=red>B</font> --bw <font color=red>K</font>
 
         <ul style="padding-left: 0.5in;">
 
         <ul style="padding-left: 0.5in;">
 
Set the threshold and bandwidth of (fastpath <font color=red>I</font>, queue <font color=red>Q</font>) to <font color=red>B</font> bytes and <font color=red>K</font> Kbps
 
Set the threshold and bandwidth of (fastpath <font color=red>I</font>, queue <font color=red>Q</font>) to <font color=red>B</font> bytes and <font color=red>K</font> Kbps

Revision as of 01:44, 7 February 2010


System Resource Manager (SRM) and Resource Manager Proxy (RMP)

Major Control Software Modules

The page SPP Control Software describes the System Resource Manager (SRM) that runs on the SPP's Control Processor and the Resource Manager Proxy (RMP) that runs on each SPP's GPE, and it describes the programming API provided by the RMP. This page describes the accompanying command line interface which allows users to reserve and configure resources interactively or through a shell script. In brief, the SRM coordinates the use of various SPP resources while the RMP provides an interface through which user slices can request and configure resources. The RMP, in turn, may communicate with the Substrate Control Daemons (SCD) in the Line Card and the NPE to configure packet pathways.

User requests are made through an interface provided by the RMP on the user’s assigned GPE. The RMP forwards these requests to the SRM which manages all system level resources, including external port numbers, physical interface bandwidth and NPE resources. For example, a user can request the use of a specific external port number in order to run a server that listens on that port at the user's GPE. Or a user may want to reserve resources in advance (e.g., port bandwidth and NPE fastpath).

That command line interface is currently provided through three programs: scfg (slice configuration), ip_fpc (IPv4 filter configuration) and ip_fpd (IPv4 fastpath daemon). (Note: These names are likely to change in the near future. The scfg program applies to any metanet while ip_fpc and ip_fpd are specific to the IPv4 code option.

Program Functionality
scfg Interface information, endpoint management,
fastpath management, queue management,


reservation management

ip_fpc IPv4 filter management
ip_fpd IPv4 fastpath configuration, LD and EX traffic handling

There will be other metanet-specific programs as other code options get developed. It is worth noting that all of these programs implement their functionallity by calling RMP library functions. The fact that these programs exist as separate programs is historic. For example, one could have a single ipv4_control program that included all of the functionality of these programs. Furthermore, a new code option such as vnet would have a vnet_control program that included the functionality in the scfg program above and vnet-specific functionality for filters and handling LD and EX traffic. (Note: The programs ip_fpc and ip_fpd were called fltr and create_fp respectively in The GEC4 Demo.)

Command Interface Syntax

The scfg command uses GNU-style long options (e.g., --cmd get_endpoint, --ipaddr 10.1.2.3). And although they both have a few arguments that control their configuration (e.g., message log noise volume), this page only describes the user commands. In the descriptions below, the following metasymbols are used in the syntactic descriptions:

A IP address (e.g., 192.168.2.32) K The number of Kilobits per second
D Date in YYYMMDDHHMMSS format M Meta-interface identifier
F Filter identifier N Number (non-negative)
FN Filename P Protocol number (e.g., 6 (TCP), 17 (UDP))
I An identifier or index Q Queue identifier
[x] Optional argument x S Statistics index
{ x xxx y } Alternative arguments x and y X Hexadecimal mask or 0

When a command description needs to use multiple instances of a metasymbol, distinction between instances is indicated by following the metasymbol insances by one or more distinguishing symbols (e.g., quote, integer, lowercase letters) (e.g., N and N' or N1, N2 and N3).

Command Interface

Getting Interface Information

  • scfg --cmd get_ifaces
    Display all interfaces
  • scfg --cmd get_ifpeer --ifn N
    Display the peer of interface num N
  • scfg --cmd get_ifattrs --ifn N
    Display the attributes of interface num N
  • scfg --cmd get_ifn --ipaddr A
    Display the interface associated with IP address A
  • client --cmd get_endpoint --fpid I --mii M
    Display the endpoint associated with (fastpath I, meta-interface M)

Reservation Management

  • scfg --cmd get_resrvs
    Display all slice reservations
  • scfg --cmd get_resrv [--date D]
    Display slice reservation for period covered by date D (default: current).
    Date format is YYYYMMDDHHMMSS.
  • scfg --cmd make_resrv --xfile FN
    Make a reservation described by XML file FN
  • scfg --cmd cancel_resrv [--date D]
    Cancel slice reservation for period covered by date D (default: current).
    Date format is YYYYMMDDHHMMSS.
  • scfg --cmd update_resrv --xfile FN
    Update slice reservation described by XML file FN
  • scfg --cmd alloc_plspec
    Allocate GPE slice resources
  • scfg --cmd free_plspec
    Free GPE slice resources
  • scfg --cmd free_fpspec --fpid I
    Free fastpath slice resources for fastpath I


Endpoint Management

  • scfg --cmd alloc_endpoint --bw K --ipaddr A --port N --proto P
    Create the K Kbps capacity LC endpoint (A, N, P)
  • scfg --cmd free_endpoint --ipaddr A --port N --proto P
    Remove the LC endpoint (A, N, P)

Fastpath Management

  • scfg --cmd alloc_udp_tunnel --fpid I --bw K --ipaddr A --port N
    Add (A, N) as a local end of a UDP tunnel with capacity K Kbps to fastpath I
  • scfg --cmd free_udp_tunnel --fpid I --ipaddr A --port N
    Free (A, N) as a local end of a UDP tunnel

Queue Management

  • scfg --cmd get_queue_params --fpid I --qid Q
    Get the threshold and bandwidth for (fastpath I, queue Q)
  • scfg --cmd get_queue_len --fpid I --qid Q
    Get the length (bytes) of (fastpath I, queue Q)
  • scfg --cmd bind_queue --fpid I --miid M --qid_list_type 0 --qid_list Q1 --qid_list Q2 ...
    Bind queues Q1, Q2, ... to (fastpath I, meta-interface M)
  • scfg --cmd bind_queue --fpid I --miid M --qid_list_type 1 --qid_list Q1 --qid_list Q2
    Bind queues in the range Q1 to Q2-1 inclusive to (fastpath I, meta-interface M)
  • scfg --cmd set_queue_params --fpid I --qid Q --threshold B --bw K
    Set the threshold and bandwidth of (fastpath I, queue Q) to B bytes and K Kbps

IPv4 Filter Management

xxxxx key, mask, peer

 fltr --cmd write_fltr --fpid I --fid F
       --key_type {0|1} --key_rxmi M
       --key_saddr A   --key_sport N   --key_daddr A'   --key_dport N'
       --mask_saddr X1 --mask_sport X2 --mask_daddr X1' --mask_dport X2'
       --key_proto P   --mask_flags xxxxx
       --txdaddr Aout  --txdport Nout
       --qid Q         --sindx S
    Install a filter for fastpath I with filter identifier F.
    match (key-mask), peer, qid, stats
    key_type
    F is from the range 0 to n-3 where n is the number of filter resources requested for the fastpath.
 fltr --cmd update_result
 fltr --cmd get_fltr_bykey
 fltr --cmd get_fltr_byfid
 fltr --cmd lookup_fltr
 fltr --cmd rem_fltr_bykey
 fltr --cmd rem_fltr_byfid


IPv4 Fastpath Creation

xxx

Examples

xxx