tx.h (2550B)
1 /* 2 * 3 * 4 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 5 * 6 * Copyright 2007-2020 Broadcom Inc. All rights reserved. 7 * 8 * DO NOT EDIT THIS FILE! 9 * This file is auto-generated. 10 * Edits to this file will be lost when it is regenerated. 11 */ 12 13 #ifndef __BCMX_TX_H__ 14 #define __BCMX_TX_H__ 15 16 #include <bcm/pkt.h> 17 #include <bcmx/lplist.h> 18 19 /* 20 * BCMX TX Flags 21 * 22 * BCMX_TX_F_L2_LOOKUP Perform an L2 lookup on the pkt. 23 * BCMX_TX_F_DLF_DISCARD Discard pkt if the L2 lookup fails. 24 * This only applies if L2_LOOKUP is set. 25 * BCMX_TX_F_FLOOD_PKT Flood the packet to all ports on the packet's 26 * VLAN. This overrides L2 lookup. 27 * BCMX_TX_F_CRC_APPEND Only two CRC modes are supported: Append 28 * and regenerate. If set, this flag selects 29 * append. 30 * BCMX_TX_F_CPU_TUNNEL Force the packet to be tunneled to a remote 31 * CPU for direct transmit 32 */ 33 #define BCMX_TX_F_L2_LOOKUP 0x00000001 34 #define BCMX_TX_F_DLF_DISCARD 0x00000002 35 #define BCMX_TX_F_FLOOD_PKT 0x00000004 36 #define BCMX_TX_F_DISCARDED 0x00000008 /* Internal use. */ 37 #define BCMX_TX_F_CRC_APPEND 0x00000010 38 #define BCMX_TX_F_CPU_TUNNEL 0x00000020 39 40 /* Return values for bcmx_tx */ 41 #define BCMX_TX_OK 0 /* Sent normally. */ 42 #define BCMX_TX_DISCARDED 1 /* Discarded due to lookup failure. */ 43 #define BCMX_TX_FLOODED 2 /* Flooded due to lookup failure. */ 44 45 /* Transmit packet. */ 46 extern int bcmx_tx( 47 bcm_pkt_t *pkt, 48 uint32 flags); 49 50 /* Direct a packet to a logical port. */ 51 extern int bcmx_tx_uc( 52 bcm_pkt_t *pkt, 53 bcmx_lport_t d_port, 54 uint32 flags); 55 56 /* Flood a packet to all front panel ports on its VLAN. */ 57 extern int bcmx_tx_flood( 58 bcm_pkt_t *pkt, 59 uint32 flags); 60 61 /* Send a packet to all ports on a list. */ 62 extern int bcmx_tx_lplist( 63 bcm_pkt_t *pkt, 64 bcmx_lplist_t *tx_ports, 65 bcmx_lplist_t *untagged_ports, 66 uint32 flags); 67 68 /* Set L3 indication for a transmit packet. */ 69 extern int bcmx_tx_pkt_l3_set( 70 bcm_pkt_t *pkt, 71 int l3); 72 73 /* Set L3 indication for a transmit packet. */ 74 extern int bcmx_tx_pkt_untagged_set( 75 bcm_pkt_t *pkt, 76 int untagged); 77 78 /* bcmx_tx_port_list is DEPRECATED. Use bcmx_tx_lplist. */ 79 extern int bcmx_tx_port_list( 80 bcmx_lplist_t *lplist, 81 bcm_pkt_t *pkt); 82 83 #endif /* __BCMX_TX_H__ */