From: Ivan Dyukov <i.dyukov@samsung.com>
To: dev@dpdk.org, keith.wiles@intel.com
Cc: Ivan Dyukov <i.dyukov@samsung.com>
Subject: [dpdk-dev] [PATCH v1] pktgen: fix generating sequences with vlan header
Date: Wed, 15 Jan 2020 09:24:07 +0300 [thread overview]
Message-ID: <20200115062407.6225-1-i.dyukov@samsung.com> (raw)
In-Reply-To: <CGME20200115062430eucas1p21a74e501ddd00e8fdaba7da1a9f2c304@eucas1p2.samsung.com>
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
parent reply other threads:[~2020-01-15 6:24 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CGME20200115062430eucas1p21a74e501ddd00e8fdaba7da1a9f2c304@eucas1p2.samsung.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200115062407.6225-1-i.dyukov@samsung.com \
--to=i.dyukov@samsung.com \
--cc=dev@dpdk.org \
--cc=keith.wiles@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).