/**************************************************************************************** * * * Copyright (C) 2007 Ikanos Communications Inc. All rights reserved * * * * The information and source code contained herein is the exclusive property * * of Ikanos Communications and may not be disclosed, examined or reproduced in whole * * or in part without the explicit written authorization from Ikanos Communications. * * * ****************************************************************************************/ /**************************************************************************************** * * * File name : packetconfig.h * * Author : Ikanos Communications [ jpattar@ikanos.com ] * * Version : * * Date : 25th Jag 2010 * * Description : This file contains common packet configuration. * * * ****************************************************************************************/ /*_____________________________________Header Gaurd_____________________________________*/ #ifndef _PACKETCONFIG_H_ #define _PACKETCONFIG_H_ /*_____________________________________INCLUDES_________________________________________*/ //#include "parserhw.h" //#include "classifierhw.h" /*________________________________________MACROS________________________________________*/ /* common parser configuration, used by classifer APs also. */ #define PARSER_HOLE1 56 #define PARSER_HOLE2 8 //(sizeof typedef classBufInfo_t) #define PACKET_HEADER_SIZE 128 #define PARSER_TAG_SIZE 24 #define PARSER_HEADER_SIZE (PACKET_HEADER_SIZE + PARSER_HOLE1 + PARSER_HOLE2 + PARSER_TAG_SIZE) //Macros for CB #define CB_PORT0_START 0x0000 #define CB_PORT0_END 0x797 //9 packets * 216 ( h1(56) + h2(8) + hdr(128) + ptag(24) header size #define CB_PORT1_START 0x800 #define CB_PORT1_END 0xF97 #define CB_PORT2_START 0x1000 #define CB_PORT2_END 0x1797 #define CB_PORT3_START 0x1800 #define CB_PORT3_END 0x1F97 #define CB_PORT4_START 0x2000 #define CB_PORT4_END 0x2797 #define CB_PORT5_START 0x2800 #define CB_PORT5_END 0x2F97 #define MAX_JUMBO_PACKET_LENGTH (2 * 1024) //BM cluster size #define MAX_BUFFER_LIMIT (2 * 1024) //Todo: Should be BM cluster size. #define APPREHEADER_SIZE 68 #define CLUSTER_DATA_DEST_OFFSET (APPREHEADER_SIZE + PARSER_HOLE1 + PACKET_HEADER_SIZE) #define GEMAC1_INPUT_Q_MSB 0x1920 #define GEMAC2_INPUT_Q_MSB 0x1921 #define GEMAC3_INPUT_Q_MSB 0x1922 #define HAP_INPUT_Q_MSB 0x1925 #define COMMON_INPUT_Q_LSB 0x0510 /* Circular buffer addresses */ #define CIR_BUF_BASEADDR_MSB 0x1928 #define CIR_BUF_BASEADDR_LSB 0x0000 #define CIR_BUF_NO_PORTS 6 #define CIR_BUF_SIZE (12 * 1024) #define FT_BUF_SIZE (32 * 1024) #define CIR_BUF_ALLOCATED_MEM (CIR_BUF_SIZE / CIR_BUF_NO_PORTS ) /* Define followings only if those ports are available */ #define CL_CB_PORT0 0 #define CL_CB_PORT1 1 #define CL_CB_PORT2 2 #define CL_CB_PORT3 3 #define CL_CB_PORT4 4 #define CL_CB_PORT5 5 /* Start address of each port * NOTE: Make sure that you use only the ports which are below CIR_BUF_NO_PORTS */ #define CIR_BUF_PORT0_ADDR_LSB (CIR_BUF_BASEADDR_LSB + (CL_CB_PORT0 * CIR_BUF_ALLOCATED_MEM )) #define CIR_BUF_PORT1_ADDR_LSB (CIR_BUF_BASEADDR_LSB + (CL_CB_PORT1 * CIR_BUF_ALLOCATED_MEM )) #define CIR_BUF_PORT2_ADDR_LSB (CIR_BUF_BASEADDR_LSB + (CL_CB_PORT2 * CIR_BUF_ALLOCATED_MEM )) #define CIR_BUF_PORT3_ADDR_LSB (CIR_BUF_BASEADDR_LSB + (CL_CB_PORT3 * CIR_BUF_ALLOCATED_MEM )) #define CIR_BUF_PORT4_ADDR_LSB (CIR_BUF_BASEADDR_LSB + (CL_CB_PORT4 * CIR_BUF_ALLOCATED_MEM )) #define CIR_BUF_PORT5_ADDR_LSB (CIR_BUF_BASEADDR_LSB + (CL_CB_PORT5 * CIR_BUF_ALLOCATED_MEM )) #define CIR_BUF_EACH_PORT_NO_HDRS ( CIR_BUF_ALLOCATED_MEM / PARSER_HEADER_SIZE ) /*_____________________________________Header Gaurd_____________________________________*/ #endif //_PACKETCONFIG_H_