Slice Interface to SPP - PowerPoint PPT Presentation

About This Presentation
Title:

Slice Interface to SPP

Description:

Allocate external address on line card ... LD Socket: sd 4, socket type 2, flags 0. EX Socket: sd 5, socket type 2, flags 0 ... – PowerPoint PPT presentation

Number of Views:15
Avg rating:3.0/5.0
Slides: 12
Provided by: fredk5
Category:
Tags: spp | card | interface | sd | slice

less

Transcript and Presenter's Notes

Title: Slice Interface to SPP


1
Slice Interface to SPP
  • Fred Kuhns
  • fredk_at_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 Internet0, SPP p2p1.
    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 interfaces 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 peers IP address, otherwise
    0.
  • Examples using supplied commands
  • Get list of available interfacespl_techx01_at_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 2pl_techx01_at_drn02 client
    --cmd get_ifpeer --ifn 2SPP Peer IP address
    10.1.3.2
  • Get interface attributes for interface number
    1pl_techx01_at_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.1pl_techx01_at_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 slices 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 endpoints filter and
    bandwidth reservation.retCode_t
    free_endpoint(epoint_t)
  • Examples using command line
  • Reserve 4000Kbps on interface 0pl_techx01_at_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
    cardpl_techx01_at_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 endpointpl_techx01_at_drn0
    2 client --cmd free_endpoint
    --ipaddr 10.1.1.1 --port 50000 --proto
    17
  • Now let the system assign an available UDP
    portpl_techx01_at_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 fastpathfpInfo_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 fastpathvoid 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
    fpidretCode_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
    idmiID_t, epInfo_t alloc_udp_tunnel(fpID_t,
    bw_t, ipAddr_t, ipPort_t)
  • Release (i.e. free) meta-interface and its
    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 0client
    --cmd alloc_udp_tunnel --fpid 0 --bw 5000
    --ipaddr 10.1.1.1 --port 40000Allocate
    meta-interfacemiid 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-interfaceretcode bind_queue(fpid, miid,
    list_type, qid_t)
  • Set queue drop threshold and bandwidthbw_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
    queuecnt_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 1client --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 packetsclient --cmd set_queue_params
    --fpid 0 --qid 0 --threshold 1000 --bw
    2000
  • Get qid 0s parameters settingsclient --cmd
    get_queue_params --fpid 0 --qid 0 qid 0 params
    threshold 1000, bw 2000
  • Get the number of packets/bytes in a queue
    1client --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,
    maskN, fltrResult)
  • Modify result vecctor for filter with ID
    fidretCode_t update_result(fpid, fid,
    fltrResult)
  • Find filter by IDfltr_t, get_fltr_byfid(fpid,
    fid)
  • Find filter by keyfltr_t, get_fltr_bykey(fpid,
    keyWrap)
  • Get result vector for filter matching key
    valuefpFltrResult_t lookup_fltr(fpid, keyWrap)
  • Remove (invalidate) filter with ID fidretcode_t
    rem_fltr_byfid(fpid, fid)
  • Remove (invalidate) highest priority filter
    matching keyretcode_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 6fltr --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 idfltr --cmd rem_fltr_byfid
    --fpid 0 --fid 0 Success

9
Example Filter Commands Continued
  • Examples using command line
  • Update result to use qid 4fltr --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 keyfltr --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 doesnt
    match the rxmiid).

10
Stats (accessing FP instance specific counters)
  • C Interface Library (see Types.ppt for
    completedescription of types)
  • Read stats counterstats_t read_stats(fpid,
    sindx, flags)
  • Reset stats value ... not implemented on
    SCDresult clear_stats(fpid, sindx)
  • Not implemented at scdhandle create_periodic(fpi
    d, 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
    sindxstats --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
Write a Comment
User Comments (0)
About PowerShow.com