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 A17ADA0C43; Fri, 1 Oct 2021 00:23:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1816B4067E; Fri, 1 Oct 2021 00:23:13 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id A9B634067A for ; Fri, 1 Oct 2021 00:23:11 +0200 (CEST) Received: from [100.65.5.102] (unknown [5.144.123.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 0C39D7F508; Fri, 1 Oct 2021 01:23:11 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 0C39D7F508 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1633040591; bh=CPdxevJkmv1z48Q+I7FhFwP79sSM9DQjbiPhUpsLUFM=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=tpqq7vBm5D5rn58AHJiRoR2pnNpS2Xhg2yYYIku7j5RLyGofdyRW+gg/wftmtP9wP mjgzdSkpOYoXyYjpgVboZ/LZdy9sshRpiNUtpj1HxzkE8AHbfK8xstkXYAacjaxtIq PYQu5dizGJS7BSmDhu0YAC58daf35r7hb7Tt5IN4= To: Ajit Khaparde Cc: dpdk-dev , Andy Moreton , Andrew Rybchenko , Ray Kinsella , Jerin Jacob , Wisam Jaddo , Xiaoyun Li , Thomas Monjalon , Ferruh Yigit , Ori Kam References: <20210902142359.28138-1-ivan.malov@oktetlabs.ru> <20210923112012.14595-1-ivan.malov@oktetlabs.ru> <20210923112012.14595-2-ivan.malov@oktetlabs.ru> From: Ivan Malov Message-ID: Date: Fri, 1 Oct 2021 01:22:59 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 1/5] ethdev: add API to negotiate delivery of Rx meta data 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 01/10/2021 01:12, Ajit Khaparde wrote: > On Thu, Sep 30, 2021 at 3:01 PM Ivan Malov wrote: >> >> Hi Ajit, >> >> On 01/10/2021 00:48, Ajit Khaparde wrote: >>> :::: >>>> diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c >>>> index 97ae52e17e..7a8da3d7ab 100644 >>>> --- a/app/test-pmd/testpmd.c >>>> +++ b/app/test-pmd/testpmd.c >>>> @@ -1485,10 +1485,36 @@ static void >>>> init_config_port_offloads(portid_t pid, uint32_t socket_id) >>>> { >>>> struct rte_port *port = &ports[pid]; >>>> + uint64_t rx_meta_features = 0; >>>> uint16_t data_size; >>>> int ret; >>>> int i; >>>> >>>> + rx_meta_features |= RTE_ETH_RX_META_USER_FLAG; >>>> + rx_meta_features |= RTE_ETH_RX_META_USER_MARK; >>>> + rx_meta_features |= RTE_ETH_RX_META_TUNNEL_ID; >>>> + >>>> + ret = rte_eth_rx_meta_negotiate(pid, &rx_meta_features); >>>> + if (ret == 0) { >>>> + if (!(rx_meta_features & RTE_ETH_RX_META_USER_FLAG)) { >>>> + TESTPMD_LOG(INFO, "Flow action FLAG will not affect Rx mbufs on port %u\n", >>> Log level info might be a little too noisy? >> >> Do you really think so? But main() sets default log level to DEBUG, quote: >> rte_log_set_level(testpmd_logtype, RTE_LOG_DEBUG); >> >> If I go for DEBUG instead of INFO here, it won't get any quieter, will it? > You are right. It won't. > But then three extra messages per port will stand out. But that's my opinion. > Maybe you could log the message when a flow is created with any of the > meta features? The idea is to warn the user from the very beginning that certain flow primitives won't actually work. This way, the user can refrain from trying to use them in flow rules. This might save their time. But I don't mind going for DEBUG here. More opinions are welcome. > >> >>> >>>> + pid); >>>> + } >>>> + >>>> + if (!(rx_meta_features & RTE_ETH_RX_META_USER_MARK)) { >>>> + TESTPMD_LOG(INFO, "Flow action MARK will not affect Rx mbufs on port %u\n", >>>> + pid); >>>> + } >>>> + >>>> + if (!(rx_meta_features & RTE_ETH_RX_META_TUNNEL_ID)) { >>>> + TESTPMD_LOG(INFO, "Flow tunnel offload support might be limited or unavailable on port %u\n", >>>> + pid); >>>> + } >>> ::: >>>> >> >> -- >> Ivan M -- Ivan M