From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D838CA0547; Fri, 10 Sep 2021 07:04:16 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDB7B4113A; Fri, 10 Sep 2021 07:04:01 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id AE0A340DFD for ; Fri, 10 Sep 2021 07:04:00 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10102"; a="208102029" X-IronPort-AV: E=Sophos;i="5.85,282,1624345200"; d="scan'208";a="208102029" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 22:04:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,282,1624345200"; d="scan'208";a="549003948" Received: from limiao-icelake.sh.intel.com ([10.67.115.199]) by fmsmga002.fm.intel.com with ESMTP; 09 Sep 2021 22:03:59 -0700 From: Miao Li To: dev@dpdk.org Cc: chenbo.xia@intel.com, maxime.coquelin@redhat.com, miao.li@intel.com Date: Fri, 10 Sep 2021 13:05:48 +0000 Message-Id: <20210910130548.127017-6-miao.li@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210910130548.127017-1-miao.li@intel.com> References: <20210910130548.127017-1-miao.li@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 5/5] examples/l3fwd-power: support virtio/vhost X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" This patch adds two command line arguments which will be needed when using virtio/vhost vdev. One argument sets rx offloads capabilities DEV_RX_OFFLOAD_VLAN_STRIP. The other argument sets DCB, PSS and VMDQ off for RX side. Signed-off-by: Miao Li --- examples/l3fwd-power/main.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index aa7b8db44a..4e28008578 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -1811,6 +1811,8 @@ parse_args(int argc, char **argv) {"high-perf-cores", 1, 0, 0}, {"no-numa", 0, 0, 0}, {"enable-jumbo", 0, 0, 0}, + {"vlan-strip", 0, 0, 0}, + {"rx-none", 0, 0, 0}, {CMD_LINE_OPT_EMPTY_POLL, 1, 0, 0}, {CMD_LINE_OPT_PARSE_PTYPE, 0, 0, 0}, {CMD_LINE_OPT_LEGACY, 0, 0, 0}, @@ -1986,6 +1988,19 @@ parse_args(int argc, char **argv) (unsigned int)port_conf.rxmode.max_rx_pkt_len); } + if (!strncmp(lgopts[option_index].name, + "vlan-strip", 10)) { + printf("set vlan strip\n"); + port_conf.rxmode.offloads = + DEV_RX_OFFLOAD_VLAN_STRIP; + } + + if (!strncmp(lgopts[option_index].name, + "rx-none", 7)) { + printf("none of DCB,RSS or VMDQ mode\n"); + port_conf.rxmode.mq_mode = ETH_MQ_RX_NONE; + } + if (!strncmp(lgopts[option_index].name, CMD_LINE_OPT_PARSE_PTYPE, sizeof(CMD_LINE_OPT_PARSE_PTYPE))) { -- 2.25.1