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