replace alignment attributes
[dpdk.git] / drivers / net / mlx5 / mlx5_rxtx_vec_altivec.h
index 1467a42..8e8d59a 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef RTE_PMD_MLX5_RXTX_VEC_ALTIVEC_H_
 #define RTE_PMD_MLX5_RXTX_VEC_ALTIVEC_H_
 
-#include <assert.h>
 #include <stdint.h>
 #include <string.h>
 #include <stdlib.h>
@@ -616,8 +615,8 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
        const vector unsigned short cqe_sel_mask2 =
                (vector unsigned short){0, 0, 0xffff, 0, 0, 0, 0, 0};
 
-       assert(rxq->sges_n == 0);
-       assert(rxq->cqe_n == rxq->elts_n);
+       MLX5_ASSERT(rxq->sges_n == 0);
+       MLX5_ASSERT(rxq->cqe_n == rxq->elts_n);
        cq = &(*rxq->cqes)[cq_idx];
        rte_prefetch0(cq);
        rte_prefetch0(cq + 1);
@@ -647,7 +646,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
        if (!pkts_n)
                return rcvd_pkt;
        /* At this point, there shouldn't be any remaining packets. */
-       assert(rxq->decompressed == 0);
+       MLX5_ASSERT(rxq->decompressed == 0);
 
        /*
         * A. load first Qword (8bytes) in one loop.
@@ -733,13 +732,13 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
                /* A.1 load cqes. */
                p3 = (unsigned int)((vector unsigned short)p)[3];
                cqes[3] = (vector unsigned char)(vector unsigned long){
-                       *(__attribute__((__aligned__(8))) unsigned long *)
+                       *(__rte_aligned(8) unsigned long *)
                        &cq[pos + p3].sop_drop_qpn, 0LL};
                rte_compiler_barrier();
 
                p2 = (unsigned int)((vector unsigned short)p)[2];
                cqes[2] = (vector unsigned char)(vector unsigned long){
-                       *(__attribute__((__aligned__(8))) unsigned long *)
+                       *(__rte_aligned(8) unsigned long *)
                        &cq[pos + p2].sop_drop_qpn, 0LL};
                rte_compiler_barrier();
 
@@ -752,12 +751,12 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
                /* A.1 load a block having op_own. */
                p1 = (unsigned int)((vector unsigned short)p)[1];
                cqes[1] = (vector unsigned char)(vector unsigned long){
-                       *(__attribute__((__aligned__(8))) unsigned long *)
+                       *(__rte_aligned(8) unsigned long *)
                        &cq[pos + p1].sop_drop_qpn, 0LL};
                rte_compiler_barrier();
 
                cqes[0] = (vector unsigned char)(vector unsigned long){
-                       *(__attribute__((__aligned__(8))) unsigned long *)
+                       *(__rte_aligned(8) unsigned long *)
                        &cq[pos].sop_drop_qpn, 0LL};
                rte_compiler_barrier();
 
@@ -784,10 +783,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
                        vec_sel((vector unsigned short)cqes[2],
                        (vector unsigned short)cqe_tmp1, cqe_sel_mask1);
                cqe_tmp2 = (vector unsigned char)(vector unsigned long){
-                       *(__attribute__((__aligned__(8))) unsigned long *)
+                       *(__rte_aligned(8) unsigned long *)
                        &cq[pos + p3].rsvd3[9], 0LL};
                cqe_tmp1 = (vector unsigned char)(vector unsigned long){
-                       *(__attribute__((__aligned__(8))) unsigned long *)
+                       *(__rte_aligned(8) unsigned long *)
                        &cq[pos + p2].rsvd3[9], 0LL};
                cqes[3] = (vector unsigned char)
                        vec_sel((vector unsigned short)cqes[3],
@@ -847,10 +846,10 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
                        vec_sel((vector unsigned short)cqes[0],
                        (vector unsigned short)cqe_tmp1, cqe_sel_mask1);
                cqe_tmp2 = (vector unsigned char)(vector unsigned long){
-                       *(__attribute__((__aligned__(8))) unsigned long *)
+                       *(__rte_aligned(8) unsigned long *)
                        &cq[pos + p1].rsvd3[9], 0LL};
                cqe_tmp1 = (vector unsigned char)(vector unsigned long){
-                       *(__attribute__((__aligned__(8))) unsigned long *)
+                       *(__rte_aligned(8) unsigned long *)
                        &cq[pos].rsvd3[9], 0LL};
                cqes[1] = (vector unsigned char)
                        vec_sel((vector unsigned short)cqes[1],
@@ -1063,7 +1062,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
        if (unlikely(!nocmp_n && comp_idx == MLX5_VPMD_DESCS_PER_LOOP))
                return rcvd_pkt;
        /* Update the consumer indexes for non-compressed CQEs. */
-       assert(nocmp_n <= pkts_n);
+       MLX5_ASSERT(nocmp_n <= pkts_n);
        rxq->cq_ci += nocmp_n;
        rxq->rq_pi += nocmp_n;
        rcvd_pkt += nocmp_n;
@@ -1073,7 +1072,7 @@ rxq_burst_v(struct mlx5_rxq_data *rxq, struct rte_mbuf **pkts, uint16_t pkts_n,
 #endif
        /* Decompress the last CQE if compressed. */
        if (comp_idx < MLX5_VPMD_DESCS_PER_LOOP && comp_idx == n) {
-               assert(comp_idx == (nocmp_n % MLX5_VPMD_DESCS_PER_LOOP));
+               MLX5_ASSERT(comp_idx == (nocmp_n % MLX5_VPMD_DESCS_PER_LOOP));
                rxq->decompressed =
                        rxq_cq_decompress_v(rxq, &cq[nocmp_n], &elts[nocmp_n]);
                /* Return more packets if needed. */