1 / 11

Slice Interface to SPP

Slice Interface to SPP. Fred Kuhns fredk@arl.wustl.edu Applied Research Laboratory Washington University in St. Louis. System Interfaces, Address and Ports. C++ Interface Library:

truda
Download Presentation

Slice Interface to SPP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Slice Interface to SPP Fred Kuhns fredk@arl.wustl.edu Applied Research Laboratory Washington University in St. Louis

  2. System Interfaces, Address and Ports C++ Interface Library: • Get list of available interfacesif_list get_interfaces(); if_list = {if_entry, ...}if_entry : (See Types.ppt for a complete description) • ifn: interface number. There is a 1-to-1 relationship between an interface number (logical interface) and externally visible IP addresses (ipaddr) • ifType : one of {Public Internet=0, SPP p2p=1}. If p2p then may call get_ifpeer() • ipaddr: externally visible IP Address for this interface. • bw_t linkBW : Total bandwidth of interface. Includes reserved, allocated and available BW. • bw_t availBW : bandwidth currently available for allocation to slices. • ifn_t get_ifn(ipAddr_t): Maps interface address to the interface’s number • if_entry get_ifattrs(ifn_t): Returns an if_entry struct for interface ifn • ipAddr_t get_ifpeer(ifn_t): If interface type SPP_p2p then returns peer’s IP address, otherwise 0. Examples using supplied commands • Get list of available interfaces[pl_techx01@drn02 ]$ client --cmd get_ifacesInterface list: [ifn 0, type "inet", linkBW 1000000Kbps, availBW 900000Kbps, ip 10.1.1.1] [ifn 1, type "p2p", linkBW 1000000Kbps, availBW 900000Kbps, ip 10.1.2.1] [ifn 2, type "p2p", linkBW 1000000Kbps, availBW 900000Kbps, ip 10.1.3.1] • Get IP address of the peering SPP node in interface number 2[pl_techx01@drn02 ]$ client --cmd get_ifpeer --ifn 2SPP Peer IP address: 10.1.3.2 • Get interface attributes for interface number 1[pl_techx01@drn02 ]$ client --cmd get_ifattrs --ifn 1Interface attributes: [ifn 1, type "p2p", linkBW 1000000Kbps, availBW 900000Kbps, ip 10.1.2.1] • Get the interface number for interface with IP address 10.1.1.1[pl_techx01@drn02 ]$ client --cmd get_ifn --ipaddr 10.1.1.1; Interface number: 0

  3. Allocating EndPoints on the GPE C++ Interface Library (see Types.ppt and rmp.ppt): • Reserve/Release BW on interface number ifn for Slice (bw in Kbps)retCode_t resrv_pl_ifbw(ifn_t, bw_t)retCode_t reles_pl_ifbw(ifn_t, bw_t) • Allocate local Address for Slice and forward to GPEepInfo_t alloc_endpoint(epInfo_t); epInfo_t {bw_t bw, epoint_t ep} • Allocate new endpoint, installs filter in line card to direct matching traffic to the GPE • if proto is TCP or UDP and port == 0 then the substrate will allocate a port number. • If port and its not available then an error is returned. • If a slice has not reserved sufficient BW on an interface then the slice’s reservation will be increased. If the BW can not be reserved then an error is returned and no endpoint is allocated. • Free endpoint, removes the endpoint’s filter and bandwidth reservation.retCode_t free_endpoint(epoint_t) Examples using command line: • Reserve 4000Kbps on interface 0[pl_techx01@drn02 ]$ client --cmd resrv_pl_ifbw --ifn 0 --bw 4000Reserved 4000Kbps on interface 0 for Slice • Release 2000Kbps on interface 0client --cmd reles_pl_ifbw _pl_ifbw --ifn 0 --bw 2000 • Allocate external address on line card[pl_techx01@drn02 ]$ client --cmd alloc_endpoint --bw 500 --ipaddr 10.1.1.1 --port 50000 --proto 17Allocated endpoint: epInfo [ bw 500 epoint { 10.1.1.1, 50000, 17 } ] • Free the just allocated endpoint:[pl_techx01@drn02 ]$ client --cmd free_endpoint --ipaddr 10.1.1.1 --port 50000 --proto 17 • Now let the system assign an available UDP port:[pl_techx01@drn02 ]$ client --cmd alloc_endpoint --bw 500 --ipaddr 10.1.1.1 --port 0 --proto 17Allocated endpoint: epInfo [ bw 500 epoint { 10.1.1.1, 1024, 17 } ]

  4. Allocating a fastpath (aka meta-router) C++ Interface Library: • Creating a fastpath:fpInfo_t alloc_fastpath(copt_t, bwspec_t, rcnts_t, mem_t) bwspec_t: Aggregate BW requirements for fastpath across all interfaces rcnts_t: Max resource counts mem_t: Requested size of SRAM and DRAM in Bytes (currently fixed) fpInfo_t: fpid_t fpid: fast-path id, relative to slice. Starts at 0. ipAddr_t npeIP: FP addr on the NPE epoint_t ldAddr: Local Delivery IP and UDP port epoint_t exAddr: Exception traffic IP and UDP port • see Types.ppt and rmp.ppt for a more complete description of the types. • Deleting the fastpath:void free_fastpath(fpID_t fpid) : Examples using command line: • Allocating a fastpath (copt == IPv4, SRAM must be 4096):client --cmd alloc_fastpath --copt 1 --firm 1000 --soft 0 --fltrs 12 --qs 10 --buffs 14 --stats 8 --sram 4096 --dram 0alloc_fastpath completed successfully Fastpath ID: 0, NPE IP address: 172.16.10.2 Local Delivery (LD) end point { 172.16.10.1, 33402, 17 }, Exception traffic (EX) end point { 172.16.10.1, 33404, 17 }, LD Socket: sd 4, socket type 2, flags 0 EX Socket: sd 5, socket type 2, flags 0 • Deleting fastpathclient --cmd free_fastpath --fpid 0

  5. Reserving BW and Adding Meta-Interfaces C++ Interface Library: • Reserving bw Kbps on interface ifn for a fastpath fpid:retCode_t resrv_fpath_ifbw(fpID_t, ifn_t, bw_t) • Release bandwidthretCode_t reles_fpath_ifbw(fpID_t, ifn_t, bw_t) • Allocate a new meta-interface with local address tuple {ipaddr, port, UDP} for fastpath fpid with bandwidth bw Kbps, returning the meta-interface id:[miID_t, epInfo_t] alloc_udp_tunnel(fpID_t, bw_t, ipAddr_t, ipPort_t) • Release (i.e. free) meta-interface and it’s associated local address tuple.retCode_t free_udp_tunnel(fpID_t, miID_t) • Translate the fastpath specific meta-interface id to he corresponding local address tuple (aka end point)epoint_t get_endpoint(fpID_t, miID_t) Examples using command line: • Reserve 5Mbps on interface 0 for fastpath 0client --cmd resrv_fpath_ifbw --fpid 0 --ifn 0 --bw 5000 Reserved 5000Kbps on interface 0 for fastpath 0 • Allocate meta-interface for fastpath 0:client --cmd alloc_udp_tunnel --fpid 0 --bw 5000 --ipaddr 10.1.1.1 --port 40000Allocate meta-interface:miid = 1, epInfo [ bw 5000 epoint { 10.1.1.1, 40000, 17 } ] • Remove meta-interface 0client --cmd free_udp_tunnel --fpid 0 --miid 1 • Free interface bandwidth

  6. Manipulating Queues and Attributes C++ Interface Library: • Associate one or more queues with a meta-interface:retcode bind_queue(fpid, miid, list_type, qid_t[]) • Set queue drop threshold and bandwidth:bw_t set_queue_params(fpID_t, qid_t, threshold, bw) • Get the current queue parameters (BW and Threshold):[threshold, bw] get_queue_params(fpID_t, qid_t) • Get the number of packets/bytes in a queue:{cnt_t pktCnt, cnt_t byteCnt} get_queue_len(fpID_t, qid_t) Examples using command line: • Associate queues 0-2 with fastpath 0, meta-interface 1:client --cmd bind_queue --fpid 0 --miid 1 --qid_list_type 0 --qid_list 0 --qid_list 1 --qid_list 2 • Set qid 0 to a bandwidth of 1Mbps and threshold of 1000 packets:client --cmd set_queue_params --fpid 0 --qid 0 --threshold 1000 --bw 2000 • Get qid 0’s parameters settings:client --cmd get_queue_params --fpid 0 --qid 0 qid 0 params: [threshold 1000, bw 2000] • Get the number of packets/bytes in a queue 1:client --cmd get_queue_len --fpid 0 --qid 1 qid 1 length: [pktCnt 0, byteCnt 0]

  7. Managing the Lookup table C++ Interface Library (see Types.ppt for complete description of types): • Write code option specific filter to TCAMretCode_t write_fltr(fpID_t, fid_t, keyWrap, mask[N], fltrResult) • Modify result vecctor for filter with ID fid:retCode_t update_result(fpid, fid, fltrResult) • Find filter by ID:fltr_t, get_fltr_byfid(fpid, fid) • Find filter by key:fltr_t, get_fltr_bykey(fpid, keyWrap) • Get result vector for filter matching key value:fpFltrResult_t lookup_fltr(fpid, keyWrap) • Remove (invalidate) filter with ID fid:retcode_t rem_fltr_byfid(fpid, fid) • Remove (invalidate) highest priority filter matching key:retcode_t rem_fltr_bykey(fpid, keyWrap) Examples using command line: • Continued on next two slides ...

  8. Example Filter Commands Examples using command line: • Install a fastpath filter to forward packets from meta-interface 1 to meta-interface 2 when the destination address matches the prefix 10.1.2.0/24fltr --cmd write_fltr \ --fpid 0 --fid 0 \# Lookup Key --key_type 0 --key_rxmi 1 \ --key_daddr 10.1.2.0 --key_saddr 0 \ --key_sport 0 --key_dport 0 --key_proto 0 \# Lookup (Key) Mask --mask_daddr 0xFFFFFF00 --mask_saddr 0 \ --mask_sport 0 --mask_dport 0 --mask_flags 0 \# Result: Next Hop --txdaddr 10.1.2.2 --txdport 50001 \# Output queue and stats index --qid 3 --sindx 0 Success • Read back filter with fid 6:fltr --cmd get_fltr_byfid --fpid 0 --fid 0 Found Fltr: [ key [sub_Key: T 0, rxmi 1, copt_Key: 0a 01 02 00 00 00 00 00 00 00 00 00 00 00], mask [ sub_Mask: ff ff ff ff, copt_Mask: ff ff ff 00 00 00 00 00 00 00 00 00 00 00], result [ actions 0, daddr 10.1.2.2, dport 50001, qid 3, sindx 0] • Remove filter by id:fltr --cmd rem_fltr_byfid --fpid 0 --fid 0 Success

  9. Example Filter Commands: Continued Examples using command line: • Update result to use qid 4:fltr --cmd update_result --fpid 0 --fid 3 --txdaddr 10.1.2.2 --txdport 50001 --qid 4 --sindx 0FIXME -- always writes 0 for txdport, qid and sindx • Lookup filter with key matching fid 6fltr --cmd get_fltr_bykey --fpid 0 --key_type 0 --key_rxmi 1 --key_daddr 10.1.2.0 --key_saddr 0 --key_sport 0 --key_dport 0 --key_proto 0FIXME -- scd hangs and board must be reset manually • Remove filter by key:fltr --cmd rem_fltr_bykey --fpid 0 --key_type 0 --key_rxmi 1 --key_daddr 10.1.2.2 --key_saddr 0 --key_sport 0 --key_dport 0 --key_proto 0FIXME -- does not find filter • Lookup filter by key returning result vector onlyfltr --cmd lookup_fltr --fpid 0 --key_type 0 --key_rxmi 1 --key_daddr 10.1.2.0 --key_saddr 0 --key_sport 0 --key_dport 0 --key_proto 0FIXME: Finds filter but fields are incorrect, sindx is completely wrong and qid is for wrong filter (and doesn’t match the rxmiid).

  10. X X X X X T L W Flags: W : {0 - Bytes, 1 - Packts} L : {0 - PreQ, 1 - PostQ} T : {0 - Push, 1 - Pull} X : Don’t Care 7 6 5 4 3 2 1 0 Stats (accessing FP instance specific counters) C++ Interface Library (see Types.ppt for completedescription of types): • Read stats counter:stats_t read_stats(fpid, sindx, flags) • Reset stats value ... not implemented on SCD:result = clear_stats(fpid, sindx) • Not implemented at scd:handle create_periodic(fpid, index, P, cnt, flags)retcode delete_periodic(fpid, handle)retcode set_callback(fpid, handle, xport)stats_t get_periodic(fpid, handle) Examples using command line: • Get byte pre-Q byte counter for stats index sindx:stats --cmd read_stats --fpid 0 --sindx 1 --bytes --preq sindx 1: [value 0, tstamp 2459552ms] • Remaining operations not yet supported.

  11. Accessing Code Option Data C++ Interface Library (see Types.ppt for complete description of types): Not supported: • Write a byte vector to sram allocated to code option instance (aka fast path):retcode mem_write(fpid, offset[, len], data) • Read a byte vector from sram allocated to code option instance (aka fast path):data mem_read(fpid, offset, len) Examples using command line: Not Supported

More Related