1*5113495bSYour Name 2*5113495bSYour Name /* 3*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4*5113495bSYour Name * 5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for 6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the 7*5113495bSYour Name * above copyright notice and this permission notice appear in all 8*5113495bSYour Name * copies. 9*5113495bSYour Name * 10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE. 18*5113495bSYour Name */ 19*5113495bSYour Name 20*5113495bSYour Name 21*5113495bSYour Name 22*5113495bSYour Name #ifndef _RX_FLOW_SEARCH_ENTRY_H_ 23*5113495bSYour Name #define _RX_FLOW_SEARCH_ENTRY_H_ 24*5113495bSYour Name #if !defined(__ASSEMBLER__) 25*5113495bSYour Name #endif 26*5113495bSYour Name 27*5113495bSYour Name #define NUM_OF_DWORDS_RX_FLOW_SEARCH_ENTRY 16 28*5113495bSYour Name 29*5113495bSYour Name struct rx_flow_search_entry { 30*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 31*5113495bSYour Name uint32_t src_ip_127_96 : 32; 32*5113495bSYour Name uint32_t src_ip_95_64 : 32; 33*5113495bSYour Name uint32_t src_ip_63_32 : 32; 34*5113495bSYour Name uint32_t src_ip_31_0 : 32; 35*5113495bSYour Name uint32_t dest_ip_127_96 : 32; 36*5113495bSYour Name uint32_t dest_ip_95_64 : 32; 37*5113495bSYour Name uint32_t dest_ip_63_32 : 32; 38*5113495bSYour Name uint32_t dest_ip_31_0 : 32; 39*5113495bSYour Name uint32_t src_port : 16, 40*5113495bSYour Name dest_port : 16; 41*5113495bSYour Name uint32_t l4_protocol : 8, 42*5113495bSYour Name valid : 1, 43*5113495bSYour Name reserved_9 : 4, 44*5113495bSYour Name service_code : 9, 45*5113495bSYour Name priority_valid : 1, 46*5113495bSYour Name use_ppe : 1, 47*5113495bSYour Name reo_destination_indication : 5, 48*5113495bSYour Name msdu_drop : 1, 49*5113495bSYour Name reo_destination_handler : 2; 50*5113495bSYour Name uint32_t metadata : 32; 51*5113495bSYour Name uint32_t aggregation_count : 7, 52*5113495bSYour Name lro_eligible : 1, 53*5113495bSYour Name msdu_count : 24; 54*5113495bSYour Name uint32_t msdu_byte_count : 32; 55*5113495bSYour Name uint32_t timestamp : 32; 56*5113495bSYour Name uint32_t cumulative_ip_length_pmac1 : 16, 57*5113495bSYour Name cumulative_ip_length : 16; 58*5113495bSYour Name uint32_t tcp_sequence_number : 32; 59*5113495bSYour Name #else 60*5113495bSYour Name uint32_t src_ip_127_96 : 32; 61*5113495bSYour Name uint32_t src_ip_95_64 : 32; 62*5113495bSYour Name uint32_t src_ip_63_32 : 32; 63*5113495bSYour Name uint32_t src_ip_31_0 : 32; 64*5113495bSYour Name uint32_t dest_ip_127_96 : 32; 65*5113495bSYour Name uint32_t dest_ip_95_64 : 32; 66*5113495bSYour Name uint32_t dest_ip_63_32 : 32; 67*5113495bSYour Name uint32_t dest_ip_31_0 : 32; 68*5113495bSYour Name uint32_t dest_port : 16, 69*5113495bSYour Name src_port : 16; 70*5113495bSYour Name uint32_t reo_destination_handler : 2, 71*5113495bSYour Name msdu_drop : 1, 72*5113495bSYour Name reo_destination_indication : 5, 73*5113495bSYour Name use_ppe : 1, 74*5113495bSYour Name priority_valid : 1, 75*5113495bSYour Name service_code : 9, 76*5113495bSYour Name reserved_9 : 4, 77*5113495bSYour Name valid : 1, 78*5113495bSYour Name l4_protocol : 8; 79*5113495bSYour Name uint32_t metadata : 32; 80*5113495bSYour Name uint32_t msdu_count : 24, 81*5113495bSYour Name lro_eligible : 1, 82*5113495bSYour Name aggregation_count : 7; 83*5113495bSYour Name uint32_t msdu_byte_count : 32; 84*5113495bSYour Name uint32_t timestamp : 32; 85*5113495bSYour Name uint32_t cumulative_ip_length : 16, 86*5113495bSYour Name cumulative_ip_length_pmac1 : 16; 87*5113495bSYour Name uint32_t tcp_sequence_number : 32; 88*5113495bSYour Name #endif 89*5113495bSYour Name }; 90*5113495bSYour Name 91*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_127_96_OFFSET 0x00000000 92*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_127_96_LSB 0 93*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_127_96_MSB 31 94*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_127_96_MASK 0xffffffff 95*5113495bSYour Name 96*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_95_64_OFFSET 0x00000004 97*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_95_64_LSB 0 98*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_95_64_MSB 31 99*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_95_64_MASK 0xffffffff 100*5113495bSYour Name 101*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_63_32_OFFSET 0x00000008 102*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_63_32_LSB 0 103*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_63_32_MSB 31 104*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_63_32_MASK 0xffffffff 105*5113495bSYour Name 106*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_31_0_OFFSET 0x0000000c 107*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_31_0_LSB 0 108*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_31_0_MSB 31 109*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_IP_31_0_MASK 0xffffffff 110*5113495bSYour Name 111*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_127_96_OFFSET 0x00000010 112*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_127_96_LSB 0 113*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_127_96_MSB 31 114*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_127_96_MASK 0xffffffff 115*5113495bSYour Name 116*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_95_64_OFFSET 0x00000014 117*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_95_64_LSB 0 118*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_95_64_MSB 31 119*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_95_64_MASK 0xffffffff 120*5113495bSYour Name 121*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_63_32_OFFSET 0x00000018 122*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_63_32_LSB 0 123*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_63_32_MSB 31 124*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_63_32_MASK 0xffffffff 125*5113495bSYour Name 126*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_31_0_OFFSET 0x0000001c 127*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_31_0_LSB 0 128*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_31_0_MSB 31 129*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_IP_31_0_MASK 0xffffffff 130*5113495bSYour Name 131*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_PORT_OFFSET 0x00000020 132*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_PORT_LSB 0 133*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_PORT_MSB 15 134*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SRC_PORT_MASK 0x0000ffff 135*5113495bSYour Name 136*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_PORT_OFFSET 0x00000020 137*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_PORT_LSB 16 138*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_PORT_MSB 31 139*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_DEST_PORT_MASK 0xffff0000 140*5113495bSYour Name 141*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_L4_PROTOCOL_OFFSET 0x00000024 142*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_L4_PROTOCOL_LSB 0 143*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_L4_PROTOCOL_MSB 7 144*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_L4_PROTOCOL_MASK 0x000000ff 145*5113495bSYour Name 146*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_VALID_OFFSET 0x00000024 147*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_VALID_LSB 8 148*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_VALID_MSB 8 149*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_VALID_MASK 0x00000100 150*5113495bSYour Name 151*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_RESERVED_9_OFFSET 0x00000024 152*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_RESERVED_9_LSB 9 153*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_RESERVED_9_MSB 12 154*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_RESERVED_9_MASK 0x00001e00 155*5113495bSYour Name 156*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SERVICE_CODE_OFFSET 0x00000024 157*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SERVICE_CODE_LSB 13 158*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SERVICE_CODE_MSB 21 159*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_SERVICE_CODE_MASK 0x003fe000 160*5113495bSYour Name 161*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_PRIORITY_VALID_OFFSET 0x00000024 162*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_PRIORITY_VALID_LSB 22 163*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_PRIORITY_VALID_MSB 22 164*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_PRIORITY_VALID_MASK 0x00400000 165*5113495bSYour Name 166*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_USE_PPE_OFFSET 0x00000024 167*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_USE_PPE_LSB 23 168*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_USE_PPE_MSB 23 169*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_USE_PPE_MASK 0x00800000 170*5113495bSYour Name 171*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_INDICATION_OFFSET 0x00000024 172*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_INDICATION_LSB 24 173*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_INDICATION_MSB 28 174*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_INDICATION_MASK 0x1f000000 175*5113495bSYour Name 176*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_DROP_OFFSET 0x00000024 177*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_DROP_LSB 29 178*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_DROP_MSB 29 179*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_DROP_MASK 0x20000000 180*5113495bSYour Name 181*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_HANDLER_OFFSET 0x00000024 182*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_HANDLER_LSB 30 183*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_HANDLER_MSB 31 184*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_REO_DESTINATION_HANDLER_MASK 0xc0000000 185*5113495bSYour Name 186*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_METADATA_OFFSET 0x00000028 187*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_METADATA_LSB 0 188*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_METADATA_MSB 31 189*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_METADATA_MASK 0xffffffff 190*5113495bSYour Name 191*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_AGGREGATION_COUNT_OFFSET 0x0000002c 192*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_AGGREGATION_COUNT_LSB 0 193*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_AGGREGATION_COUNT_MSB 6 194*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_AGGREGATION_COUNT_MASK 0x0000007f 195*5113495bSYour Name 196*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_LRO_ELIGIBLE_OFFSET 0x0000002c 197*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_LRO_ELIGIBLE_LSB 7 198*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_LRO_ELIGIBLE_MSB 7 199*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_LRO_ELIGIBLE_MASK 0x00000080 200*5113495bSYour Name 201*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_COUNT_OFFSET 0x0000002c 202*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_COUNT_LSB 8 203*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_COUNT_MSB 31 204*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_COUNT_MASK 0xffffff00 205*5113495bSYour Name 206*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_BYTE_COUNT_OFFSET 0x00000030 207*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_BYTE_COUNT_LSB 0 208*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_BYTE_COUNT_MSB 31 209*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_MSDU_BYTE_COUNT_MASK 0xffffffff 210*5113495bSYour Name 211*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_TIMESTAMP_OFFSET 0x00000034 212*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_TIMESTAMP_LSB 0 213*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_TIMESTAMP_MSB 31 214*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_TIMESTAMP_MASK 0xffffffff 215*5113495bSYour Name 216*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_PMAC1_OFFSET 0x00000038 217*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_PMAC1_LSB 0 218*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_PMAC1_MSB 15 219*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_PMAC1_MASK 0x0000ffff 220*5113495bSYour Name 221*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_OFFSET 0x00000038 222*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_LSB 16 223*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_MSB 31 224*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_CUMULATIVE_IP_LENGTH_MASK 0xffff0000 225*5113495bSYour Name 226*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_TCP_SEQUENCE_NUMBER_OFFSET 0x0000003c 227*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_TCP_SEQUENCE_NUMBER_LSB 0 228*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_TCP_SEQUENCE_NUMBER_MSB 31 229*5113495bSYour Name #define RX_FLOW_SEARCH_ENTRY_TCP_SEQUENCE_NUMBER_MASK 0xffffffff 230*5113495bSYour Name 231*5113495bSYour Name #endif 232