@@ -215,8 +215,9 @@ static int nft_pipapo_avx2_refill(int offset, unsigned long *map,
215215 * word index to be checked next (i.e. first filled word).
216216 */
217217static int nft_pipapo_avx2_lookup_4b_2 (unsigned long * map , unsigned long * fill ,
218- struct nft_pipapo_field * f , int offset ,
219- const u8 * pkt , bool first , bool last )
218+ const struct nft_pipapo_field * f ,
219+ int offset , const u8 * pkt ,
220+ bool first , bool last )
220221{
221222 int i , ret = -1 , m256_size = f -> bsize / NFT_PIPAPO_LONGS_PER_M256 , b ;
222223 u8 pg [2 ] = { pkt [0 ] >> 4 , pkt [0 ] & 0xf };
@@ -277,8 +278,9 @@ static int nft_pipapo_avx2_lookup_4b_2(unsigned long *map, unsigned long *fill,
277278 * word index to be checked next (i.e. first filled word).
278279 */
279280static int nft_pipapo_avx2_lookup_4b_4 (unsigned long * map , unsigned long * fill ,
280- struct nft_pipapo_field * f , int offset ,
281- const u8 * pkt , bool first , bool last )
281+ const struct nft_pipapo_field * f ,
282+ int offset , const u8 * pkt ,
283+ bool first , bool last )
282284{
283285 int i , ret = -1 , m256_size = f -> bsize / NFT_PIPAPO_LONGS_PER_M256 , b ;
284286 u8 pg [4 ] = { pkt [0 ] >> 4 , pkt [0 ] & 0xf , pkt [1 ] >> 4 , pkt [1 ] & 0xf };
@@ -353,8 +355,9 @@ static int nft_pipapo_avx2_lookup_4b_4(unsigned long *map, unsigned long *fill,
353355 * word index to be checked next (i.e. first filled word).
354356 */
355357static int nft_pipapo_avx2_lookup_4b_8 (unsigned long * map , unsigned long * fill ,
356- struct nft_pipapo_field * f , int offset ,
357- const u8 * pkt , bool first , bool last )
358+ const struct nft_pipapo_field * f ,
359+ int offset , const u8 * pkt ,
360+ bool first , bool last )
358361{
359362 u8 pg [8 ] = { pkt [0 ] >> 4 , pkt [0 ] & 0xf , pkt [1 ] >> 4 , pkt [1 ] & 0xf ,
360363 pkt [2 ] >> 4 , pkt [2 ] & 0xf , pkt [3 ] >> 4 , pkt [3 ] & 0xf ,
@@ -448,8 +451,9 @@ static int nft_pipapo_avx2_lookup_4b_8(unsigned long *map, unsigned long *fill,
448451 * word index to be checked next (i.e. first filled word).
449452 */
450453static int nft_pipapo_avx2_lookup_4b_12 (unsigned long * map , unsigned long * fill ,
451- struct nft_pipapo_field * f , int offset ,
452- const u8 * pkt , bool first , bool last )
454+ const struct nft_pipapo_field * f ,
455+ int offset , const u8 * pkt ,
456+ bool first , bool last )
453457{
454458 u8 pg [12 ] = { pkt [0 ] >> 4 , pkt [0 ] & 0xf , pkt [1 ] >> 4 , pkt [1 ] & 0xf ,
455459 pkt [2 ] >> 4 , pkt [2 ] & 0xf , pkt [3 ] >> 4 , pkt [3 ] & 0xf ,
@@ -537,8 +541,9 @@ static int nft_pipapo_avx2_lookup_4b_12(unsigned long *map, unsigned long *fill,
537541 * word index to be checked next (i.e. first filled word).
538542 */
539543static int nft_pipapo_avx2_lookup_4b_32 (unsigned long * map , unsigned long * fill ,
540- struct nft_pipapo_field * f , int offset ,
541- const u8 * pkt , bool first , bool last )
544+ const struct nft_pipapo_field * f ,
545+ int offset , const u8 * pkt ,
546+ bool first , bool last )
542547{
543548 u8 pg [32 ] = { pkt [0 ] >> 4 , pkt [0 ] & 0xf , pkt [1 ] >> 4 , pkt [1 ] & 0xf ,
544549 pkt [2 ] >> 4 , pkt [2 ] & 0xf , pkt [3 ] >> 4 , pkt [3 ] & 0xf ,
@@ -672,8 +677,9 @@ static int nft_pipapo_avx2_lookup_4b_32(unsigned long *map, unsigned long *fill,
672677 * word index to be checked next (i.e. first filled word).
673678 */
674679static int nft_pipapo_avx2_lookup_8b_1 (unsigned long * map , unsigned long * fill ,
675- struct nft_pipapo_field * f , int offset ,
676- const u8 * pkt , bool first , bool last )
680+ const struct nft_pipapo_field * f ,
681+ int offset , const u8 * pkt ,
682+ bool first , bool last )
677683{
678684 int i , ret = -1 , m256_size = f -> bsize / NFT_PIPAPO_LONGS_PER_M256 , b ;
679685 unsigned long * lt = f -> lt , bsize = f -> bsize ;
@@ -729,8 +735,9 @@ static int nft_pipapo_avx2_lookup_8b_1(unsigned long *map, unsigned long *fill,
729735 * word index to be checked next (i.e. first filled word).
730736 */
731737static int nft_pipapo_avx2_lookup_8b_2 (unsigned long * map , unsigned long * fill ,
732- struct nft_pipapo_field * f , int offset ,
733- const u8 * pkt , bool first , bool last )
738+ const struct nft_pipapo_field * f ,
739+ int offset , const u8 * pkt ,
740+ bool first , bool last )
734741{
735742 int i , ret = -1 , m256_size = f -> bsize / NFT_PIPAPO_LONGS_PER_M256 , b ;
736743 unsigned long * lt = f -> lt , bsize = f -> bsize ;
@@ -793,8 +800,9 @@ static int nft_pipapo_avx2_lookup_8b_2(unsigned long *map, unsigned long *fill,
793800 * word index to be checked next (i.e. first filled word).
794801 */
795802static int nft_pipapo_avx2_lookup_8b_4 (unsigned long * map , unsigned long * fill ,
796- struct nft_pipapo_field * f , int offset ,
797- const u8 * pkt , bool first , bool last )
803+ const struct nft_pipapo_field * f ,
804+ int offset , const u8 * pkt ,
805+ bool first , bool last )
798806{
799807 int i , ret = -1 , m256_size = f -> bsize / NFT_PIPAPO_LONGS_PER_M256 , b ;
800808 unsigned long * lt = f -> lt , bsize = f -> bsize ;
@@ -868,8 +876,9 @@ static int nft_pipapo_avx2_lookup_8b_4(unsigned long *map, unsigned long *fill,
868876 * word index to be checked next (i.e. first filled word).
869877 */
870878static int nft_pipapo_avx2_lookup_8b_6 (unsigned long * map , unsigned long * fill ,
871- struct nft_pipapo_field * f , int offset ,
872- const u8 * pkt , bool first , bool last )
879+ const struct nft_pipapo_field * f ,
880+ int offset , const u8 * pkt ,
881+ bool first , bool last )
873882{
874883 int i , ret = -1 , m256_size = f -> bsize / NFT_PIPAPO_LONGS_PER_M256 , b ;
875884 unsigned long * lt = f -> lt , bsize = f -> bsize ;
@@ -953,8 +962,9 @@ static int nft_pipapo_avx2_lookup_8b_6(unsigned long *map, unsigned long *fill,
953962 * word index to be checked next (i.e. first filled word).
954963 */
955964static int nft_pipapo_avx2_lookup_8b_16 (unsigned long * map , unsigned long * fill ,
956- struct nft_pipapo_field * f , int offset ,
957- const u8 * pkt , bool first , bool last )
965+ const struct nft_pipapo_field * f ,
966+ int offset , const u8 * pkt ,
967+ bool first , bool last )
958968{
959969 int i , ret = -1 , m256_size = f -> bsize / NFT_PIPAPO_LONGS_PER_M256 , b ;
960970 unsigned long * lt = f -> lt , bsize = f -> bsize ;
@@ -1045,8 +1055,9 @@ static int nft_pipapo_avx2_lookup_8b_16(unsigned long *map, unsigned long *fill,
10451055 * word index to be checked next (i.e. first filled word).
10461056 */
10471057static int nft_pipapo_avx2_lookup_slow (unsigned long * map , unsigned long * fill ,
1048- struct nft_pipapo_field * f , int offset ,
1049- const u8 * pkt , bool first , bool last )
1058+ const struct nft_pipapo_field * f ,
1059+ int offset , const u8 * pkt ,
1060+ bool first , bool last )
10501061{
10511062 unsigned long * lt = f -> lt , bsize = f -> bsize ;
10521063 int i , ret = -1 , b ;
@@ -1124,9 +1135,9 @@ bool nft_pipapo_avx2_lookup(const struct net *net, const struct nft_set *set,
11241135 struct nft_pipapo * priv = nft_set_priv (set );
11251136 unsigned long * res , * fill , * scratch ;
11261137 u8 genmask = nft_genmask_cur (net );
1138+ const struct nft_pipapo_match * m ;
1139+ const struct nft_pipapo_field * f ;
11271140 const u8 * rp = (const u8 * )key ;
1128- struct nft_pipapo_match * m ;
1129- struct nft_pipapo_field * f ;
11301141 bool map_index ;
11311142 int i , ret = 0 ;
11321143
0 commit comments