git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
examples/ip_pipeline: add table entry commands
[dpdk.git]
/
app
/
test-pmd
/
txonly.c
diff --git
a/app/test-pmd/txonly.c
b/app/test-pmd/txonly.c
index
9bd3ce7
..
1f08b6e
100644
(file)
--- a/
app/test-pmd/txonly.c
+++ b/
app/test-pmd/txonly.c
@@
-75,6
+75,7
@@
copy_buf_to_pkt_segs(void* buf, unsigned len, struct rte_mbuf *pkt,
buf = ((char*) buf + copy_len);
seg = seg->next;
seg_buf = rte_pktmbuf_mtod(seg, char *);
buf = ((char*) buf + copy_len);
seg = seg->next;
seg_buf = rte_pktmbuf_mtod(seg, char *);
+ copy_len = seg->data_len;
}
rte_memcpy(seg_buf, buf, (size_t) len);
}
}
rte_memcpy(seg_buf, buf, (size_t) len);
}
@@
-164,6
+165,7
@@
pkt_burst_transmit(struct fwd_stream *fs)
uint32_t retry;
uint64_t ol_flags = 0;
uint8_t i;
uint32_t retry;
uint64_t ol_flags = 0;
uint8_t i;
+ uint64_t tx_offloads;
#ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
uint64_t start_tsc;
uint64_t end_tsc;
#ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES
uint64_t start_tsc;
uint64_t end_tsc;
@@
-177,13
+179,14
@@
pkt_burst_transmit(struct fwd_stream *fs)
mbp = current_fwd_lcore()->mbp;
txp = &ports[fs->tx_port];
mbp = current_fwd_lcore()->mbp;
txp = &ports[fs->tx_port];
+ tx_offloads = txp->dev_conf.txmode.offloads;
vlan_tci = txp->tx_vlan_id;
vlan_tci_outer = txp->tx_vlan_id_outer;
vlan_tci = txp->tx_vlan_id;
vlan_tci_outer = txp->tx_vlan_id_outer;
- if (tx
p->tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_VLAN
)
+ if (tx
_offloads & DEV_TX_OFFLOAD_VLAN_INSERT
)
ol_flags = PKT_TX_VLAN_PKT;
ol_flags = PKT_TX_VLAN_PKT;
- if (tx
p->tx_ol_flags & TESTPMD_TX_OFFLOAD_INSERT_QINQ
)
+ if (tx
_offloads & DEV_TX_OFFLOAD_QINQ_INSERT
)
ol_flags |= PKT_TX_QINQ_PKT;
ol_flags |= PKT_TX_QINQ_PKT;
- if (tx
p->tx_ol_flags & TESTPMD_TX_OFFLOAD_MACSEC
)
+ if (tx
_offloads & DEV_TX_OFFLOAD_MACSEC_INSERT
)
ol_flags |= PKT_TX_MACSEC;
for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) {
pkt = rte_mbuf_raw_alloc(mbp);
ol_flags |= PKT_TX_MACSEC;
for (nb_pkt = 0; nb_pkt < nb_pkt_per_burst; nb_pkt++) {
pkt = rte_mbuf_raw_alloc(mbp);