X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Fmacswap.c;h=e2cc4812c41a9c9b7bbf267b1dd1fc0ec3e570e2;hb=76e9a55b5b8248f5b48d3819a7c878fa11d68726;hp=4b0dbeb507e392fdfe373464a1805095242cc805;hpb=bf56fce1fb45b83747527e6312f61c0fcf3789b8;p=dpdk.git diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c index 4b0dbeb507..e2cc4812c4 100644 --- a/app/test-pmd/macswap.c +++ b/app/test-pmd/macswap.c @@ -49,15 +49,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include -#include #include #include #include @@ -66,6 +63,7 @@ #include #include #include +#include #include "testpmd.h" @@ -86,6 +84,7 @@ pkt_burst_mac_swap(struct fwd_stream *fs) uint16_t i; uint32_t retry; uint64_t ol_flags = 0; + uint64_t tx_offloads; #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES uint64_t start_tsc; uint64_t end_tsc; @@ -109,10 +108,13 @@ pkt_burst_mac_swap(struct fwd_stream *fs) #endif fs->rx_packets += nb_rx; txp = &ports[fs->tx_port]; - if (txp->tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_VLAN) + tx_offloads = txp->dev_conf.txmode.offloads; + if (tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT) ol_flags = PKT_TX_VLAN_PKT; - if (txp->tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_QINQ) + if (tx_offloads & DEV_TX_OFFLOAD_QINQ_INSERT) ol_flags |= PKT_TX_QINQ_PKT; + if (tx_offloads & DEV_TX_OFFLOAD_MACSEC_INSERT) + ol_flags |= PKT_TX_MACSEC; for (i = 0; i < nb_rx; i++) { if (likely(i < nb_rx - 1)) rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[i + 1],