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 ED577A055C; Mon, 5 Sep 2022 17:42:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E0FFD410E7; Mon, 5 Sep 2022 17:42:40 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2049.outbound.protection.outlook.com [40.107.102.49]) by mails.dpdk.org (Postfix) with ESMTP id 93DC540041 for ; Mon, 5 Sep 2022 17:42:39 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zg9kJJBe6sx1VchPAVTY5aFZNCixGa5K4Fl4jMmOv4lnmRDact1Xf0+v/+nWoSUbKSAv+s505wDLibT63Y2wB93yF3oSYEO5Fj2QC/j2LU4XPRuL0Ld0RejJ584+fiGtfSxFHscJ2nwlij09+O0ZIxlIUrFad743MTu4ccr3THJU8Efhp37mAyK7lN0rn5eX+n6YsRlLb65ph/PmRzemdtXR3la1O1F6XjKTlSujFW+epIVKmjup87fua0J1zTuI4r7OKvWpv+mK/cYooRaz69YryrTWhiTg5ZIJWoe+naMlONNmBoTXC5AHy1fr5dfN3Xey5y3aW0fY73DXEleeMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZKRcLEH5dW7Cl3YLWlSeNlQs4+oHUB9mUfEa3y7hOnI=; b=EhTIds+6K5fQXpaKaqxF81PtAarbN56Ufrwq6gqQzbaBM/3x9ghQsSArx3Bc+GvW8O3StFHyFGv/DgjWXl7ofLTlXaM8qZcdXy9Ah/01GGujmZsEVk6Ibr5XRBLZk047MHo5IeVLIASEzdqbxJsgjW03Kshn/NyNcTXV7pOdS+fEHMmF4U3a8BoZBozils2654jYiNODxMZeHgF5vQ7Ru4y/mamkQaGjOstKa7V2IIj3MflfRdH8/apVRV5lpUKHkhb8LRAWNFqABeVf3WjAZcJQlcqYzn//pJky7tdje53JgJA7NM7KoCxAmHNS3MjMDcIEaTSEHXmijecFIzMhTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=corigine.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZKRcLEH5dW7Cl3YLWlSeNlQs4+oHUB9mUfEa3y7hOnI=; b=QBgPeqot5CXGoQjlkzxoY/dhZGsJMMauDVEUXqJwGLoRqiA1xk98IRbhr0M1c1THa0LBzOXA2HYoV3nXSvvIN1DlqeA7t+YAabPV0IPtDS9qH1bi4qzCdDxFJ7OZVCiUQUAXBUw5jOTd/zQOY0g3xn+667PTDWgNvI1H7UOQBvU= Received: from BN0PR04CA0001.namprd04.prod.outlook.com (2603:10b6:408:ee::6) by BY5PR02MB6534.namprd02.prod.outlook.com (2603:10b6:a03:1d1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.10; Mon, 5 Sep 2022 15:42:36 +0000 Received: from BN1NAM02FT032.eop-nam02.prod.protection.outlook.com (2603:10b6:408:ee:cafe::8c) by BN0PR04CA0001.outlook.office365.com (2603:10b6:408:ee::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.11 via Frontend Transport; Mon, 5 Sep 2022 15:42:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch02.xlnx.xilinx.com; pr=C Received: from xir-pvapexch02.xlnx.xilinx.com (149.199.80.198) by BN1NAM02FT032.mail.protection.outlook.com (10.13.3.192) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5588.10 via Frontend Transport; Mon, 5 Sep 2022 15:42:35 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 5 Sep 2022 16:42:34 +0100 Received: from smtp.xilinx.com (172.21.105.197) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2375.24 via Frontend Transport; Mon, 5 Sep 2022 16:42:34 +0100 Envelope-to: chaoyong.he@corigine.com, dev@dpdk.org, oss-drivers@corigine.com, niklas.soderlund@corigine.com, heinrich.kuhn@corigine.com Received: from [10.71.194.74] (port=6101) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1oVEF8-0001fm-Lg; Mon, 05 Sep 2022 16:42:34 +0100 Message-ID: <0cf388a3-4a09-cba3-db36-06844267b1ba@xilinx.com> Date: Mon, 5 Sep 2022 16:42:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH v7 09/12] net/nfp: add flower ctrl VNIC rxtx logic Content-Language: en-US To: Chaoyong He , CC: , , Heinrich Kuhn References: <1660299750-10668-1-git-send-email-chaoyong.he@corigine.com> <1660299750-10668-10-git-send-email-chaoyong.he@corigine.com> From: Ferruh Yigit In-Reply-To: <1660299750-10668-10-git-send-email-chaoyong.he@corigine.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a33673ae-2eb4-44da-4e1d-08da8f554155 X-MS-TrafficTypeDiagnostic: BY5PR02MB6534:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4kHHNKUGTD0SRFNrQQZZI8IkaBG00WWspUXhlIQ3dByuScpLMAeE92WfZ3WyXSZDwpZUWH9FMQmrUSPpRTYY6cp29SGtiZtcckHRk5uS/hugfoTx7e0H4geVpr2vxuFua9r3EB1Hu/zW0SDBJSjdfK8Dg1u8TDqF0zwdggHdNzcjQy8wDvyUjVX1qOsyzBAQHE2wV4H8fP4MKRTJVT2TYyF/vdpOtelFhFMtsPh9sgQ7kGAnq6eKjpmS1W0ZT0W78CLx1H+FgyGw/QwvJo1nUvGDfzSG+i2C6qEKvMRXfmubmOJvNSNxpWya7q8t0rSXPAe1Wdq5/p0eJJnk2lyKaYiBhZVUYOflLHiAwnndSIeLefVMBinoxK0fUcYhioSViQc/uVKwpJ0lpyvy1aaxGow9Ow4PQPwrL303pf1zcI/dShr5KNOOXIjS6aqxA4Kf+JhAiJFB7laxbmMK59ayFcDCMoPRipefKeDZHVYC30UMeOE3+y08IpVz2cIogW+eRUsbXxCXL6QghHhUszFbqJcXhpKJcSX0KWr2ry2FK9IdJiN81cPjcgXsJJoazfMh6StBJpza0EePCrYZ7O21Pakb2m+nU/4AxM42bc98DTfitLz8KAsRR2Lgu64tfUE0DCZYuqB4pGF2/jDfTa21lQFK8+V4vKighjZPEdxIS3u67cGtS+ku14ZJ1iWLaFWVaj6rcb18mIy0QvsO+f74mXmOnWFmnj0+tBVsruYiGLrYF9dOm6GvJQOqFJOmNu9V0KX4qxTCsgmZQ9JyJkqTnpynE1BP5kCeqdbuF3ckhNB4xZ5wUvdCi1mezWVmljF4 X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch02.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(346002)(376002)(136003)(396003)(36840700001)(46966006)(40470700004)(82310400005)(110136005)(31696002)(53546011)(40480700001)(82740400003)(36860700001)(31686004)(36756003)(316002)(54906003)(44832011)(4326008)(478600001)(8676002)(7636003)(356005)(5660300002)(336012)(8936002)(41300700001)(186003)(9786002)(40460700003)(26005)(2906002)(70206006)(70586007)(426003)(2616005)(47076005)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2022 15:42:35.5729 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a33673ae-2eb4-44da-4e1d-08da8f554155 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT032.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6534 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 8/12/2022 11:22 AM, Chaoyong He wrote: > Adds a Rx and Tx function for the ctrl VNIC. The logic is mostly > identical to the normal Rx and Tx functionality of the NFP PMD. > > Make use of the ctrl VNIC service logic to service the ctrl VNIC Rx > path. > > Signed-off-by: Chaoyong He > Signed-off-by: Heinrich Kuhn > Reviewed-by: Niklas Söderlund <...> > +uint16_t > +nfp_flower_ctrl_vnic_xmit(struct nfp_app_flower *app_flower, > + struct rte_mbuf *mbuf) > +{ > + uint16_t cnt = 0; > + uint64_t dma_addr; > + uint32_t free_descs; > + struct rte_mbuf **lmbuf; > + struct nfp_net_txq *txq; > + struct nfp_net_hw *ctrl_hw; > + struct rte_eth_dev *ctrl_dev; > + struct nfp_net_nfd3_tx_desc *txds; > + > + ctrl_hw = app_flower->ctrl_hw; > + ctrl_dev = ctrl_hw->eth_dev; > + > + /* Flower ctrl vNIC only has a single tx queue */ > + txq = ctrl_dev->data->tx_queues[0]; > + if (unlikely(txq == NULL)) { > + /* > + * DPDK just checks the queue is lower than max queues > + * enabled. But the queue needs to be configured > + */ > + PMD_TX_LOG(ERROR, "ctrl dev TX Bad queue"); There is no log type 'RTE_LOG_ERROR', which cause build error, it should be 'ERR'. > + goto xmit_end; > + } > + > + txds = &txq->txds[txq->wr_p]; > + txds->vals[0] = 0; > + txds->vals[1] = 0; > + txds->vals[2] = 0; > + txds->vals[3] = 0; > + > + if (nfp_net_nfd3_txq_full(txq)) > + nfp_net_tx_free_bufs(txq); > + > + free_descs = nfp_net_nfd3_free_tx_desc(txq); > + if (unlikely(free_descs == 0)) { > + PMD_TX_LOG(ERROR, "ctrl dev no free descs"); ditto.