* [dpdk-dev] [PATCH v1] pktgen: fix generating sequences with vlan header
[not found] <CGME20200115062430eucas1p21a74e501ddd00e8fdaba7da1a9f2c304@eucas1p2.samsung.com>
@ 2020-01-15 6:24 ` Ivan Dyukov
0 siblings, 0 replies; only message in thread
From: Ivan Dyukov @ 2020-01-15 6:24 UTC (permalink / raw)
To: dev, keith.wiles; +Cc: Ivan Dyukov
If lua file contains following code:
pktgen.seqTable(0, "0", seq_table);
pktgen.set("all", "seqCnt", 1);
pktgen.vlan("all", 15);
it will not work because the vlan setting resets sequence
flag on the port.
To solve the issue vlan should not reset EXCLUSIVE_MODES,
it should reset only EXCLUSIVE_PKT_MODES
Signed-off-by: Ivan Dyukov <i.dyukov@samsung.com>
---
app/pktgen-cmds.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/app/pktgen-cmds.c b/app/pktgen-cmds.c
index 0e9af7c..280341a 100644
--- a/app/pktgen-cmds.c
+++ b/app/pktgen-cmds.c
@@ -1386,7 +1386,6 @@ enable_random(port_info_t *info, uint32_t onOff)
{
if (onOff == ENABLE_STATE) {
pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
- pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_RANDOM_PKTS);
} else
pktgen_clr_port_flags(info, SEND_RANDOM_PKTS);
@@ -1637,7 +1636,6 @@ enable_pcap(port_info_t *info, uint32_t state)
if ( (info->pcap != NULL) && (info->pcap->pkt_count != 0) ) {
if (state == ENABLE_STATE) {
pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
- pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_PCAP_PKTS);
} else
pktgen_clr_port_flags(info, SEND_PCAP_PKTS);
@@ -1662,7 +1660,6 @@ enable_rate(port_info_t *info, uint32_t state)
{
if (state == ENABLE_STATE) {
pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
- pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_RATE_PACKETS);
single_set_proto(info, (char *)(uintptr_t)"udp");
@@ -2102,7 +2099,6 @@ void
enable_vxlan(port_info_t *info, uint32_t onOff)
{
if (onOff == ENABLE_STATE) {
- pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_VXLAN_PACKETS);
} else
@@ -2127,7 +2123,6 @@ void
enable_vlan(port_info_t *info, uint32_t onOff)
{
if (onOff == ENABLE_STATE) {
- pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_VLAN_ID);
} else
@@ -2244,7 +2239,6 @@ void
enable_mpls(port_info_t *info, uint32_t onOff)
{
if (onOff == ENABLE_STATE) {
- pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_MPLS_LABEL);
} else
@@ -2290,7 +2284,6 @@ void
enable_qinq(port_info_t *info, uint32_t onOff)
{
if (onOff == ENABLE_STATE) {
- pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_Q_IN_Q_IDS);
} else
@@ -2359,7 +2352,6 @@ void
enable_gre(port_info_t *info, uint32_t onOff)
{
if (onOff == ENABLE_STATE) {
- pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_GRE_IPv4_HEADER);
} else
@@ -2384,7 +2376,6 @@ void
enable_gre_eth(port_info_t *info, uint32_t onOff)
{
if (onOff == ENABLE_STATE) {
- pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_GRE_ETHER_HEADER);
} else
@@ -2750,7 +2741,6 @@ pktgen_set_port_seqCnt(port_info_t *info, uint32_t cnt)
info->seqCnt = cnt;
if (cnt) {
pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
- pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_SEQ_PKTS);
} else
pktgen_clr_port_flags(info, SEND_SEQ_PKTS);
@@ -3242,7 +3232,6 @@ enable_range(port_info_t *info, uint32_t state)
return;
}
pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
- pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_RANGE_PKTS);
} else
pktgen_clr_port_flags(info, SEND_RANGE_PKTS);
@@ -3267,7 +3256,6 @@ enable_latency(port_info_t *info, uint32_t state)
{
if (state == ENABLE_STATE) {
pktgen_clr_port_flags(info, EXCLUSIVE_MODES);
- pktgen_clr_port_flags(info, EXCLUSIVE_PKT_MODES);
pktgen_set_port_flags(info, SEND_LATENCY_PKTS);
if (info->seq_pkt[SINGLE_PKT].pktSize < (PG_ETHER_MIN_LEN - PG_ETHER_CRC_LEN) + sizeof(tstamp_t)) {
--
2.17.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-15 6:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20200115062430eucas1p21a74e501ddd00e8fdaba7da1a9f2c304@eucas1p2.samsung.com>
2020-01-15 6:24 ` [dpdk-dev] [PATCH v1] pktgen: fix generating sequences with vlan header Ivan Dyukov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).