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 ED8F2A3179 for ; Thu, 17 Oct 2019 12:41:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 38CFF1E938; Thu, 17 Oct 2019 12:41:25 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 5B83F1E931 for ; Thu, 17 Oct 2019 12:41:23 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us5.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 100AE4C005C; Thu, 17 Oct 2019 10:41:22 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 17 Oct 2019 11:41:16 +0100 To: Ori Kam , Thomas Monjalon , Ferruh Yigit CC: "dev@dpdk.org" , "jingjing.wu@intel.com" , "stephen@networkplumber.org" References: <1569479349-36962-1-git-send-email-orika@mellanox.com> <1571130263-120863-1-git-send-email-orika@mellanox.com> <1571130263-120863-2-git-send-email-orika@mellanox.com> <21993a52-3033-bf42-2041-0c50519ee5d1@solarflare.com> From: Andrew Rybchenko Message-ID: <84971414-0ff6-585b-fcad-8dc9ba8e6bc8@solarflare.com> Date: Thu, 17 Oct 2019 13:41:12 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24982.003 X-TM-AS-Result: No-14.319000-8.000000-10 X-TMASE-MatchedRID: X4bcv0S75KnmLzc6AOD8DfHkpkyUphL9ekMgTOQbVFuSK5CusIkgCSzr MMF3CEtHr4VH42r0017YVN9VJmcBIMwrDggcQ6d1fid4LSHtIAM1X1Ls767cpvQuLRJxiooJIm6 Lly3zU00Xu4y05PtiL4YHfIkcLLK6+vu5o1fmH7mcxB01DrjF9wCm784gsJu47VWmYaIPG1zr7f jWKbC0RZ6vrY2L+tToObI8AJp2RYwr5O/jiCnGGG6yfYFZzrGdNGzPoDPB/1KBGAFBo3zw8CZKR IFpXA+BByWMajs9EX4pF10iH7zk7gPOGLj2lm3v9FQh3flUIh7d0Ka8RroiIZdtxl+wLu3U+YHO mpCIjU1RPb1rMSobg5VTGXngJLjQTX7PJ/OU3vKDGx/OQ1GV8pPNXDv0GgtYJdW0GbI6Iq6OhzO a6g8KrXugvIA5n0Tj+UQRkV5lpL2ixkXb5mqHtSolmednOJU+FCWeC9Q3ppQ= X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--14.319000-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24982.003 X-MDID: 1571308883-78iuDAmfQnmC Subject: Re: [dpdk-dev] [PATCH v3 01/14] ethdev: add support for hairpin queue 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" Hi Ori, On 10/16/19 10:36 PM, Ori Kam wrote: > Hi Andrew, > > Thanks again for your time. > > PSB, > Ori > > >> -----Original Message----- >> From: Andrew Rybchenko >> Sent: Tuesday, October 15, 2019 1:12 PM >> To: Ori Kam ; Thomas Monjalon >> ; Ferruh Yigit >> Cc: dev@dpdk.org; jingjing.wu@intel.com; stephen@networkplumber.org >> Subject: Re: [PATCH v3 01/14] ethdev: add support for hairpin queue >> >> Hi Ori, >> >> On 10/15/19 12:04 PM, Ori Kam wrote: >>> This commit introduce hairpin queue type. >>> >>> The hairpin queue in build from Rx queue binded to Tx queue. >>> It is used to offload traffic coming from the wire and redirect it back >>> to the wire. >>> >>> There are 3 new functions: >>> - rte_eth_dev_hairpin_capability_get >>> - rte_eth_rx_hairpin_queue_setup >>> - rte_eth_tx_hairpin_queue_setup >>> >>> In order to use the queue, there is a need to create rte_flow >>> with queue / RSS action that targets one or more of the Rx queues. >>> >>> Signed-off-by: Ori Kam [snip] >>> @@ -746,9 +769,9 @@ struct rte_eth_dev_data { >>> dev_started : 1, /**< Device state: STARTED(1) / STOPPED(0). */ >>> lro : 1; /**< RX LRO is ON(1) / OFF(0) */ >>> uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT]; >>> - /**< Queues state: STARTED(1) / STOPPED(0). */ >>> + /**< Queues state: HAIRPIN(2) / STARTED(1) / STOPPED(0). */ >>> uint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT]; >>> - /**< Queues state: STARTED(1) / STOPPED(0). */ >>> + /**< Queues state: HAIRPIN(2) STARTED(1) / STOPPED(0). */ >> / is missing above after HAIRPIN(2). >> In fact there is no point to duplicate values in parenthesis, but it is >> out of scope of the review. >> > I will add the missing / > >> I'm not 100% happy that it makes impossible to mark hairpin queues >> as started/stopped. It is not that important right now, but may be it is >> better to use state as bit field. Bit 0 - stopped/started, >> bit 1 - regular/hairpin. Anyway, it is internal interface. >> > Your idea is very nice, but there are some things to consider. > For example if converted to bits it will take more memory. > We can just it is flags for the U8 but this will mean that we could have > both hairpin and stopped / started in the same time. Which I'm not sure if > it is good or bad. Like you say it is internal so let's keep the current implementation, > and discuss your idea after this patch set, and after we will see how the community uses > the hairpin feature. Is that O.K. for you? Yes.