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 41A09A04AB; Fri, 8 Nov 2019 05:13:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 604AD1BEE0; Fri, 8 Nov 2019 05:13:37 +0100 (CET) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 35CE71BEDC for ; Fri, 8 Nov 2019 05:13:36 +0100 (CET) Received: by mail-io1-f67.google.com with SMTP id v17so3792571iol.12 for ; Thu, 07 Nov 2019 20:13:36 -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=uAsfItFy50wxspszc6aU9aSHi32RAv2PMe/lyyCvmGY=; b=KVofxg3SGU5JHpGDcWIx3OlXcTMxBDg3ScSFqw5xl/T1L0pDyiPqKjrfAPvC1NYuPG n7kBUO7Bq1sWMB1nvwXDe9R+ZbdjsemBqwPWCWO/wqblpwCgCWE52L/xZTs7/sYcpwDr 9+JsO/qcKsI84wQe6of5WMQ4pYiksDLlwmIfTezAeyV+aRvrbeqSs3glgOLhoQVzQvJs 73G0Tv4Y0/6/7NDGjdU08fyc4PD46ju34h/DHU8Kl67n9gCORR79W0bHpQmx3VCCUNEK BvYho9BYVdyG6Lt408FUj3o0pitRQXyOUn+CnyERVO3RwuGM7GiAuWrz2blYuux1P0W+ /BSQ== 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=uAsfItFy50wxspszc6aU9aSHi32RAv2PMe/lyyCvmGY=; b=iGuw7fkiuXAKkiD2HgwUb6n/iZO5d8/aADpzxKlIN+HvIxn6xuWykonUMJCLXgx8H/ TaEkXDSVq0Lnag5cpSpnZ2xZelQw9kz+TWoA8p875z0e0EgYgnH3TugQSE150FzrbRqw mdNs/sO2Zh60kCGRGZ8IuFV5Wnnl+L65Ayx7OQiVOycboUE3TjuD61KyPs/DLY9r+sYa z8I0RpWl07Jeb0vLrMZUWfdlVMJmbB7xZAI3F0l8WPOAhQoJcHZZdiKN9eHikx3n0RUF Mh3RnkrDPNdb36JijsjRZAkt28Im1o8SsrzEhY2ZNwGK8hpciKIzrLuZ8+skoi0EpToZ n57g== X-Gm-Message-State: APjAAAW5dX+EwWloR58T6GQ1N1B4qXPnb/B/oGnHX0Z+sv708cTmyEOB 7qU4tXW/7o+f4kIJFeueyhA6hFBOc3gx9/YXgAM= X-Google-Smtp-Source: APXvYqwxutg9g86q260TjlUTsXAWQBvaQYjyKdo3CpZPLlvhlvdjEHkDftvSgKYwuchqraxi2AxU98P4aOgluK+kjs4= X-Received: by 2002:a5d:9613:: with SMTP id w19mr7646573iol.271.1573186415379; Thu, 07 Nov 2019 20:13:35 -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> In-Reply-To: From: Jerin Jacob Date: Fri, 8 Nov 2019 09:43:18 +0530 Message-ID: To: Ferruh Yigit Cc: Pavan Nikhilesh , Andrew Rybchenko , Jerin Jacob , Thomas Monjalon , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , dpdk-dev 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 1:11 AM Ferruh Yigit wrote: > > 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. > > > > OK, I am still not sure but I understand your reasoning. > > But this is a behavior change and it may caught people, what about following > more operational updates: > - Separate this into its own patch, this is different than adding new command > - move "clr_ptypes" next to other static global variables, to make this > selection more obvious, and those global variables tend to have some comments, > we can add comment to this one as well. > - print a log when "rte_eth_dev_set_ptypes()" returns success, to say packets > types parsing is disabled, to help user to understand what is happening. Because > currently there is no other way to get the current configured ptypes from PMD. +1 for operational updates.