Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 - Charlie Wiseman, Shakir James - 05/11/07 Design Review: Plugin Framework Charlie Wiseman and Shakir James ONL.

Similar presentations


Presentation on theme: "1 - Charlie Wiseman, Shakir James - 05/11/07 Design Review: Plugin Framework Charlie Wiseman and Shakir James ONL."— Presentation transcript:

1 1 - Charlie Wiseman, Shakir James - 05/11/07 Design Review: Plugin Framework Charlie Wiseman and Shakir James cgw1@arl.wustl.edu, scj1@arl.wustl.edu ONL NP Router

2 2 - Charlie Wiseman, Shakir James - 05/11/07 ONL NP Router SRAM Rx (2 ME) HdrFmt (1 ME) Parse, Lookup, Copy (3 MEs) TCAM SRAM Mux (1 ME) Tx (1 ME) QM (1 ME) xScale Assoc. Data ZBT-SRAM Plugin0Plugin1 Plugin2 Plugin3Plugin4 NN FreeList Mgr (1 ME) Tx, QM Parse Plugin XScale Stats (1 ME) Rx Mux HF Copy Plugins Tx SRAM NN Large SRAM Ring Scratch Ring NN Ring NN SRAM 64KW New Needs A Lot Of Mod. Needs Some Mod. 64KW 512W Small SRAM Ring xScale 512W Per-Plugin Ctrl Msgs LD Except Errors Mostly Unchanged 64KW

3 3 - Charlie Wiseman, Shakir James - 05/11/07 Plugins (control path) XScale SRAM Ring Plugin 0 Plugin 1 Plugin 2 Plugin 3 Plugin 4 Control Messages from RLI Control Responses to RLI and Configuration Updates to XScale

4 4 - Charlie Wiseman, Shakir James - 05/11/07 Plugins (data path) SRAM Ring Scratch Ring PLC Mux Plugin 0 Plugin 1 Plugin 2 Plugin 3 Plugin 4 QM

5 5 - Charlie Wiseman, Shakir James - 05/11/07 XScale -> Plugins XScale Plugin 0 Plugin 1 Plugin 2 Plugin 3 Plugin 4 Current Types: From RLI Control Msg (0) #words (8b)MsgID (16b) Value 2 (32b)... Control Messages from RLI Type (8b) Value 1 (32b)

6 6 - Charlie Wiseman, Shakir James - 05/11/07 Plugins -> XScale Plugin 0 Plugin 1 Plugin 2 Plugin 3 Plugin 4 XScale Control Responses to RLI and Configuration Updates to XScale Current Types: To RLI Control Message Resp (0) Debug Message* (1) To XScale Add Route ( 2) Remove Route ( 3) Add Primary Filter ( 4) Remove Primary Filter ( 5) Add Aux Filter ( 6) Remove Aux Filter ( 7) Update Queue Quantum ( 8) Update Queue Threshold ( 9) Update Port Rate (10) Update Mux Quanta (11) Update Aux Sampling Rates (12) Update Exception Destinations (13) #words (8b)MsgID (16b) Value 2 (32b)... Type (8b) Value 1 (32b)

7 7 - Charlie Wiseman, Shakir James - 05/11/07 PLC -> Plugins PLC Flags(8b): Why pkt is being sent to Plugin TTL(1b): TTL expired Options(1b): IP Options present NoRoute(1b): No matching route or filter NonIP(1b): Non IP Packet received ARP_Needed(1b): NH_IP valid, but no MAC NH_Invalid(1b): NH_IP AND NH_MAC both invalid Reserved(2b): currently unused xScale SRAM L3 (IP, ARP, …) Pkt Length (16b) Buffer Handle(24b) Stats Index (16b) QID(16b) In Port (3b) Flags (8b) Plugin Tag (5b) NH MAC DA[47:16] (32b) NH MAC DA[15:0] (16b) Unicast/MCast bits (16b) Rsv (8b) Reserved (16b) EtherType (16b) 0 1 2 37 Reserved (2b) NR (1b) TTL (1b) Opt (1b) NI (1b) ARP (1b) NH INV (1b) 45 6 Plugin 0 Plugin 1 Plugin 2 Plugin 3 Plugin 4

8 8 - Charlie Wiseman, Shakir James - 05/11/07 Plugins -> Mux Mux Flags: PT(1b): PassThrough(1)/Classify(0) Reserved (7b) L3 (IP, ARP, …) Pkt Length (16b) Buffer Handle(24b) Stats Index (16b) QID(16b) In Port (3b) Plugin Tag (5b) Flags (8b) Rsv (4b) Out Port (4b) Reserved (7b) PT (1b) 0 1 2 37 Plugin 0 Plugin 1 Plugin 2 Plugin 3 Plugin 4

9 9 - Charlie Wiseman, Shakir James - 05/11/07 Plugins -> QM QM Plugin 0 Plugin 1 Plugin 2 Plugin 3 Plugin 4 Buffer Handle(24b) QID(16b) Rsv (4b) Out Port (4b) L3 (IP, ARP, …) Pkt Length (16b) Reserved(16b) Rsv (8b) Rsv (8b)

10 10 - Charlie Wiseman, Shakir James - 05/11/07 Framework Components ▪ Basic plugin structures »1 thread: only handling data »8 threads: all handling data »8 threads: 7 handling data, 1 handling control »8 threads: 6 handling data, 1 handling control, 1 handling time-outs ▪ Macros for common processing

11 11 - Charlie Wiseman, Shakir James - 05/11/07 Plugin Structure main() { plugin_init() switch(ctx()) { case 0: callback_loop() case 1: handle_msg_loop() case 2,3,4,5,6,7: handle_packet_loop() }

12 12 - Charlie Wiseman, Shakir James - 05/11/07 handle_packet_loop() { while(1) { dl_source() handle_packet() // change required for ordered threads // also need to add BID_NULL to not sink anywhere dl_sink() }

13 13 - Charlie Wiseman, Shakir James - 05/11/07 handle_msg_loop() { while(1) { // special control dl_source call dl_source_control() handle_msg() // only one thread handles control messages at a time // also need to add BID_NULL to not sink anywhere dl_sink() }

14 14 - Charlie Wiseman, Shakir James - 05/11/07 callback_loop() { while(1) { // timeout initialized in plugin_init() sleep(timeout) callback() }

15 15 - Charlie Wiseman, Shakir James - 05/11/07 Macros ▪ Packet Allocation »SRAM dequeue from free list ▪ Packet forwarding or dropping »Set dlNextBlock ▪ Packet access/modification »Read/write buffer descriptor and packet buffer ▪ Packet copying »Allocation, buffer descriptor updates, data copying ▪ Queues of packets with-in the plugin »Use packet_next field in (header) buffer descriptor »Keep head buf handle in local memory

16 16 - Charlie Wiseman, Shakir James - 05/11/07 Macros, continued ▪ Read configuration »SRAM, scratch reads ▪ Configuration updates »write data to local mem and have control thread send? ▪ Read stats »SRAM reads ▪ Write stats »Write to stats ring ▪ Clock, CRC, local CAM access »Wrap intrinsic functions


Download ppt "1 - Charlie Wiseman, Shakir James - 05/11/07 Design Review: Plugin Framework Charlie Wiseman and Shakir James ONL."

Similar presentations


Ads by Google