With the removal of the separate block for 16B-descriptors, we can
remove the superfluous braces and dedent the code a bit. This allows us
to reduce overall number of lines, since we can merge quite a number of
lines together.

Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
---
 drivers/net/ice/ice_rxtx_vec_avx2.c | 67 +++++++++++------------------
 1 file changed, 24 insertions(+), 43 deletions(-)

diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c 
b/drivers/net/ice/ice_rxtx_vec_avx2.c
index b93e9c109e..d6e88dbb29 100644
--- a/drivers/net/ice/ice_rxtx_vec_avx2.c
+++ b/drivers/net/ice/ice_rxtx_vec_avx2.c
@@ -254,49 +254,30 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_rx_queue *rxq, 
struct rte_mbuf **rx_pkts,
                         _mm256_loadu_si256((void *)&sw_ring[i + 4]));
 #endif
 
-               __m256i raw_desc0_1, raw_desc2_3, raw_desc4_5, raw_desc6_7;
-               {
-                       const __m128i raw_desc7 =
-                               _mm_load_si128((void *)(rxdp + 7));
-                       rte_compiler_barrier();
-                       const __m128i raw_desc6 =
-                               _mm_load_si128((void *)(rxdp + 6));
-                       rte_compiler_barrier();
-                       const __m128i raw_desc5 =
-                               _mm_load_si128((void *)(rxdp + 5));
-                       rte_compiler_barrier();
-                       const __m128i raw_desc4 =
-                               _mm_load_si128((void *)(rxdp + 4));
-                       rte_compiler_barrier();
-                       const __m128i raw_desc3 =
-                               _mm_load_si128((void *)(rxdp + 3));
-                       rte_compiler_barrier();
-                       const __m128i raw_desc2 =
-                               _mm_load_si128((void *)(rxdp + 2));
-                       rte_compiler_barrier();
-                       const __m128i raw_desc1 =
-                               _mm_load_si128((void *)(rxdp + 1));
-                       rte_compiler_barrier();
-                       const __m128i raw_desc0 =
-                               _mm_load_si128((void *)(rxdp + 0));
-
-                       raw_desc6_7 =
-                               _mm256_inserti128_si256
-                                       (_mm256_castsi128_si256(raw_desc6),
-                                        raw_desc7, 1);
-                       raw_desc4_5 =
-                               _mm256_inserti128_si256
-                                       (_mm256_castsi128_si256(raw_desc4),
-                                        raw_desc5, 1);
-                       raw_desc2_3 =
-                               _mm256_inserti128_si256
-                                       (_mm256_castsi128_si256(raw_desc2),
-                                        raw_desc3, 1);
-                       raw_desc0_1 =
-                               _mm256_inserti128_si256
-                                       (_mm256_castsi128_si256(raw_desc0),
-                                        raw_desc1, 1);
-               }
+               const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7));
+               rte_compiler_barrier();
+               const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6));
+               rte_compiler_barrier();
+               const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5));
+               rte_compiler_barrier();
+               const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4));
+               rte_compiler_barrier();
+               const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3));
+               rte_compiler_barrier();
+               const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2));
+               rte_compiler_barrier();
+               const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1));
+               rte_compiler_barrier();
+               const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0));
+
+               const __m256i raw_desc6_7 =
+                       
_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc6), raw_desc7, 1);
+               const __m256i raw_desc4_5 =
+                       
_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc4), raw_desc5, 1);
+               const __m256i raw_desc2_3 =
+                       
_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc2), raw_desc3, 1);
+               const __m256i raw_desc0_1 =
+                       
_mm256_inserti128_si256(_mm256_castsi128_si256(raw_desc0), raw_desc1, 1);
 
                if (split_packet) {
                        int j;
-- 
2.40.1

Reply via email to