Download presentation
Presentation is loading. Please wait.
Published byWilfrid Dorsey Modified over 9 years ago
1
ARP ARP 8/10 - 2004 INF5060: Multimedia data communication using network processors
2
2004 Carsten Griwodz & Pål HalvorsenINF5060 – multimedia communication using network processors Assignment 5 Extend the simple packet bridge from assignment 4 with ARP support build an ARP table to dynamically bind/map an IP address to a mac address and an interface on the card check IP address and forward packet to correct interface be aware of broadcast loops
3
2004 Carsten Griwodz & Pål HalvorsenINF5060 – multimedia communication using network processors ARP Packet MAC src MAC dest MAS src type Hardware type = 1Protocol type = 0x800 MACaddr len=6Netaddr len=4Opcode Sender MAC address Sender IP address Receiver MAC address Receiver IP address … only for readability … Opcode: Request:1 Reply:2 Sender MAC address: mandatory Sender IP address: mandatory Receiver MAC address Request: 0 Reply: requester’s MAC address Receiver IP address: mandatory
4
2004 Carsten Griwodz & Pål HalvorsenINF5060 – multimedia communication using network processors Broadcast problem IXP1200
5
2004 Carsten Griwodz & Pål HalvorsenINF5060 – multimedia communication using network processors ARP caching Most OSes do ARP caching Our bridge does it for building and maintained a spanning tree Two proposed caches Address-to-interface mapping Broadcast suppression Last refresh cycle count (64 bit)IP address (32 bit)IF (32 bit)Last seen cycle count (64 bit)IP source (32 bit) MAC dest (48 bit) MAC source (48 bit) xbuf_alloc [$cyclect,2] csr[read, $cyclect[0], CYCLE_CNT] xbuf_free[$cyclect] Microengine clock speed: 232 Mhz
6
2004 Carsten Griwodz & Pål HalvorsenINF5060 – multimedia communication using network processors Allocating cache memory Memory must be allocated by StrongARM Memory offset must be passed to microengines in shared memory E.g. e = RmMalloc(RM_SRAM, &ptr, n*4); space for n address-to-IF mapping entries e = RmGetPhysOffset(RM_SRAM, ptr, &sram_offset); e = RmMalloc(RM_SCRATCH, &ptrptr, 1); space for pointer to cache e = RmGetPhysOffset(RM_SCRATCH, ptrptr, &sramptr_offset); e = RmWrite(RM_SCRATCH, sramptr_offset, sram_offset, 0); for( i=0; i<6; i++ ) { sym.meNumber = i; bzero(sym.name, MAX_SIZE_OF_IMPORTED_SYMBOL); strncpy(sym.name, CACHE_PTR_STR, MAX_SIZE_OF_IMPORTED_SYMBOL); sym.value = sramptr_offset; e = RmUencPatchSymbol(i,&sym,1); }
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.