1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264 |
- #ifndef _TCL_DATA_CMD_H_
- #define _TCL_DATA_CMD_H_
- #if !defined(__ASSEMBLER__)
- #endif
- #include "buffer_addr_info.h"
- #define NUM_OF_DWORDS_TCL_DATA_CMD 7
- struct tcl_data_cmd {
- struct buffer_addr_info buf_addr_info;
- uint32_t buf_or_ext_desc_type : 1,
- epd : 1,
- encap_type : 2,
- encrypt_type : 4,
- src_buffer_swap : 1,
- link_meta_swap : 1,
- tqm_no_drop : 1,
- reserved_2a : 1,
- search_type : 2,
- addrx_en : 1,
- addry_en : 1,
- tcl_cmd_number : 16;
- uint32_t data_length : 16,
- ipv4_checksum_en : 1,
- udp_over_ipv4_checksum_en : 1,
- udp_over_ipv6_checksum_en : 1,
- tcp_over_ipv4_checksum_en : 1,
- tcp_over_ipv6_checksum_en : 1,
- to_fw : 1,
- reserved_3a : 1,
- packet_offset : 9;
- uint32_t buffer_timestamp : 19,
- buffer_timestamp_valid : 1,
- reserved_4a : 1,
- hlos_tid_overwrite : 1,
- hlos_tid : 4,
- lmac_id : 2,
- udp_flow_override : 2,
- reserved_4b : 2;
- uint32_t dscp_tid_table_num : 6,
- search_index : 20,
- cache_set_num : 4,
- mesh_enable : 2;
- uint32_t reserved_6a : 20,
- ring_id : 8,
- looping_count : 4;
- };
-
- #define TCL_DATA_CMD_0_BUF_ADDR_INFO_BUFFER_ADDR_31_0_OFFSET 0x00000000
- #define TCL_DATA_CMD_0_BUF_ADDR_INFO_BUFFER_ADDR_31_0_LSB 0
- #define TCL_DATA_CMD_0_BUF_ADDR_INFO_BUFFER_ADDR_31_0_MASK 0xffffffff
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_BUFFER_ADDR_39_32_OFFSET 0x00000004
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_BUFFER_ADDR_39_32_LSB 0
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_BUFFER_ADDR_39_32_MASK 0x000000ff
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_RETURN_BUFFER_MANAGER_OFFSET 0x00000004
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_RETURN_BUFFER_MANAGER_LSB 8
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_RETURN_BUFFER_MANAGER_MASK 0x00000700
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_SW_BUFFER_COOKIE_OFFSET 0x00000004
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_SW_BUFFER_COOKIE_LSB 11
- #define TCL_DATA_CMD_1_BUF_ADDR_INFO_SW_BUFFER_COOKIE_MASK 0xfffff800
- #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_LSB 0
- #define TCL_DATA_CMD_2_BUF_OR_EXT_DESC_TYPE_MASK 0x00000001
- #define TCL_DATA_CMD_2_EPD_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_EPD_LSB 1
- #define TCL_DATA_CMD_2_EPD_MASK 0x00000002
- #define TCL_DATA_CMD_2_ENCAP_TYPE_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_ENCAP_TYPE_LSB 2
- #define TCL_DATA_CMD_2_ENCAP_TYPE_MASK 0x0000000c
- #define TCL_DATA_CMD_2_ENCRYPT_TYPE_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_ENCRYPT_TYPE_LSB 4
- #define TCL_DATA_CMD_2_ENCRYPT_TYPE_MASK 0x000000f0
- #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_LSB 8
- #define TCL_DATA_CMD_2_SRC_BUFFER_SWAP_MASK 0x00000100
- #define TCL_DATA_CMD_2_LINK_META_SWAP_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_LINK_META_SWAP_LSB 9
- #define TCL_DATA_CMD_2_LINK_META_SWAP_MASK 0x00000200
- #define TCL_DATA_CMD_2_TQM_NO_DROP_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_TQM_NO_DROP_LSB 10
- #define TCL_DATA_CMD_2_TQM_NO_DROP_MASK 0x00000400
- #define TCL_DATA_CMD_2_RESERVED_2A_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_RESERVED_2A_LSB 11
- #define TCL_DATA_CMD_2_RESERVED_2A_MASK 0x00000800
- #define TCL_DATA_CMD_2_SEARCH_TYPE_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_SEARCH_TYPE_LSB 12
- #define TCL_DATA_CMD_2_SEARCH_TYPE_MASK 0x00003000
- #define TCL_DATA_CMD_2_ADDRX_EN_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_ADDRX_EN_LSB 14
- #define TCL_DATA_CMD_2_ADDRX_EN_MASK 0x00004000
- #define TCL_DATA_CMD_2_ADDRY_EN_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_ADDRY_EN_LSB 15
- #define TCL_DATA_CMD_2_ADDRY_EN_MASK 0x00008000
- #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_OFFSET 0x00000008
- #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_LSB 16
- #define TCL_DATA_CMD_2_TCL_CMD_NUMBER_MASK 0xffff0000
- #define TCL_DATA_CMD_3_DATA_LENGTH_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_DATA_LENGTH_LSB 0
- #define TCL_DATA_CMD_3_DATA_LENGTH_MASK 0x0000ffff
- #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_LSB 16
- #define TCL_DATA_CMD_3_IPV4_CHECKSUM_EN_MASK 0x00010000
- #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_LSB 17
- #define TCL_DATA_CMD_3_UDP_OVER_IPV4_CHECKSUM_EN_MASK 0x00020000
- #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_LSB 18
- #define TCL_DATA_CMD_3_UDP_OVER_IPV6_CHECKSUM_EN_MASK 0x00040000
- #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_LSB 19
- #define TCL_DATA_CMD_3_TCP_OVER_IPV4_CHECKSUM_EN_MASK 0x00080000
- #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_LSB 20
- #define TCL_DATA_CMD_3_TCP_OVER_IPV6_CHECKSUM_EN_MASK 0x00100000
- #define TCL_DATA_CMD_3_TO_FW_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_TO_FW_LSB 21
- #define TCL_DATA_CMD_3_TO_FW_MASK 0x00200000
- #define TCL_DATA_CMD_3_RESERVED_3A_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_RESERVED_3A_LSB 22
- #define TCL_DATA_CMD_3_RESERVED_3A_MASK 0x00400000
- #define TCL_DATA_CMD_3_PACKET_OFFSET_OFFSET 0x0000000c
- #define TCL_DATA_CMD_3_PACKET_OFFSET_LSB 23
- #define TCL_DATA_CMD_3_PACKET_OFFSET_MASK 0xff800000
- #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_OFFSET 0x00000010
- #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_LSB 0
- #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_MASK 0x0007ffff
- #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_OFFSET 0x00000010
- #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_LSB 19
- #define TCL_DATA_CMD_4_BUFFER_TIMESTAMP_VALID_MASK 0x00080000
- #define TCL_DATA_CMD_4_RESERVED_4A_OFFSET 0x00000010
- #define TCL_DATA_CMD_4_RESERVED_4A_LSB 20
- #define TCL_DATA_CMD_4_RESERVED_4A_MASK 0x00100000
- #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_OFFSET 0x00000010
- #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_LSB 21
- #define TCL_DATA_CMD_4_HLOS_TID_OVERWRITE_MASK 0x00200000
- #define TCL_DATA_CMD_4_HLOS_TID_OFFSET 0x00000010
- #define TCL_DATA_CMD_4_HLOS_TID_LSB 22
- #define TCL_DATA_CMD_4_HLOS_TID_MASK 0x03c00000
- #define TCL_DATA_CMD_4_LMAC_ID_OFFSET 0x00000010
- #define TCL_DATA_CMD_4_LMAC_ID_LSB 26
- #define TCL_DATA_CMD_4_LMAC_ID_MASK 0x0c000000
- #define TCL_DATA_CMD_4_UDP_FLOW_OVERRIDE_OFFSET 0x00000010
- #define TCL_DATA_CMD_4_UDP_FLOW_OVERRIDE_LSB 28
- #define TCL_DATA_CMD_4_UDP_FLOW_OVERRIDE_MASK 0x30000000
- #define TCL_DATA_CMD_4_RESERVED_4B_OFFSET 0x00000010
- #define TCL_DATA_CMD_4_RESERVED_4B_LSB 30
- #define TCL_DATA_CMD_4_RESERVED_4B_MASK 0xc0000000
- #define TCL_DATA_CMD_5_DSCP_TID_TABLE_NUM_OFFSET 0x00000014
- #define TCL_DATA_CMD_5_DSCP_TID_TABLE_NUM_LSB 0
- #define TCL_DATA_CMD_5_DSCP_TID_TABLE_NUM_MASK 0x0000003f
- #define TCL_DATA_CMD_5_SEARCH_INDEX_OFFSET 0x00000014
- #define TCL_DATA_CMD_5_SEARCH_INDEX_LSB 6
- #define TCL_DATA_CMD_5_SEARCH_INDEX_MASK 0x03ffffc0
- #define TCL_DATA_CMD_5_CACHE_SET_NUM_OFFSET 0x00000014
- #define TCL_DATA_CMD_5_CACHE_SET_NUM_LSB 26
- #define TCL_DATA_CMD_5_CACHE_SET_NUM_MASK 0x3c000000
- #define TCL_DATA_CMD_5_MESH_ENABLE_OFFSET 0x00000014
- #define TCL_DATA_CMD_5_MESH_ENABLE_LSB 30
- #define TCL_DATA_CMD_5_MESH_ENABLE_MASK 0xc0000000
- #define TCL_DATA_CMD_6_RESERVED_6A_OFFSET 0x00000018
- #define TCL_DATA_CMD_6_RESERVED_6A_LSB 0
- #define TCL_DATA_CMD_6_RESERVED_6A_MASK 0x000fffff
- #define TCL_DATA_CMD_6_RING_ID_OFFSET 0x00000018
- #define TCL_DATA_CMD_6_RING_ID_LSB 20
- #define TCL_DATA_CMD_6_RING_ID_MASK 0x0ff00000
- #define TCL_DATA_CMD_6_LOOPING_COUNT_OFFSET 0x00000018
- #define TCL_DATA_CMD_6_LOOPING_COUNT_LSB 28
- #define TCL_DATA_CMD_6_LOOPING_COUNT_MASK 0xf0000000
- #endif
|