openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

packet.h (1737B)


      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:        packet.h
      8  */
      9 
     10 #ifndef   _BCM_INT_PACKET_H_
     11 #define   _BCM_INT_PACKET_H_
     12 
     13 #include <sal/types.h>
     14 #include <sal/core/sync.h>
     15 
     16 #include <soc/dma.h>
     17 
     18 typedef struct _bcm_pkt_dv_s {
     19     uint32 flags;
     20 #define BCM_PKT_DV_ADD_STK_TAG    (1 << 0)
     21 #define BCM_PKT_DV_ADD_VLAN_TAG   (1 << 1)
     22 #define BCM_PKT_DV_DEL_VLAN_TAG   (1 << 2)
     23 #define BCM_PKT_DV_ADD_HG_HDR     (1 << 3)
     24 
     25     /* We may be in a stacked system, but not add a stack tag */
     26 #define BCM_PKT_DV_STACKED_SYSTEM (1 << 4)
     27 
     28     /* These are from the user */
     29     int      pkt_bytes;    /* Bytes in packet from user */
     30     int      payload_len;  /* Base payload length */
     31     int      payload_off;  /* Offset into packet where payload lies */
     32     int      l2_hdr_off;   /* Offset of L2 header in packet */
     33     int      pad_size;     /* Num bytes to pad if needed */
     34     uint16   vlan_tag;     /* VLAN tag_control (PRI + CFI + VLAN ID) */
     35 
     36     /* Bitmaps needed gotten from port encapsulation mode */
     37     pbmp_t   ether_pbm;    /* Port bitmap for nominal ports */
     38     pbmp_t   higig_pbm;    /* HiGig ports derived from pbmp */
     39     pbmp_t   allyr_pbm;    /* BCM 5632 ports */
     40 
     41     /* Current bit maps to be used for descriptor adds */
     42     pbmp_t   cur_pbm;
     43     pbmp_t   cur_upbm;
     44     pbmp_t   cur_l3pbm;
     45 
     46     /* Used to describe the packet and dv */
     47     int      ndv;          /* Number of DV pieces needed */
     48     dv_t     *dv;          /* Pointer to DV chain */
     49     uint32   dcb_flags;    /* DCB control word */
     50 } _bcm_pkt_dv_t;
     51 
     52 
     53 #endif	/* !_BCM_INT_PACKET_H_ */