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 337A5A04FD; Wed, 15 Jan 2020 07:24:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 87EDD1C065; Wed, 15 Jan 2020 07:24:33 +0100 (CET) Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by dpdk.org (Postfix) with ESMTP id EC0AE1C045 for ; Wed, 15 Jan 2020 07:24:31 +0100 (CET) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200115062430euoutp025f58664ba4baa3eb340b3a70e64ff9bc~p_1FOC9d91000810008euoutp02_ for ; Wed, 15 Jan 2020 06:24:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200115062430euoutp025f58664ba4baa3eb340b3a70e64ff9bc~p_1FOC9d91000810008euoutp02_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1579069471; bh=uUksSWK5Izin1ZXTdQqeNGUL72FtqWmz2kizuFmAaeQ=; h=From:To:Cc:Subject:Date:References:From; b=M1F7J1Zd7CUR1y3i0FPBa0doHll/bC7YHsqq8yWfemLNdirwcTYvlUXzjM+zweG+k rJcOALwRPwntJxBRmPci9IPYtPooJ/fH7gAdDHaWmtYQtIjj9ZqmWnvAngN7ZFctpo ENkFHat4pOAZg/av3T8syEFcgeQ+/nTFpYIeP96g= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200115062430eucas1p1e40e136591983caa455a68c5ead08a3c~p_1E_jPXD0608306083eucas1p1F; Wed, 15 Jan 2020 06:24:30 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 91.05.61286.E10BE1E5; Wed, 15 Jan 2020 06:24:30 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200115062430eucas1p21a74e501ddd00e8fdaba7da1a9f2c304~p_1EpVF540510205102eucas1p20; Wed, 15 Jan 2020 06:24:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200115062430eusmtrp277bfafe5de98623908f43c6a5f9061a2~p_1El1RLc1307413074eusmtrp2S; Wed, 15 Jan 2020 06:24:30 +0000 (GMT) X-AuditID: cbfec7f2-f0bff7000001ef66-33-5e1eb01e1b68 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id ED.96.07950.E10BE1E5; Wed, 15 Jan 2020 06:24:30 +0000 (GMT) Received: from idyukov.rnd.samsung.ru (unknown [106.109.129.29]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200115062429eusmtip1ac421d3083a738693d020bee79386570~p_1ER20An2953929539eusmtip1R; Wed, 15 Jan 2020 06:24:29 +0000 (GMT) From: Ivan Dyukov To: dev@dpdk.org, keith.wiles@intel.com Cc: Ivan Dyukov Date: Wed, 15 Jan 2020 09:24:07 +0300 Message-Id: <20200115062407.6225-1-i.dyukov@samsung.com> X-Mailer: git-send-email 2.17.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrAIsWRmVeSWpSXmKPExsWy7djP87pyG+TiDN48ULd492k7k8WsS03s FlePf2d2YPb4tWApq8fiPS+ZPPq2rGIMYI7isklJzcksSy3St0vgynj6/xN7wRnFiolHnjM1 MC6T6WLk5JAQMJG4cLeVqYuRi0NIYAWjxOH7u5ghnC+MEv8ebWWBcD4zSny+NxsowwHWsmij CUR8OaPEvG3X2SCcr4wSf/evYQGZyyagIXG6Yx4TiC0ioC6xcO9ysDizgJrEh573YLawgKvE v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U5q8SFGU6DlE5mlRJPzgSGeVxJvaGpobmFp aG5sbmxmoSTO2yFwMEZIID2xJDU7NbUgtQimj4mDU6qBsZMjf18oH5tmlfi0jIWrqlkPrncV ObLDly/84JuOTXkKZt+qGzW38vC3/Ol6aBX59fSlqUYXlZ9yZ0y0EdPjcFXmY/i6/hr/wuPV JkJHuTednmcfG5LisyFmhnhrVtSnqrxAb//flT95irKP9D1ui3HYsvr7u7JskRP7d53OTzNw fBekH2ilxFKckWioxVxUnAgA7G86SjkCAAA= X-CMS-MailID: 20200115062430eucas1p21a74e501ddd00e8fdaba7da1a9f2c304 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200115062430eucas1p21a74e501ddd00e8fdaba7da1a9f2c304 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200115062430eucas1p21a74e501ddd00e8fdaba7da1a9f2c304 References: Subject: [dpdk-dev] [PATCH v1] 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" 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 --- 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