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