[ovs-dev,v16,14/14] Fix DPDK MBUF tests compilation on some compilers
diff mbox series

Message ID 20190911133003.720-15-michalx.obrembski@intel.com
State New
Headers show
Series
  • Support multi-segment mbufs
Related show

Commit Message

Michal Obrembski Sept. 11, 2019, 1:30 p.m. UTC
Signed-off-by: Michal Obrembski <michalx.obrembski@intel.com>
---
 tests/test-dpdk-mbufs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Patch
diff mbox series

diff --git a/tests/test-dpdk-mbufs.c b/tests/test-dpdk-mbufs.c
index 0c152bf..c8dd155 100644
--- a/tests/test-dpdk-mbufs.c
+++ b/tests/test-dpdk-mbufs.c
@@ -601,9 +601,9 @@  test_dpdk_packet_single_mbuf_csum(void) {
     ovs_assert(p != NULL);
 
     /* Calculate the checksum on the whole packet's data */
-    uint32_t pkt_csum = packet_csum(pkt, 0, dp_packet_size(pkt));
+    ovs_be16 pkt_csum = packet_csum(pkt, 0, dp_packet_size(pkt));
 
-    uint32_t data_csum = csum(dp_packet_data(pkt), dp_packet_size(pkt));
+    ovs_be16 data_csum = csum(dp_packet_data(pkt), dp_packet_size(pkt));
 
     /* Check the checksums are the same */
     ovs_assert(pkt_csum == data_csum);
@@ -629,11 +629,11 @@  test_dpdk_packet_multiple_mbufs_csum(void) {
     assert_multiple_mbufs(pkt, RTE_PKTMBUF_HEADROOM, str_len, nb_segs);
 
     /* Calculate the checksum on the whole packet's data */
-    uint32_t pkt_csum = packet_csum(pkt, 0, dp_packet_size(pkt));
+    ovs_be16 pkt_csum = packet_csum(pkt, 0, dp_packet_size(pkt));
 
     char *data = xmalloc(dp_packet_size(pkt));
     rte_pktmbuf_read(&pkt->mbuf, 0, dp_packet_size(pkt), data);
-    uint32_t data_csum = csum(data, dp_packet_size(pkt));
+    ovs_be16 data_csum = csum(data, dp_packet_size(pkt));
 
     /* Check the checksums are the same */
     ovs_assert(pkt_csum == data_csum);
@@ -660,11 +660,11 @@  test_dpdk_packet_multiple_mbufs_crc32c(void) {
     assert_multiple_mbufs(pkt, RTE_PKTMBUF_HEADROOM, str_len, nb_segs);
 
     /* Calculate the crc32 on the whole packet's data */
-    uint32_t pkt_crc32 = packet_crc32c(pkt, 0, dp_packet_size(pkt));
+    ovs_be32 pkt_crc32 = packet_crc32c(pkt, 0, dp_packet_size(pkt));
 
     char *data = xmalloc(dp_packet_size(pkt));
     rte_pktmbuf_read(&pkt->mbuf, 0, dp_packet_size(pkt), data);
-    uint32_t data_crc32 = crc32c((uint8_t *) data, dp_packet_size(pkt));
+    ovs_be32 data_crc32 = crc32c((uint8_t *) data, dp_packet_size(pkt));
 
     /* Check the crc32 results are the same */
     ovs_assert(pkt_crc32 == data_crc32);