[PATCH net-next v12 3/5] net: ti: prueth: Adds PRUETH HW and SW configuration
ALOK TIWARI
alok.a.tiwari at oracle.com
Fri Jul 25 10:43:47 PDT 2025
> +/* NRT Buffer descriptor definition
> + * Each buffer descriptor points to a max 32 byte block and has 32 bit in size
> + * to have atomic operation.
> + * PRU can address bytewise into memory.
> + * Definition of 32 bit descriptor is as follows
> + *
> + * Bits Name Meaning
> + * =============================================================================
> + * 0..7 Index points to index in buffer queue, max 256 x 32
> + * byte blocks can be addressed
> + * 6 LookupSuccess For switch, FDB lookup was successful (source
> + * MAC address found in FDB).
> + * For RED, NodeTable lookup was successful.
> + * 7 Flood Packet should be flooded (destination MAC
> + * address found in FDB). For switch only.
> + * 8..12 Block_length number of valid bytes in this specific block.
> + * Will be <=32 bytes on last block of packet
> + * 13 More "More" bit indicating that there are more blocks
> + * 14 Shadow indicates that "index" is pointing into shadow
> + * buffer
> + * 15 TimeStamp indicates that this packet has time stamp in
> + * separate buffer - only needed of PTCP runs on
only needed if PTCP runs on host
> + * host
> + * 16..17 Port different meaning for ingress and egress,
> + * Ingress: Port = 0 indicates phy port 1 and
> + * Port = 1 indicates phy port 2.
> + * Egress: 0 sends on phy port 1 and 1 sends on
> + * phy port 2. Port = 2 goes over MAC table
> + * look-up
> + * 18..28 Length 11 bit of total packet length which is put into
> + * first BD only so that host access only one BD
> + * 29 VlanTag indicates that packet has Length/Type field of
> + * 0x08100 with VLAN tag in following byte
> + * 30 Broadcast indicates that packet goes out on both physical
> + * ports, there will be two bd but only one buffer
> + * 31 Error indicates there was an error in the packet
> + */
> +#define PRUETH_BD_START_FLAG_MASK BIT(0)
> +#define PRUETH_BD_START_FLAG_SHIFT 0
> +
> +#define PRUETH_BD_HSR_FRAME_MASK BIT(4)
> +#define PRUETH_BD_HSR_FRAME_SHIFT 4
> +
> +#define PRUETH_BD_SUP_HSR_FRAME_MASK BIT(5)
> +#define PRUETH_BD_SUP_HSR_FRAME_SHIFT 5
> +
> +#define PRUETH_BD_LOOKUP_SUCCESS_MASK BIT(6)
> +#define PRUETH_BD_LOOKUP_SUCCESS_SHIFT 6
> +
> +#define PRUETH_BD_SW_FLOOD_MASK BIT(7)
> +#define PRUETH_BD_SW_FLOOD_SHIFT 7
> +
> +#define PRUETH_BD_SHADOW_MASK BIT(14)
> +#define PRUETH_BD_SHADOW_SHIFT 14
> +
> +#define PRUETH_BD_TIMESTAMP_MASK BIT(15)
> +#define PRUETH_BD_TIMESTAMP_SHIT 15
typo PRUETH_BD_TIMESTAMP_SHIT -> PRUETH_BD_TIMESTAMP_SHIFT
> +
> +#define PRUETH_BD_PORT_MASK GENMASK(17, 16)
> +#define PRUETH_BD_PORT_SHIFT 16
> +
> +#define PRUETH_BD_LENGTH_MASK GENMASK(28, 18)
> +#define PRUETH_BD_LENGTH_SHIFT 18
> +
> +#define PRUETH_BD_BROADCAST_MASK BIT(30)
> +#define PRUETH_BD_BROADCAST_SHIFT 30
> +
> +#define PRUETH_BD_ERROR_MASK BIT(31)
> +#define PRUETH_BD_ERROR_SHIFT 31
> +
Thanks,
Alok
More information about the linux-arm-kernel
mailing list