@@ -99,6 +99,54 @@ static const u32 ice_ptypes_ipv6_il[] = {
99
99
0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
100
100
};
101
101
102
+ /* Packet types for packets with an Outer/First/Single IPv4 header - no L4 */
103
+ static const u32 ice_ipv4_ofos_no_l4 [] = {
104
+ 0x10C00000 , 0x04000800 , 0x00000000 , 0x00000000 ,
105
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
106
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
107
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
108
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
109
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
110
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
111
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
112
+ };
113
+
114
+ /* Packet types for packets with an Innermost/Last IPv4 header - no L4 */
115
+ static const u32 ice_ipv4_il_no_l4 [] = {
116
+ 0x60000000 , 0x18043008 , 0x80000002 , 0x6010c021 ,
117
+ 0x00000008 , 0x00000000 , 0x00000000 , 0x00000000 ,
118
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
119
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
120
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
121
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
122
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
123
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
124
+ };
125
+
126
+ /* Packet types for packets with an Outer/First/Single IPv6 header - no L4 */
127
+ static const u32 ice_ipv6_ofos_no_l4 [] = {
128
+ 0x00000000 , 0x00000000 , 0x43000000 , 0x10002000 ,
129
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
130
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
131
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
132
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
133
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
134
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
135
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
136
+ };
137
+
138
+ /* Packet types for packets with an Innermost/Last IPv6 header - no L4 */
139
+ static const u32 ice_ipv6_il_no_l4 [] = {
140
+ 0x00000000 , 0x02180430 , 0x0000010c , 0x086010c0 ,
141
+ 0x00000430 , 0x00000000 , 0x00000000 , 0x00000000 ,
142
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
143
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
144
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
145
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
146
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
147
+ 0x00000000 , 0x00000000 , 0x00000000 , 0x00000000 ,
148
+ };
149
+
102
150
/* UDP Packet types for non-tunneled packets or tunneled
103
151
* packets with inner UDP.
104
152
*/
@@ -250,11 +298,23 @@ ice_flow_proc_seg_hdrs(struct ice_flow_prof_params *params)
250
298
251
299
hdrs = prof -> segs [i ].hdrs ;
252
300
253
- if (hdrs & ICE_FLOW_SEG_HDR_IPV4 ) {
301
+ if ((hdrs & ICE_FLOW_SEG_HDR_IPV4 ) &&
302
+ !(hdrs & ICE_FLOW_SEG_HDRS_L4_MASK )) {
303
+ src = !i ? (const unsigned long * )ice_ipv4_ofos_no_l4 :
304
+ (const unsigned long * )ice_ipv4_il_no_l4 ;
305
+ bitmap_and (params -> ptypes , params -> ptypes , src ,
306
+ ICE_FLOW_PTYPE_MAX );
307
+ } else if (hdrs & ICE_FLOW_SEG_HDR_IPV4 ) {
254
308
src = !i ? (const unsigned long * )ice_ptypes_ipv4_ofos :
255
309
(const unsigned long * )ice_ptypes_ipv4_il ;
256
310
bitmap_and (params -> ptypes , params -> ptypes , src ,
257
311
ICE_FLOW_PTYPE_MAX );
312
+ } else if ((hdrs & ICE_FLOW_SEG_HDR_IPV6 ) &&
313
+ !(hdrs & ICE_FLOW_SEG_HDRS_L4_MASK )) {
314
+ src = !i ? (const unsigned long * )ice_ipv6_ofos_no_l4 :
315
+ (const unsigned long * )ice_ipv6_il_no_l4 ;
316
+ bitmap_and (params -> ptypes , params -> ptypes , src ,
317
+ ICE_FLOW_PTYPE_MAX );
258
318
} else if (hdrs & ICE_FLOW_SEG_HDR_IPV6 ) {
259
319
src = !i ? (const unsigned long * )ice_ptypes_ipv6_ofos :
260
320
(const unsigned long * )ice_ptypes_ipv6_il ;
@@ -385,7 +445,7 @@ ice_flow_xtract_fld(struct ice_hw *hw, struct ice_flow_prof_params *params,
385
445
* ice_flow_xtract_raws - Create extract sequence entries for raw bytes
386
446
* @hw: pointer to the HW struct
387
447
* @params: information about the flow to be processed
388
- * @seg: index of packet segment whose raw fields are to be be extracted
448
+ * @seg: index of packet segment whose raw fields are to be extracted
389
449
*/
390
450
static enum ice_status
391
451
ice_flow_xtract_raws (struct ice_hw * hw , struct ice_flow_prof_params * params ,
@@ -999,7 +1059,7 @@ enum ice_status ice_flow_rem_entry(struct ice_hw *hw, enum ice_block blk,
999
1059
*
1000
1060
* This helper function stores information of a field being matched, including
1001
1061
* the type of the field and the locations of the value to match, the mask, and
1002
- * and the upper-bound value in the start of the input buffer for a flow entry.
1062
+ * the upper-bound value in the start of the input buffer for a flow entry.
1003
1063
* This function should only be used for fixed-size data structures.
1004
1064
*
1005
1065
* This function also opportunistically determines the protocol headers to be
0 commit comments