Imported Upstream version 16.11.2
[deb_dpdk.git] / drivers / net / fm10k / fm10k_rxtx_vec.c
index 27f3e43..3d21652 100644 (file)
@@ -470,9 +470,13 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                __m128i descs0[RTE_FM10K_DESCS_PER_LOOP];
                __m128i pkt_mb1, pkt_mb2, pkt_mb3, pkt_mb4;
                __m128i zero, staterr, sterr_tmp1, sterr_tmp2;
-               __m128i mbp1, mbp2; /* two mbuf pointer in one XMM reg. */
+               __m128i mbp1;
+               /* 2 64 bit or 4 32 bit mbuf pointers in one XMM reg. */
+#if defined(RTE_ARCH_X86_64)
+               __m128i mbp2;
+#endif
 
-               /* B.1 load 1 mbuf point */
+               /* B.1 load 2 (64 bit) or 4 (32 bit) mbuf points */
                mbp1 = _mm_loadu_si128((__m128i *)&mbufp[pos]);
 
                /* Read desc statuses backwards to avoid race condition */
@@ -480,11 +484,13 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                descs0[3] = _mm_loadu_si128((__m128i *)(rxdp + 3));
                rte_compiler_barrier();
 
-               /* B.2 copy 2 mbuf point into rx_pkts  */
+               /* B.2 copy 2 64 bit or 4 32 bit mbuf point into rx_pkts */
                _mm_storeu_si128((__m128i *)&rx_pkts[pos], mbp1);
 
-               /* B.1 load 1 mbuf point */
+#if defined(RTE_ARCH_X86_64)
+               /* B.1 load 2 64 bit mbuf poitns */
                mbp2 = _mm_loadu_si128((__m128i *)&mbufp[pos+2]);
+#endif
 
                descs0[2] = _mm_loadu_si128((__m128i *)(rxdp + 2));
                rte_compiler_barrier();
@@ -493,8 +499,10 @@ fm10k_recv_raw_pkts_vec(void *rx_queue, struct rte_mbuf **rx_pkts,
                rte_compiler_barrier();
                descs0[0] = _mm_loadu_si128((__m128i *)(rxdp));
 
+#if defined(RTE_ARCH_X86_64)
                /* B.2 copy 2 mbuf point into rx_pkts  */
                _mm_storeu_si128((__m128i *)&rx_pkts[pos+2], mbp2);
+#endif
 
                /* avoid compiler reorder optimization */
                rte_compiler_barrier();