From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0D578A0512; Wed, 15 Jan 2020 09:41:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 879F81C044; Wed, 15 Jan 2020 09:40:59 +0100 (CET) Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 767441C037 for ; Wed, 15 Jan 2020 09:40:58 +0100 (CET) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200115084057euoutp01b0a80795320ac8c4ef7643be8f5a9361~qAsNSURfy1831518315euoutp01M for ; Wed, 15 Jan 2020 08:40:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200115084057euoutp01b0a80795320ac8c4ef7643be8f5a9361~qAsNSURfy1831518315euoutp01M DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1579077657; bh=sTJ4Rvtgd85mmfiBXzJQSii/eEVKr4M56ZK9zNGELOA=; h=From:To:Cc:Subject:Date:References:From; b=gdFMCISu5aLd2D/JgkSlBYRWrigW22DM5vv5oDqpBkVVYuBBBhZlnSeO3dTEJK5KF RqJ2Vp3R9VadBjfaNsIjmZEyjaS+D260+JcP+cDR/66+s1ZJG6E/W8vseml/XowU7g ZbB5HCplE3Q1pR4OokedLAvqlk83yJC4/IFNphu0= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200115084057eucas1p18036e0fbfbe51bba8f286988e4691f72~qAsNGShnj1940619406eucas1p1_; Wed, 15 Jan 2020 08:40:57 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 97.A5.61286.810DE1E5; Wed, 15 Jan 2020 08:40:56 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200115084055eucas1p17621c99c7bcf9d8d067398da1f8d1f87~qAsL5J6Ag1928519285eucas1p16; Wed, 15 Jan 2020 08:40:55 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20200115084055eusmtrp150e88ff4e036291b874f0f2298b0a18e~qAsL4kdEy0430204302eusmtrp1Z; Wed, 15 Jan 2020 08:40:55 +0000 (GMT) X-AuditID: cbfec7f2-f0bff7000001ef66-b9-5e1ed018ec04 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id E6.25.07950.710DE1E5; Wed, 15 Jan 2020 08:40:55 +0000 (GMT) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200115084055eusmtip182eb98373ca25ba324771703e73affda~qAsLjT7u81912119121eusmtip1S; Wed, 15 Jan 2020 08:40:55 +0000 (GMT) From: Ivan Dyukov To: dev@dpdk.org, keith.wiles@intel.com Cc: Ivan Dyukov Date: Wed, 15 Jan 2020 11:40:49 +0300 Message-Id: <20200115084049.10393-1-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrPIsWRmVeSWpSXmKPExsWy7djPc7oSF+TiDLbstbZ492k7k8WsS03s FlePf2d2YPb4tWApq8fiPS+ZPPq2rGIMYI7isklJzcksSy3St0vgymhdto2p4L9ixadDqg2M 52S6GDk5JARMJFYc+MbUxcjFISSwglHiYdsrNgjnC6PExmefWCGcz4wSk2edYIdp+bB0BlTL ckaJS63bWUASQgJfGSV2bvEGsdkENCROd8xjArFFBNQlFu5dDlbDLKAm8aHnPZgtLOAqcenV OrChLAKqEgd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KNDkfGOJ5JfGGpobm FpaG5sbmxmYWSuK8HQIHY4QE0hNLUrNTUwtSi2D6mDg4pRoYt4o/i4q0n/IyneXl3MvN0xmM i9e3neLVcl89f12ewsVWyanChWyJ36QtD/+ftJWjOnD6s0mmfEJz+t5P+cAXeMY+U4lFbFfP Srsu5TN7oiuO1mzncRUKP7pptm6iL/s6prlS9lyXFJk9HGOUPp/dpL1m/3QVebfD2+SEN269 Hn/lwo0zLoELlViKMxINtZiLihMBZWFjKjkCAAA= X-CMS-MailID: 20200115084055eucas1p17621c99c7bcf9d8d067398da1f8d1f87 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200115084055eucas1p17621c99c7bcf9d8d067398da1f8d1f87 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200115084055eucas1p17621c99c7bcf9d8d067398da1f8d1f87 References: Subject: [dpdk-dev] [PATCH v2] pktgen: fix generating sequences with vlan header X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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