From patchwork Tue Jun 30 13:25:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lijun Ou X-Patchwork-Id: 72455 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 41411A0350; Tue, 30 Jun 2020 15:27:00 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EABA81BEAC; Tue, 30 Jun 2020 15:26:59 +0200 (CEST) Received: from huawei.com (szxga07-in.huawei.com [45.249.212.35]) by dpdk.org (Postfix) with ESMTP id B951A1BDFD for ; Tue, 30 Jun 2020 15:26:58 +0200 (CEST) Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 60EFDC19E33689D20456 for ; Tue, 30 Jun 2020 21:26:56 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Tue, 30 Jun 2020 21:26:46 +0800 From: Lijun Ou To: , CC: Date: Tue, 30 Jun 2020 21:25:12 +0800 Message-ID: <1593523512-18096-1-git-send-email-oulijun@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Subject: [dpdk-dev] [PATCH] app/testpmd: update uninitialized member when set fwd mode 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" When set the forwarding mode of the pkt, it needs to update the fwd_eng that it is the member of cur_fwd_config. Otherwise, an error will occur when executing the set command and show confg fwd. the flows as follows: 1. ./tespmd -w xxx -l xx -n 4 -- i 2. set fwd mac testpmd> set fwd mac Set mac packet forwarding mode 3. show config fwd testpmd> show config fwd io packet forwarding - ports=1 - cores=1 - streams=8 -... Logical Core 1 (socket 0) forwards packets on 8 streams: When run the 1 ~ 3 step, it should show the packet forwarding is mac. Signed-off-by: Lijun Ou --- app/test-pmd/config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index a7112c9..ee0e904 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3158,6 +3158,7 @@ set_pkt_forwarding_mode(const char *fwd_mode_name) fwd_mode_name, retry_enabled == 0 ? "" : " with retry"); cur_fwd_eng = fwd_eng; + cur_fwd_config.fwd_eng = fwd_eng; return; } i++;