DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] pktgen: fix generating sequences with vlan header
       [not found] <CGME20200115084055eucas1p17621c99c7bcf9d8d067398da1f8d1f87@eucas1p1.samsung.com>
@ 2020-01-15  8:40 ` Ivan Dyukov
  0 siblings, 0 replies; only message in thread
From: Ivan Dyukov @ 2020-01-15  8:40 UTC (permalink / raw)
  To: dev, keith.wiles; +Cc: Ivan Dyukov

The issue happens with following lua code:
pktgen.seqTable(0, "0", seq_table);
pktgen.set("all", "seqCnt", 1);
pktgen.vlan("all", "on");
This code does not work because seqCnt set sequence flag
on the port then  vlan resets the 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  8:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200115084055eucas1p17621c99c7bcf9d8d067398da1f8d1f87@eucas1p1.samsung.com>
2020-01-15  8:40 ` [dpdk-dev] [PATCH v2] pktgen: fix generating sequences with vlan header Ivan Dyukov

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git