socend.h (1920B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: socend.h 8 * Purpose: Defines SOC private device control structure for 9 * VxWorks SENS driver. 10 */ 11 #ifndef __SOCEND_H 12 #define __SOCEND_H 13 14 #include <bcm/rx.h> 15 #include <bcm/tx.h> 16 #include <bcm/pkt.h> 17 18 #define SOC_END_STRING "Broadcom StrataSwitch (BCM56XX) SENS Driver" 19 20 /* 21 * Typedef: socend_t 22 * Purpose: Describes the control structure for 1 END device on the 23 * SOC. 24 */ 25 typedef struct socend_s { 26 struct end_object se_eo; /* SENS: END_OBJ */ 27 sal_mac_addr_t se_mac; /* SENS: Interface Mac address */ 28 bcm_vlan_t se_vlan; /* SENS: Interface VLAN ID */ 29 int se_unit; /* SOC Unit # */ 30 struct socend_s *se_next; /* Linked list of devices off Unit */ 31 } socend_t; 32 33 /* 34 * TX and RX packet snooping/filter typedefs; see socend.c. 35 */ 36 37 typedef void (*socend_snoop_ip_tx_t)(int unit, void *packet, int len); 38 typedef bcm_rx_t (*socend_snoop_ip_rx_t)(int unit, bcm_pkt_t *pkt, int *enqueue); 39 40 /* 41 * Defines: SOC_END_XXX 42 * Purpose: SOC End Driver memory buffer allocation parameters. 43 */ 44 #define SOC_END_PK_SZ 1600 /* Packet Size */ 45 #define SOC_END_CLBUFS (128) /* Cluster Buffers */ 46 #define SOC_END_CLBLKS 256 /* Total Cluster Headers */ 47 #define SOC_END_MBLKS 64 /* Total Packet Headers */ 48 #define SOC_END_SPEED 10000000 /* 10 Mb/s */ 49 50 #define SOCEND_COS_DEFAULT 3 51 #define SOCEND_COS_MAP_DEFAULT {0, 0, 0, 0, 0, 0, 3, 3} 52 53 /* 54 * Defines: SOC_END_FLG_XXX 55 * Purpose: Various driver mode and configuration flags. 56 */ 57 #define SOC_END_FLG_MGMT (1 << 1) 58 #define SOC_END_FLG_BCAST (1 << 2) 59 60 /* BSP support routine: return switch address */ 61 IMPORT STATUS sysSwitchAddrGet(char *mac); 62 63 /* StrataSwitch (TM) SOC Driver API Initialization */ 64 IMPORT int socdrv(void); 65 66 #endif /* __SOCEND_H */