1 2 /* 3 * Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved. 4 * SPDX-License-Identifier: ISC 5 */ 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #ifndef _RX_FLOW_SEARCH_ENTRY_H_ 20 #define _RX_FLOW_SEARCH_ENTRY_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 #define NUM_OF_DWORDS_RX_FLOW_SEARCH_ENTRY 16 25 26 27 struct rx_flow_search_entry { 28 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 29 uint32_t src_ip_127_96 : 32; 30 uint32_t src_ip_95_64 : 32; 31 uint32_t src_ip_63_32 : 32; 32 uint32_t src_ip_31_0 : 32; 33 uint32_t dest_ip_127_96 : 32; 34 uint32_t dest_ip_95_64 : 32; 35 uint32_t dest_ip_63_32 : 32; 36 uint32_t dest_ip_31_0 : 32; 37 uint32_t src_port : 16, 38 dest_port : 16; 39 uint32_t l4_protocol : 8, 40 valid : 1, 41 reserved_9 : 4, 42 service_code : 9, 43 priority_valid : 1, 44 use_ppe : 1, 45 reo_destination_indication : 5, 46 msdu_drop : 1, 47 reo_destination_handler : 2; 48 uint32_t metadata : 32; 49 uint32_t aggregation_count : 7, 50 lro_eligible : 1, 51 msdu_count : 24; 52 uint32_t msdu_byte_count : 32; 53 uint32_t timestamp : 32; 54 uint32_t cumulative_ip_length_pmac1 : 16, 55 cumulative_ip_length : 16; 56 uint32_t tcp_sequence_number : 32; 57 #else 58 uint32_t src_ip_127_96 : 32; 59 uint32_t src_ip_95_64 : 32; 60 uint32_t src_ip_63_32 : 32; 61 uint32_t src_ip_31_0 : 32; 62 uint32_t dest_ip_127_96 : 32; 63 uint32_t dest_ip_95_64 : 32; 64 uint32_t dest_ip_63_32 : 32; 65 uint32_t dest_ip_31_0 : 32; 66 uint32_t dest_port : 16, 67 src_port : 16; 68 uint32_t reo_destination_handler : 2, 69 msdu_drop : 1, 70 reo_destination_indication : 5, 71 use_ppe : 1, 72 priority_valid : 1, 73 service_code : 9, 74 reserved_9 : 4, 75 valid : 1, 76 l4_protocol : 8; 77 uint32_t metadata : 32; 78 uint32_t msdu_count : 24, 79 lro_eligible : 1, 80 aggregation_count : 7; 81 uint32_t msdu_byte_count : 32; 82 uint32_t timestamp : 32; 83 uint32_t cumulative_ip_length : 16, 84 cumulative_ip_length_pmac1 : 16; 85 uint32_t tcp_sequence_number : 32; 86 #endif 87 }; 88 89 90 91 92 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_127_96_OFFSET 0x00000000 93 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_127_96_LSB 0 94 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_127_96_MSB 31 95 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_127_96_MASK 0xffffffff 96 97 98 99 100 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_95_64_OFFSET 0x00000004 101 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_95_64_LSB 0 102 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_95_64_MSB 31 103 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_95_64_MASK 0xffffffff 104 105 106 107 108 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_63_32_OFFSET 0x00000008 109 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_63_32_LSB 0 110 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_63_32_MSB 31 111 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_63_32_MASK 0xffffffff 112 113 114 115 116 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_31_0_OFFSET 0x0000000c 117 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_31_0_LSB 0 118 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_31_0_MSB 31 119 #define RX_FLOW_SEARCH_ENTRY_SRC_IP_31_0_MASK 0xffffffff 120 121 122 123 124 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_127_96_OFFSET 0x00000010 125 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_127_96_LSB 0 126 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_127_96_MSB 31 127 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_127_96_MASK 0xffffffff 128 129 130 131 132 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_95_64_OFFSET 0x00000014 133 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_95_64_LSB 0 134 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_95_64_MSB 31 135 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_95_64_MASK 0xffffffff 136 137 138 139 140 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_63_32_OFFSET 0x00000018 141 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_63_32_LSB 0 142 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_63_32_MSB 31 143 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_63_32_MASK 0xffffffff 144 145 146 147 148 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_31_0_OFFSET 0x0000001c 149 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_31_0_LSB 0 150 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_31_0_MSB 31 151 #define RX_FLOW_SEARCH_ENTRY_DEST_IP_31_0_MASK 0xffffffff 152 153 154 155 156 #define RX_FLOW_SEARCH_ENTRY_SRC_PORT_OFFSET 0x00000020 157 #define RX_FLOW_SEARCH_ENTRY_SRC_PORT_LSB 0 158 #define RX_FLOW_SEARCH_ENTRY_SRC_PORT_MSB 15 159 #define RX_FLOW_SEARCH_ENTRY_SRC_PORT_MASK 0x0000ffff 160 161 162 163 164 #define RX_FLOW_SEARCH_ENTRY_DEST_PORT_OFFSET 0x00000020 165 #define RX_FLOW_SEARCH_ENTRY_DEST_PORT_LSB 16 166 #define RX_FLOW_SEARCH_ENTRY_DEST_PORT_MSB 31 167 #define RX_FLOW_SEARCH_ENTRY_DEST_PORT_MASK 0xffff0000 168 169 170 171 172 #define RX_FLOW_SEARCH_ENTRY_L4_PROTOCOL_OFFSET 0x00000024 173 #define RX_FLOW_SEARCH_ENTRY_L4_PROTOCOL_LSB 0 174 #define RX_FLOW_SEARCH_ENTRY_L4_PROTOCOL_MSB 7 175 #define RX_FLOW_SEARCH_ENTRY_L4_PROTOCOL_MASK 0x000000ff 176 177 178 179 180 #define RX_FLOW_SEARCH_ENTRY_VALID_OFFSET 0x00000024 181 #define RX_FLOW_SEARCH_ENTRY_VALID_LSB 8 182 #define RX_FLOW_SEARCH_ENTRY_VALID_MSB 8 183 #define RX_FLOW_SEARCH_ENTRY_VALID_MASK 0x00000100 184 185 186 187 188 #define RX_FLOW_SEARCH_ENTRY_RESERVED_9_OFFSET 0x00000024 189 #define RX_FLOW_SEARCH_ENTRY_RESERVED_9_LSB 9 190 #define RX_FLOW_SEARCH_ENTRY_RESERVED_9_MSB 12 191 #define RX_FLOW_SEARCH_ENTRY_RESERVED_9_MASK 0x00001e00 192 193 194 195 196 #define RX_FLOW_SEARCH_ENTRY_SERVICE_CODE_OFFSET 0x00000024 197 #define RX_FLOW_SEARCH_ENTRY_SERVICE_CODE_LSB 13 198 #define RX_FLOW_SEARCH_ENTRY_SERVICE_CODE_MSB 21 199 #define RX_FLOW_SEARCH_ENTRY_SERVICE_CODE_MASK 0x003fe000 200 201 202 203 204 #define RX_FLOW_SEARCH_ENTRY_PRIORITY_VALID_OFFSET 0x00000024 205 #define RX_FLOW_SEARCH_ENTRY_PRIORITY_VALID_LSB 22 206 #define RX_FLOW_SEARCH_ENTRY_PRIORITY_VALID_MSB 22 207 #define RX_FLOW_SEARCH_ENTRY_PRIORITY_VALID_MASK 0x00400000 208 209 210 211 212 #define RX_FLOW_SEARCH_ENTRY_USE_PPE_OFFSET 0x00000024 213 #define RX_FLOW_SEARCH_ENTRY_USE_PPE_LSB 23 214 #define RX_FLOW_SEARCH_ENTRY_USE_PPE_MSB 23 215 #define RX_FLOW_SEARCH_ENTRY_USE_PPE_MASK 0x00800000 216 217 218 219 220 #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_INDICATION_OFFSET 0x00000024 221 #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_INDICATION_LSB 24 222 #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_INDICATION_MSB 28 223 #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_INDICATION_MASK 0x1f000000 224 225 226 227 228 #define RX_FLOW_SEARCH_ENTRY_MSDU_DROP_OFFSET 0x00000024 229 #define RX_FLOW_SEARCH_ENTRY_MSDU_DROP_LSB 29 230 #define RX_FLOW_SEARCH_ENTRY_MSDU_DROP_MSB 29 231 #define RX_FLOW_SEARCH_ENTRY_MSDU_DROP_MASK 0x20000000 232 233 234 235 236 #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_HANDLER_OFFSET 0x00000024 237 #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_HANDLER_LSB 30 238 #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_HANDLER_MSB 31 239 #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_HANDLER_MASK 0xc0000000 240 241 242 243 244 #define RX_FLOW_SEARCH_ENTRY_METADATA_OFFSET 0x00000028 245 #define RX_FLOW_SEARCH_ENTRY_METADATA_LSB 0 246 #define RX_FLOW_SEARCH_ENTRY_METADATA_MSB 31 247 #define RX_FLOW_SEARCH_ENTRY_METADATA_MASK 0xffffffff 248 249 250 251 252 #define RX_FLOW_SEARCH_ENTRY_AGGREGATION_COUNT_OFFSET 0x0000002c 253 #define RX_FLOW_SEARCH_ENTRY_AGGREGATION_COUNT_LSB 0 254 #define RX_FLOW_SEARCH_ENTRY_AGGREGATION_COUNT_MSB 6 255 #define RX_FLOW_SEARCH_ENTRY_AGGREGATION_COUNT_MASK 0x0000007f 256 257 258 259 260 #define RX_FLOW_SEARCH_ENTRY_LRO_ELIGIBLE_OFFSET 0x0000002c 261 #define RX_FLOW_SEARCH_ENTRY_LRO_ELIGIBLE_LSB 7 262 #define RX_FLOW_SEARCH_ENTRY_LRO_ELIGIBLE_MSB 7 263 #define RX_FLOW_SEARCH_ENTRY_LRO_ELIGIBLE_MASK 0x00000080 264 265 266 267 268 #define RX_FLOW_SEARCH_ENTRY_MSDU_COUNT_OFFSET 0x0000002c 269 #define RX_FLOW_SEARCH_ENTRY_MSDU_COUNT_LSB 8 270 #define RX_FLOW_SEARCH_ENTRY_MSDU_COUNT_MSB 31 271 #define RX_FLOW_SEARCH_ENTRY_MSDU_COUNT_MASK 0xffffff00 272 273 274 275 276 #define RX_FLOW_SEARCH_ENTRY_MSDU_BYTE_COUNT_OFFSET 0x00000030 277 #define RX_FLOW_SEARCH_ENTRY_MSDU_BYTE_COUNT_LSB 0 278 #define RX_FLOW_SEARCH_ENTRY_MSDU_BYTE_COUNT_MSB 31 279 #define RX_FLOW_SEARCH_ENTRY_MSDU_BYTE_COUNT_MASK 0xffffffff 280 281 282 283 284 #define RX_FLOW_SEARCH_ENTRY_TIMESTAMP_OFFSET 0x00000034 285 #define RX_FLOW_SEARCH_ENTRY_TIMESTAMP_LSB 0 286 #define RX_FLOW_SEARCH_ENTRY_TIMESTAMP_MSB 31 287 #define RX_FLOW_SEARCH_ENTRY_TIMESTAMP_MASK 0xffffffff 288 289 290 291 292 #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_PMAC1_OFFSET 0x00000038 293 #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_PMAC1_LSB 0 294 #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_PMAC1_MSB 15 295 #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_PMAC1_MASK 0x0000ffff 296 297 298 299 300 #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_OFFSET 0x00000038 301 #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_LSB 16 302 #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_MSB 31 303 #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_MASK 0xffff0000 304 305 306 307 308 #define RX_FLOW_SEARCH_ENTRY_TCP_SEQUENCE_NUMBER_OFFSET 0x0000003c 309 #define RX_FLOW_SEARCH_ENTRY_TCP_SEQUENCE_NUMBER_LSB 0 310 #define RX_FLOW_SEARCH_ENTRY_TCP_SEQUENCE_NUMBER_MSB 31 311 #define RX_FLOW_SEARCH_ENTRY_TCP_SEQUENCE_NUMBER_MASK 0xffffffff 312 313 314 315 #endif 316