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 4AF33A04B4; Fri, 8 Nov 2019 16:01:58 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 05EC11C22B; Fri, 8 Nov 2019 16:01:58 +0100 (CET) Received: from mail-io1-f65.google.com (mail-io1-f65.google.com [209.85.166.65]) by dpdk.org (Postfix) with ESMTP id 4922A1C204 for ; Fri, 8 Nov 2019 16:01:56 +0100 (CET) Received: by mail-io1-f65.google.com with SMTP id p6so6656048iod.7 for ; Fri, 08 Nov 2019 07:01:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pwOPvM/Vqk3x1bfBBjgeFv/tJlh747DmX8nyxvpDigY=; b=e0MrCc4SxRTQHe6DTaKaYL+Ql7YSf2P/rb8Q02lSBT4G9KnYxoOlm5zJ47fvO7R/KY gUnf/EXP4fJ5aSGmCeVn0iNSg4xlY6f+QTtmuztu/+o+9op0+ZTHeyRncxbJiN6PaczV lVQ7KTHTH9AAC2bsIMpHDUYHCHuWd5I9ziDTrUui58VkQPm7EP+UQi+JDi4lh7S+oviD SJK6mCk42WSUhXKTBI2kVfFJMbAz8eYmAHDAPXScUuh6JZq1lN+dVunJtmAa9MCkhT4y fNIofiT3wAq7GGaXfSn9o0fv40z2KnyBBHt299DAoNt5Cf3GPxBEFtd1gZ8fnJXCCJVB hOjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pwOPvM/Vqk3x1bfBBjgeFv/tJlh747DmX8nyxvpDigY=; b=oj9AEwzLVJhLh1At1ZuSubC1vRuXeT0+YEPW7Uf2eRc/IXlKZ/ZC2Dnhu97m9yBF0D 9Ua0Qwn5zck2HCbq+6f8Kqt8e/iSbvlhUUG10JRZdIdxvWkPvscCAGkA4BpWmZ89zQtT ALdf/+y27QAVUi6kb1egrZHvd5XovSs4gx3uoMuTH6Fuy/1mOTRz5ROA3fzwROWNffzQ q5QCoCYf6rJq1mpQ9yjkCvDE7l/NGv710cX3LB8/N4HZHs9Sn7l8IzmYS1OsxuGDgSvU 378fa+/9kCl8+8gpRJexIULut8Bygrhszq3t2WcAc9se68tek6DKCnrwNjU55kY+N735 EaxA== X-Gm-Message-State: APjAAAUQL/usIs5D5AI+20EWvFT9SNGVuz5AQhWJEP6C5qXQu+q792DV wJNs70qXlr1LQZ5mmUsCbzceyQFbZkcfyeuIEW0= X-Google-Smtp-Source: APXvYqzZUE7BwuhgoZdX3pW2V2q56jyha4KFRftCZJX/rC0nLHsWTzrp4vAMyJt9i60epaDhkPZIfrSi9ykWC2QyEP4= X-Received: by 2002:a5d:9613:: with SMTP id w19mr10547122iol.271.1573225315357; Fri, 08 Nov 2019 07:01:55 -0800 (PST) MIME-Version: 1.0 References: <20191029153722.4547-1-pbhagavatula@marvell.com> <20191106191803.15098-1-pbhagavatula@marvell.com> <20191106191803.15098-9-pbhagavatula@marvell.com> <2601191342CEEE43887BDE71AB97725801A8C83195@IRSMSX104.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB97725801A8C83195@IRSMSX104.ger.corp.intel.com> From: Jerin Jacob Date: Fri, 8 Nov 2019 20:31:39 +0530 Message-ID: To: "Ananyev, Konstantin" Cc: "Yigit, Ferruh" , Pavan Nikhilesh , Andrew Rybchenko , "jerinj@marvell.com" , "thomas@monjalon.net" , "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" , "Mcnamara, John" , "Kovacevic, Marko" , "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v16 8/8] app/testpmd: add command to set supported ptype mask 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" On Fri, Nov 8, 2019 at 7:24 PM Ananyev, Konstantin wrote: > > > > > -----Original Message----- > > From: dev On Behalf Of Ferruh Yigit > > Sent: Thursday, November 7, 2019 7:41 PM > > To: Jerin Jacob > > Cc: Pavan Nikhilesh ; Andrew Rybchenko ; jerinj@marvell.com; > > thomas@monjalon.net; Lu, Wenzhuo ; Wu, Jingjing ; Iremonger, Bernard > > ; Mcnamara, John ; Kovacevic, Marko ; > > dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v16 8/8] app/testpmd: add command to set supported ptype mask > > > > On 11/7/2019 6:55 PM, Jerin Jacob wrote: > > > > > > > > > On Fri, 8 Nov, 2019, 12:10 am Ferruh Yigit, > > > wrote: > > > > > > On 11/6/2019 7:18 PM, pbhagavatula@marvell.com > > > wrote: > > > > From: Pavan Nikhilesh > > > > > > > > > > > Add command to set supported ptype mask. > > > > Usage: > > > > set port ptype_mask > /* *************** > > > > > > > > /* list of instructions */ > > > > @@ -19155,6 +19237,7 @@ cmdline_parse_ctx_t main_ctx[] = { > > > > (cmdline_parse_inst_t *)&cmd_show_vf_stats, > > > > (cmdline_parse_inst_t *)&cmd_clear_vf_stats, > > > > (cmdline_parse_inst_t *)&cmd_show_port_supported_ptypes, > > > > + (cmdline_parse_inst_t *)&cmd_set_port_ptypes, > > > > (cmdline_parse_inst_t *)&cmd_ptype_mapping_get, > > > > (cmdline_parse_inst_t *)&cmd_ptype_mapping_replace, > > > > (cmdline_parse_inst_t *)&cmd_ptype_mapping_reset, > > > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > > > > index 5ba974162..812aebf35 100644 > > > > --- a/app/test-pmd/testpmd.c > > > > +++ b/app/test-pmd/testpmd.c > > > > @@ -2024,6 +2024,7 @@ start_port(portid_t pid) > > > > queueid_t qi; > > > > struct rte_port *port; > > > > struct rte_ether_addr mac_addr; > > > > + static uint8_t clr_ptypes = 1; > > > > > > > > if (port_id_is_invalid(pid, ENABLED_WARN)) > > > > return 0; > > > > @@ -2153,6 +2154,10 @@ start_port(portid_t pid) > > > > } > > > > } > > > > configure_rxtx_dump_callbacks(verbose_level); > > > > + if (clr_ptypes) { > > > > + clr_ptypes = 0; > > > > + rte_eth_dev_set_ptypes(pi, RTE_PTYPE_UNKNOWN, NULL, 0); > > > > + } > > > > > > I am not sure about this command, we have now capability to set/disable ptypes > > > on demand, why disabling them by default? > > > > > > > > > As forward engines are not using the ptype offload. If a specific forward mode > > > need the offload, it can be enabled. > > Well, at least now user can see ptype in pkt dump with 'set verbose > 0' > It's definitely looks loke a a behavior change. > Wonder why it can't be done visa-versa? > Keep current behavior as default one (all ptypes are un-masked) and > have special command to disable/enable ptypes. > as I understand such command was added by these series. correct? IMO, we are following the principle that by default all offloads are disabled and enable it based on the need to have optimal performance across the DPDK. This change will be on the same theme. Regarding the verbose > 0 cases, I think, we can call rte_eth_dev_set_ptypes() to all PTYPES on the setting verbose callback.