1 2 /* 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 21 22 #ifndef _RX_FLOW_SEARCH_ENTRY_H_ 23 #define _RX_FLOW_SEARCH_ENTRY_H_ 24 #if !defined(__ASSEMBLER__) 25 #endif 26 27 #define NUM_OF_DWORDS_RX_FLOW_SEARCH_ENTRY 16 28 29 struct rx_flow_search_entry { 30 uint32_t src_ip_127_96 : 32; 31 uint32_t src_ip_95_64 : 32; 32 uint32_t src_ip_63_32 : 32; 33 uint32_t src_ip_31_0 : 32; 34 uint32_t dest_ip_127_96 : 32; 35 uint32_t dest_ip_95_64 : 32; 36 uint32_t dest_ip_63_32 : 32; 37 uint32_t dest_ip_31_0 : 32; 38 uint32_t src_port : 16, 39 dest_port : 16; 40 uint32_t l4_protocol : 8, 41 valid : 1, 42 reserved_9 : 15, 43 reo_destination_indication : 5, 44 msdu_drop : 1, 45 reo_destination_handler : 2; 46 uint32_t metadata : 32; 47 uint32_t aggregation_count : 7, 48 lro_eligible : 1, 49 msdu_count : 24; 50 uint32_t msdu_byte_count : 32; 51 uint32_t timestamp : 32; 52 uint32_t cumulative_l4_checksum : 16, 53 cumulative_ip_length : 16; 54 uint32_t tcp_sequence_number : 32; 55 }; 56 57 #define RX_FLOW_SEARCH_ENTRY_0_SRC_IP_127_96_OFFSET 0x00000000 58 #define RX_FLOW_SEARCH_ENTRY_0_SRC_IP_127_96_LSB 0 59 #define RX_FLOW_SEARCH_ENTRY_0_SRC_IP_127_96_MASK 0xffffffff 60 61 #define RX_FLOW_SEARCH_ENTRY_1_SRC_IP_95_64_OFFSET 0x00000004 62 #define RX_FLOW_SEARCH_ENTRY_1_SRC_IP_95_64_LSB 0 63 #define RX_FLOW_SEARCH_ENTRY_1_SRC_IP_95_64_MASK 0xffffffff 64 65 #define RX_FLOW_SEARCH_ENTRY_2_SRC_IP_63_32_OFFSET 0x00000008 66 #define RX_FLOW_SEARCH_ENTRY_2_SRC_IP_63_32_LSB 0 67 #define RX_FLOW_SEARCH_ENTRY_2_SRC_IP_63_32_MASK 0xffffffff 68 69 #define RX_FLOW_SEARCH_ENTRY_3_SRC_IP_31_0_OFFSET 0x0000000c 70 #define RX_FLOW_SEARCH_ENTRY_3_SRC_IP_31_0_LSB 0 71 #define RX_FLOW_SEARCH_ENTRY_3_SRC_IP_31_0_MASK 0xffffffff 72 73 #define RX_FLOW_SEARCH_ENTRY_4_DEST_IP_127_96_OFFSET 0x00000010 74 #define RX_FLOW_SEARCH_ENTRY_4_DEST_IP_127_96_LSB 0 75 #define RX_FLOW_SEARCH_ENTRY_4_DEST_IP_127_96_MASK 0xffffffff 76 77 #define RX_FLOW_SEARCH_ENTRY_5_DEST_IP_95_64_OFFSET 0x00000014 78 #define RX_FLOW_SEARCH_ENTRY_5_DEST_IP_95_64_LSB 0 79 #define RX_FLOW_SEARCH_ENTRY_5_DEST_IP_95_64_MASK 0xffffffff 80 81 #define RX_FLOW_SEARCH_ENTRY_6_DEST_IP_63_32_OFFSET 0x00000018 82 #define RX_FLOW_SEARCH_ENTRY_6_DEST_IP_63_32_LSB 0 83 #define RX_FLOW_SEARCH_ENTRY_6_DEST_IP_63_32_MASK 0xffffffff 84 85 #define RX_FLOW_SEARCH_ENTRY_7_DEST_IP_31_0_OFFSET 0x0000001c 86 #define RX_FLOW_SEARCH_ENTRY_7_DEST_IP_31_0_LSB 0 87 #define RX_FLOW_SEARCH_ENTRY_7_DEST_IP_31_0_MASK 0xffffffff 88 89 #define RX_FLOW_SEARCH_ENTRY_8_SRC_PORT_OFFSET 0x00000020 90 #define RX_FLOW_SEARCH_ENTRY_8_SRC_PORT_LSB 0 91 #define RX_FLOW_SEARCH_ENTRY_8_SRC_PORT_MASK 0x0000ffff 92 93 #define RX_FLOW_SEARCH_ENTRY_8_DEST_PORT_OFFSET 0x00000020 94 #define RX_FLOW_SEARCH_ENTRY_8_DEST_PORT_LSB 16 95 #define RX_FLOW_SEARCH_ENTRY_8_DEST_PORT_MASK 0xffff0000 96 97 #define RX_FLOW_SEARCH_ENTRY_9_L4_PROTOCOL_OFFSET 0x00000024 98 #define RX_FLOW_SEARCH_ENTRY_9_L4_PROTOCOL_LSB 0 99 #define RX_FLOW_SEARCH_ENTRY_9_L4_PROTOCOL_MASK 0x000000ff 100 101 #define RX_FLOW_SEARCH_ENTRY_9_VALID_OFFSET 0x00000024 102 #define RX_FLOW_SEARCH_ENTRY_9_VALID_LSB 8 103 #define RX_FLOW_SEARCH_ENTRY_9_VALID_MASK 0x00000100 104 105 #define RX_FLOW_SEARCH_ENTRY_9_RESERVED_9_OFFSET 0x00000024 106 #define RX_FLOW_SEARCH_ENTRY_9_RESERVED_9_LSB 9 107 #define RX_FLOW_SEARCH_ENTRY_9_RESERVED_9_MASK 0x00fffe00 108 109 #define RX_FLOW_SEARCH_ENTRY_9_REO_DESTINATION_INDICATION_OFFSET 0x00000024 110 #define RX_FLOW_SEARCH_ENTRY_9_REO_DESTINATION_INDICATION_LSB 24 111 #define RX_FLOW_SEARCH_ENTRY_9_REO_DESTINATION_INDICATION_MASK 0x1f000000 112 113 #define RX_FLOW_SEARCH_ENTRY_9_MSDU_DROP_OFFSET 0x00000024 114 #define RX_FLOW_SEARCH_ENTRY_9_MSDU_DROP_LSB 29 115 #define RX_FLOW_SEARCH_ENTRY_9_MSDU_DROP_MASK 0x20000000 116 117 #define RX_FLOW_SEARCH_ENTRY_9_REO_DESTINATION_HANDLER_OFFSET 0x00000024 118 #define RX_FLOW_SEARCH_ENTRY_9_REO_DESTINATION_HANDLER_LSB 30 119 #define RX_FLOW_SEARCH_ENTRY_9_REO_DESTINATION_HANDLER_MASK 0xc0000000 120 121 #define RX_FLOW_SEARCH_ENTRY_10_METADATA_OFFSET 0x00000028 122 #define RX_FLOW_SEARCH_ENTRY_10_METADATA_LSB 0 123 #define RX_FLOW_SEARCH_ENTRY_10_METADATA_MASK 0xffffffff 124 125 #define RX_FLOW_SEARCH_ENTRY_11_AGGREGATION_COUNT_OFFSET 0x0000002c 126 #define RX_FLOW_SEARCH_ENTRY_11_AGGREGATION_COUNT_LSB 0 127 #define RX_FLOW_SEARCH_ENTRY_11_AGGREGATION_COUNT_MASK 0x0000007f 128 129 #define RX_FLOW_SEARCH_ENTRY_11_LRO_ELIGIBLE_OFFSET 0x0000002c 130 #define RX_FLOW_SEARCH_ENTRY_11_LRO_ELIGIBLE_LSB 7 131 #define RX_FLOW_SEARCH_ENTRY_11_LRO_ELIGIBLE_MASK 0x00000080 132 133 #define RX_FLOW_SEARCH_ENTRY_11_MSDU_COUNT_OFFSET 0x0000002c 134 #define RX_FLOW_SEARCH_ENTRY_11_MSDU_COUNT_LSB 8 135 #define RX_FLOW_SEARCH_ENTRY_11_MSDU_COUNT_MASK 0xffffff00 136 137 #define RX_FLOW_SEARCH_ENTRY_12_MSDU_BYTE_COUNT_OFFSET 0x00000030 138 #define RX_FLOW_SEARCH_ENTRY_12_MSDU_BYTE_COUNT_LSB 0 139 #define RX_FLOW_SEARCH_ENTRY_12_MSDU_BYTE_COUNT_MASK 0xffffffff 140 141 #define RX_FLOW_SEARCH_ENTRY_13_TIMESTAMP_OFFSET 0x00000034 142 #define RX_FLOW_SEARCH_ENTRY_13_TIMESTAMP_LSB 0 143 #define RX_FLOW_SEARCH_ENTRY_13_TIMESTAMP_MASK 0xffffffff 144 145 #define RX_FLOW_SEARCH_ENTRY_14_CUMULATIVE_L4_CHECKSUM_OFFSET 0x00000038 146 #define RX_FLOW_SEARCH_ENTRY_14_CUMULATIVE_L4_CHECKSUM_LSB 0 147 #define RX_FLOW_SEARCH_ENTRY_14_CUMULATIVE_L4_CHECKSUM_MASK 0x0000ffff 148 149 #define RX_FLOW_SEARCH_ENTRY_14_CUMULATIVE_IP_LENGTH_OFFSET 0x00000038 150 #define RX_FLOW_SEARCH_ENTRY_14_CUMULATIVE_IP_LENGTH_LSB 16 151 #define RX_FLOW_SEARCH_ENTRY_14_CUMULATIVE_IP_LENGTH_MASK 0xffff0000 152 153 #define RX_FLOW_SEARCH_ENTRY_15_TCP_SEQUENCE_NUMBER_OFFSET 0x0000003c 154 #define RX_FLOW_SEARCH_ENTRY_15_TCP_SEQUENCE_NUMBER_LSB 0 155 #define RX_FLOW_SEARCH_ENTRY_15_TCP_SEQUENCE_NUMBER_MASK 0xffffffff 156 157 #endif 158