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 6690BA034F; Fri, 10 Sep 2021 09:24:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E403440041; Fri, 10 Sep 2021 09:24:30 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9569D4003E for ; Fri, 10 Sep 2021 09:24:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631258669; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IDkSc7IcGzmtMfDGvEzGlbTcYfUzljYa1FCpbXWCHYo=; b=hndKFrfBaOKj9LYhUCWIuTfJJLyI4NhPcAj0zNyG/q1SgHu2DgcU1VKazv4ofQD2NFrq73 TCKRZR2gAkG4oQeBHsitV0InXva0pn/4mzgeBMWEIQtlki4qrVoUhSWYIEoutL9+Z5Q4sX OoQDZ/yn73BGkQ1MQTKY+JWiM/AP0LI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-528-bL_PCbelOkSorFkpcAmLBw-1; Fri, 10 Sep 2021 03:24:28 -0400 X-MC-Unique: bL_PCbelOkSorFkpcAmLBw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1C51050751; Fri, 10 Sep 2021 07:24:27 +0000 (UTC) Received: from [10.39.208.12] (unknown [10.39.208.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 014EF2C957; Fri, 10 Sep 2021 07:24:23 +0000 (UTC) To: Miao Li , dev@dpdk.org Cc: chenbo.xia@intel.com, David Marchand References: <20210910130548.127017-1-miao.li@intel.com> <20210910130548.127017-6-miao.li@intel.com> From: Maxime Coquelin Message-ID: <609226c8-ad13-1781-fdb6-4f3c06df968e@redhat.com> Date: Fri, 10 Sep 2021 09:24:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210910130548.127017-6-miao.li@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [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" On 9/10/21 3:05 PM, Miao Li wrote: > 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))) { > Why not just rely on the capabilities exposed by the driver? Maxime