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 C32EFA034F; Sun, 5 Dec 2021 19:00:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 581FD4013F; Sun, 5 Dec 2021 19:00:39 +0100 (CET) Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by mails.dpdk.org (Postfix) with ESMTP id D6A7840040 for ; Sun, 5 Dec 2021 19:00:37 +0100 (CET) Received: by mail-pj1-f48.google.com with SMTP id np6-20020a17090b4c4600b001a90b011e06so6510610pjb.5 for ; Sun, 05 Dec 2021 10:00:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=X58dlAczY9Hg2K9+4d1pD54XqkcNUmKDniKXIDJaoNA=; b=Ldqy/ir7A2OgDe6yll9P2nZSNUTd625l5twEJ1qGfz4/4TPJFWmXhzhIH14s/wHFdu L7l+Z1akZypW+8yeJg9I+ZsPThtFA1XjXUpBGcc7KEh8KScPD2YMcebUOJ0ZWY+LPLC3 qdKC0dGfQ1ghulmYCmfZtbmuqfcUN9dfD91gaTItXZsNdX8Xw9TbQsY4JD2AxBWANx7H 6sT83j1OqRYvYIb3S3thzhUMb2KOpS0huWDu6JhuGWiOAtsw8r7PdXbBBZWkvPfKpd8q LeKH6SpadwISOXEV0GF07u8ikXolbvnGgzI9pPkuFE515YyjSFG5QJKlp3uRlaP/zYyK 6Mhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=X58dlAczY9Hg2K9+4d1pD54XqkcNUmKDniKXIDJaoNA=; b=Aq+e8rTPx3QvAHQHMvDZbDV8s4M8zh6GPuohR2grrxObKCURKM5w16T+t/vsD50xpv 8sqZ/UCz3fmWc/jao5uTYglv6A7Pxwj0UEYhTGOxIkFQZajJw4mOPlOgloPAIXMb2Nn/ 4PGZh4dPNZmbcJXSK74x0xsQzYkwUfiG0eSdgKK9+Qz2uYwj8ncBFkZcmFj9a03FhEh5 xol5NQhNXrtCQa2jrNo9GNjBJvHF1ldi3s0gWiMUSxyECS+8cu7r7P1d84ZoS0PmpDeE S8I8Z8TRgpCRRyXEsO10oFV16OgYSUycCcmSfAxid88G+d40y1z5Az39atNA35xWv0Fz tekg== X-Gm-Message-State: AOAM531ZvJzUZMHR1g0yZmJ4OLeUxybc92b/dC5egkHFtNZYkgJE5UZm jAZfTuQwU62vozxrcE6v9kEwZA== X-Google-Smtp-Source: ABdhPJykSST3P9bRcAxDfPOiil82jkqdF0K7gp9DJRes9TD1iVn738FtgSB/m7eCe5XsqsBO5ra1yQ== X-Received: by 2002:a17:90b:1b52:: with SMTP id nv18mr31574325pjb.43.1638727236642; Sun, 05 Dec 2021 10:00:36 -0800 (PST) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id 130sm9482589pfu.13.2021.12.05.10.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Dec 2021 10:00:36 -0800 (PST) Date: Sun, 5 Dec 2021 10:00:31 -0800 From: Stephen Hemminger To: Jerin Jacob Cc: Jerin Jacob , dpdk-dev , Ray Kinsella , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ajit Khaparde , Andrew Boyer , Beilei Xing , "Richardson, Bruce" , Chas Williams , "Xia, Chenbo" , Ciara Loftus , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Gaetan Rivet , Gagandeep Singh , Guoyang Zhou , Haiyue Wang , Harman Kalra , heinrich.kuhn@corigine.com, Hemant Agrawal , Hyong Youb Kim , Igor Chauskin , Igor Russkikh , Jakub Grajciar , Jasvinder Singh , Jian Wang , Jiawen Wu , Jingjing Wu , John Daley , John Miller , "John W. Linville" , "Wiles, Keith" , Kiran Kumar K , Lijun Ou , Liron Himi , Long Li , Marcin Wojtas , Martin Spinler , Matan Azrad , Matt Peters , Maxime Coquelin , Michal Krawczyk , "Min Hu (Connor" , Pradeep Kumar Nalla , Nithin Dabilpuram , Qiming Yang , Qi Zhang , Radha Mohan Chintakuntla , Rahul Lakkireddy , Rasesh Mody , Rosen Xu , Sachin Saxena , Satha Koteswara Rao Kottidi , Shahed Shaikh , Shai Brandes , Shepard Siegel , Somalapuram Amaranath , Somnath Kotur , Stephen Hemminger , Steven Webster , Sunil Kumar Kori , Tetsuya Mukawa , Veerasenareddy Burru , Viacheslav Ovsiienko , Xiao Wang , Xiaoyun Wang , Yisen Zhuang , Yong Wang , Ziyang Xuan Subject: Re: [dpdk-dev] [PATCH] ethdev: support queue-based priority flow control Message-ID: <20211205100031.7be8e7b0@hermes.local> In-Reply-To: References: <20211204172458.1904300-1-jerinj@marvell.com> <20211204093835.4ef4219c@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sun, 5 Dec 2021 12:33:57 +0530 Jerin Jacob wrote: > On Sat, Dec 4, 2021 at 11:08 PM Stephen Hemminger > wrote: > > > > On Sat, 4 Dec 2021 22:54:58 +0530 > > wrote: > > > > > + /** > > > + * Maximum supported traffic class as per PFC (802.1Qbb) specification. > > > + * > > > + * Based on device support and use-case need, there are two different > > > + * ways to enable PFC. The first case is the port level PFC > > > + * configuration, in this case, rte_eth_dev_priority_flow_ctrl_set() > > > + * API shall be used to configure the PFC, and PFC frames will be > > > + * generated using based on VLAN TC value. > > > + * The second case is the queue level PFC configuration, in this case, > > > + * Any packet field content can be used to steer the packet to the > > > + * specific queue using rte_flow or RSS and then use > > > + * rte_eth_dev_priority_flow_ctrl_queue_set() to set the TC mapping > > > + * on each queue. Based on congestion selected on the specific queue, > > > + * configured TC shall be used to generate PFC frames. > > > + * > > > + * When set to non zero value, application must use queue level > > > + * PFC configuration via rte_eth_dev_priority_flow_ctrl_queue_set() API > > > + * instead of port level PFC configuration via > > > + * rte_eth_dev_priority_flow_ctrl_set() API to realize > > > + * PFC configuration. > > > + */ > > > + uint8_t pfc_queue_tc_max; > > > + uint8_t reserved_8s[7]; > > > + uint64_t reserved_64s[1]; /**< Reserved for future fields */ > > > void *reserved_ptrs[2]; /**< Reserved for future fields */ > > > > Not sure you can claim ABI compatibility because the previous versions of DPDK > > did not enforce that reserved fields must be zero. The Linux kernel > > learned this when adding flags for new system calls; reserved fields only > > work if you enforce that application must set them to zero. > > In this case it rte_eth_dev_info is an out parameter and implementation of > rte_eth_dev_info_get() already memseting to 0. > Do you still see any other ABI issue? > > See rte_eth_dev_info_get() > /* > * Init dev_info before port_id check since caller does not have > * return status and does not know if get is successful or not. > */ > memset(dev_info, 0, sizeof(struct rte_eth_dev_info)); The concern was from the misreading comment. It talks about what application should do. Could you reword the comment so that it describes what pfc_queue_tc_max is here and move the flow control set part of the comment to where the API for that is.