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 E15CC42910; Mon, 10 Apr 2023 13:02:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEED442D5E; Mon, 10 Apr 2023 13:01:13 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2110.outbound.protection.outlook.com [40.107.243.110]) by mails.dpdk.org (Postfix) with ESMTP id 844DC42BD9 for ; Mon, 10 Apr 2023 13:01:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jlWDAho5tBpmbiWyu4s+IKeTb6mdcqnaOXDyIiawH6QS1qmwY3PTeohOAXIl56l3WYih9+RYDEz9eWctMD2jfG1iC1pm69pLCdW3vZsYthQBQl8Crx8Uor4v2gFtMC4VEoUmmzxK6z2/jGN+NcLx1jptCPX4N27LFLxLa/HG4AAvurmXEomrmJU1yAXYdfIrJ6nRaWl6YvZfxYUGMjDeepbtm4cuX+7zccoY07P67kWt1Rt8nTfDcrfesrbAZcQ9W40Cxlnmy7NP+8InHFeUUe9R2ImL0DY3K3VcL3b3zPXztk40YJOzuc3sihO1HbblZ1Ma3QBPbkMK0/CB8DUijw== 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=fyZaKXcGLi1pl0CZi50V1iKFoG53QzbXfZEr5xoy+Sw=; b=NZmkmiqNlqnYlruN9+wSIq1TZsf6mhgICNW6D6t6SW37wt3KfU3iqBl/AhQ9frvpk4f5eKBRDubeiLxtriBLH7jmj2zet2M8nRQKaERmzkZ1xWiEI35tueeHaSkMT4dfd+B7M9kFm5zqn7A39OjDFLJYJ0y5aHRXMfrdQ8p+JOqeIcd+Sq4bXw4gA/NogA6hBAktC9L1fkscp5gycl0bfP/O5gC8TITrCWSi+5+vWxRrYQJ+0O+w5301IlWdgBcJG2M5wB953a99bhKE8NcYIPkIQ7LTD2vJ25PwB6elMbrhZgexM8v5n+RxSbGh7kkU9ETPG33tpQIfvtp8ctXrtA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fyZaKXcGLi1pl0CZi50V1iKFoG53QzbXfZEr5xoy+Sw=; b=iLatD8qsRghHPWnvu90IZtNugeQYUVBp/jr+udsvfXSkcOJL9/BQTtqJqn6aj05b3pnPoFZ1D0u/ldDWvU3XRm+dongv0Q6svMQLfYoZjuDf9by6tjqfbHB/PWuwdtY7bEKOIIwZZDoqNyCt5c+GjmByxyyeuibcHfFj1ilRnQk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by DM6PR13MB3882.namprd13.prod.outlook.com (2603:10b6:5:22a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.31; Mon, 10 Apr 2023 11:01:09 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::baa6:b49:d2f4:c60e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::baa6:b49:d2f4:c60e%4]) with mapi id 15.20.6277.036; Mon, 10 Apr 2023 11:01:09 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, niklas.soderlund@corigine.com, Chaoyong He Subject: [PATCH 10/13] net/nfp: rename macro name of NFD3 Tx descriptor Date: Mon, 10 Apr 2023 19:00:12 +0800 Message-Id: <20230410110015.2973660-11-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230410110015.2973660-1-chaoyong.he@corigine.com> References: <20230410110015.2973660-1-chaoyong.he@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI2PR01CA0040.apcprd01.prod.exchangelabs.com (2603:1096:4:193::14) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|DM6PR13MB3882:EE_ X-MS-Office365-Filtering-Correlation-Id: 99316091-6fbe-4731-3367-08db39b2e39f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: D45Uy4dbZnkMVWn77/5och6B9Fd25rP3CiulvuRnyzVlNp53VA3BtXuF7J2Kzu8gXamlNTYeMxjCvfLL1PbFH5NiziZBp5vPf/L2/0dIH+X1Dl0oQLiciBFYATfGqZOmjLGtTCcXkYIIairlEAqPB+qL3sBAmys16jpjRikH5WQdiLBQcO7bR+T/2cirS0Uu1S62X5NSkLSkaodmBzzfMx0WRtCkynHIYp0K+1uRYdVIDjjRNMqn4ucTiwsviSBZJaTcGe0A3lEyb83ZxPihFUsvp9vMhxWNk5HlGXrja/nywLIYMjCDRYlftXwTA68jIEOdECrp+Q0wSkceSBnx9TQAsKrrGkp24JKMLSaPngp7gpB26JrpsGLKg2UmyrWSjnF1tX2mwFYxVnT9fZqJYRkHyFzirOd9gVzI5hpQlkKms4haFOJGD7/2G37PT5u8we4ZsIsl3leuim9XJ+UywZNoAM+V5ycJh7JtTiNBsjdV/Oqo56oe2pBfR2sytW5WzEUZg8A7WyWPGgvoUQ7ltmbtXGGTzK8cw7ELCqPFrDaj5C583fBdB3jX7CNveqjtVUL5urFoDATTtHXBzFr66wDUcxKNGetiRUY2SePzOWrfq3x3c7qdHgXlbQU6cxV2 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(39840400004)(366004)(376002)(136003)(346002)(451199021)(316002)(86362001)(66556008)(66476007)(478600001)(83380400001)(66946007)(38100700002)(38350700002)(36756003)(186003)(6512007)(4326008)(8676002)(2616005)(6916009)(41300700001)(2906002)(1076003)(6506007)(26005)(107886003)(8936002)(52116002)(6666004)(5660300002)(6486002)(44832011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VGZvbk9DelNJSlFYUWc4SFRZTzE0UVV2RlExZnBkbW9hSFRoSzNNOXJtZlRT?= =?utf-8?B?eHNHcFZhWFVwS2FEdXBHalR6dkdRZHA2NjI1U1NJL1hlSnd2MDRtWTFlR3E0?= =?utf-8?B?bHRiblFiSC9XVUR1TWxiMUJRamE1Yk10bDFKSHFWZFFnUjVHL1Z4NDltSFFK?= =?utf-8?B?OG9weHBxeWVBdHVXSVBPWEErMkhNck1WQ3YrRkZ4bXBhU3RjTVJwdDlvYXg0?= =?utf-8?B?V01HNWNjcFFodXF0b2RsdUFkOUJ2c1pLVWY4RmdaQUFsNTh2S3ZNb2Zkbi95?= =?utf-8?B?OWRwWFFicmR2NHZBeEY0a2FwUEVteUpiQkxObWFMc0ttc3pxa08yUExBcWhI?= =?utf-8?B?UTV6ejIrNE1sejZkME10VStwckF6WHVZOXN1TmJUYUNQMW5rT0FkMSsrWkhH?= =?utf-8?B?b3dLNWg1SGtiYVE1N2hYNHJnd28rclA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-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2023 11:01:09.1148 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bYOR3zpmfGQCXizviArq9O+dB72NCq3e+Cxc6hL1Nb4Rl8RUyQ/qz0QOFqw6Oy2Gh2TDzETJyAWrE48NbaVFmy23t1UPUkkWi6Y+rTv+C+0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB3882 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 Rename the name of the macro of NFD3 TX descriptor from PCIE to NFD3, keep it same with the kernel driver. Signed-off-by: Chaoyong He Reviewed-by: Niklas Söderlund --- drivers/net/nfp/flower/nfp_flower.c | 4 +-- drivers/net/nfp/flower/nfp_flower_ctrl.c | 2 +- drivers/net/nfp/nfd3/nfp_nfd3.h | 36 ++++++++++++------------ drivers/net/nfp/nfd3/nfp_nfd3_dp.c | 4 +-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index 9212e6606b..159f88f5ae 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -550,7 +550,7 @@ nfp_flower_pf_xmit_pkts(void *tx_queue, if ((pkt->ol_flags & RTE_MBUF_F_TX_VLAN) && (hw->cap & NFP_NET_CFG_CTRL_TXVLAN)) { - txd.flags |= PCIE_DESC_TX_VLAN; + txd.flags |= NFD3_DESC_TX_VLAN; txd.vlan = pkt->vlan_tci; } @@ -596,7 +596,7 @@ nfp_flower_pf_xmit_pkts(void *tx_queue, * the priority */ if (likely(pkt_size == 0)) - txds->offset_eop = PCIE_DESC_TX_EOP | FLOWER_PKT_DATA_OFFSET; + txds->offset_eop = NFD3_DESC_TX_EOP | FLOWER_PKT_DATA_OFFSET; else txds->offset_eop = 0; diff --git a/drivers/net/nfp/flower/nfp_flower_ctrl.c b/drivers/net/nfp/flower/nfp_flower_ctrl.c index 7f9dc5683b..937829c23c 100644 --- a/drivers/net/nfp/flower/nfp_flower_ctrl.c +++ b/drivers/net/nfp/flower/nfp_flower_ctrl.c @@ -208,7 +208,7 @@ nfp_flower_ctrl_vnic_xmit(struct nfp_app_fw_flower *app_fw_flower, txds->dma_len = txds->data_len; txds->dma_addr_hi = (dma_addr >> 32) & 0xff; txds->dma_addr_lo = (dma_addr & 0xffffffff); - txds->offset_eop = FLOWER_PKT_DATA_OFFSET | PCIE_DESC_TX_EOP; + txds->offset_eop = FLOWER_PKT_DATA_OFFSET | NFD3_DESC_TX_EOP; txq->wr_p++; if (unlikely(txq->wr_p == txq->tx_count)) /* wrapping?*/ diff --git a/drivers/net/nfp/nfd3/nfp_nfd3.h b/drivers/net/nfp/nfd3/nfp_nfd3.h index 90dd376f9a..7bf2349904 100644 --- a/drivers/net/nfp/nfd3/nfp_nfd3.h +++ b/drivers/net/nfp/nfd3/nfp_nfd3.h @@ -7,18 +7,18 @@ #define _NFP_NFD3_H_ /* TX descriptor format */ -#define PCIE_DESC_TX_EOP RTE_BIT32(7) -#define PCIE_DESC_TX_OFFSET_MASK (0x7F) /* [0,6] */ +#define NFD3_DESC_TX_EOP RTE_BIT32(7) +#define NFD3_DESC_TX_OFFSET_MASK (0x7F) /* [0,6] */ /* Flags in the host TX descriptor */ -#define PCIE_DESC_TX_CSUM RTE_BIT32(7) -#define PCIE_DESC_TX_IP4_CSUM RTE_BIT32(6) -#define PCIE_DESC_TX_TCP_CSUM RTE_BIT32(5) -#define PCIE_DESC_TX_UDP_CSUM RTE_BIT32(4) -#define PCIE_DESC_TX_VLAN RTE_BIT32(3) -#define PCIE_DESC_TX_LSO RTE_BIT32(2) -#define PCIE_DESC_TX_ENCAP RTE_BIT32(1) -#define PCIE_DESC_TX_O_IP4_CSUM RTE_BIT32(0) +#define NFD3_DESC_TX_CSUM RTE_BIT32(7) +#define NFD3_DESC_TX_IP4_CSUM RTE_BIT32(6) +#define NFD3_DESC_TX_TCP_CSUM RTE_BIT32(5) +#define NFD3_DESC_TX_UDP_CSUM RTE_BIT32(4) +#define NFD3_DESC_TX_VLAN RTE_BIT32(3) +#define NFD3_DESC_TX_LSO RTE_BIT32(2) +#define NFD3_DESC_TX_ENCAP RTE_BIT32(1) +#define NFD3_DESC_TX_O_IP4_CSUM RTE_BIT32(0) #define NFD3_TX_DESC_PER_PKT 1 @@ -33,7 +33,7 @@ struct nfp_net_nfd3_tx_desc { uint16_t mss; /* MSS to be used for LSO */ uint8_t lso_hdrlen; /* LSO, where the data starts */ - uint8_t flags; /* TX Flags, see @PCIE_DESC_TX_* */ + uint8_t flags; /* TX Flags, see @NFD3_DESC_TX_* */ union { struct { @@ -99,7 +99,7 @@ nfp_net_nfd3_tx_tso(struct nfp_net_txq *txq, } txd->mss = rte_cpu_to_le_16(mb->tso_segsz); - txd->flags = PCIE_DESC_TX_LSO; + txd->flags = NFD3_DESC_TX_LSO; return; @@ -127,26 +127,26 @@ nfp_net_nfd3_tx_cksum(struct nfp_net_txq *txq, /* Set TCP csum offload if TSO enabled. */ if ((ol_flags & RTE_MBUF_F_TX_TCP_SEG) != 0) - txd->flags |= PCIE_DESC_TX_TCP_CSUM; + txd->flags |= NFD3_DESC_TX_TCP_CSUM; /* IPv6 does not need checksum */ if ((ol_flags & RTE_MBUF_F_TX_IP_CKSUM) != 0) - txd->flags |= PCIE_DESC_TX_IP4_CSUM; + txd->flags |= NFD3_DESC_TX_IP4_CSUM; if ((ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) != 0) - txd->flags |= PCIE_DESC_TX_ENCAP; + txd->flags |= NFD3_DESC_TX_ENCAP; switch (ol_flags & RTE_MBUF_F_TX_L4_MASK) { case RTE_MBUF_F_TX_UDP_CKSUM: - txd->flags |= PCIE_DESC_TX_UDP_CSUM; + txd->flags |= NFD3_DESC_TX_UDP_CSUM; break; case RTE_MBUF_F_TX_TCP_CKSUM: - txd->flags |= PCIE_DESC_TX_TCP_CSUM; + txd->flags |= NFD3_DESC_TX_TCP_CSUM; break; } if ((ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_L4_MASK)) != 0) - txd->flags |= PCIE_DESC_TX_CSUM; + txd->flags |= NFD3_DESC_TX_CSUM; } uint16_t nfp_net_nfd3_xmit_pkts(void *tx_queue, diff --git a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c index 509d5b0c88..909156d69c 100644 --- a/drivers/net/nfp/nfd3/nfp_nfd3_dp.c +++ b/drivers/net/nfp/nfd3/nfp_nfd3_dp.c @@ -34,7 +34,7 @@ nfp_net_nfd3_tx_vlan(struct nfp_net_txq *txq, return; if ((mb->ol_flags & RTE_MBUF_F_TX_VLAN) != 0) { - txd->flags |= PCIE_DESC_TX_VLAN; + txd->flags |= NFD3_DESC_TX_VLAN; txd->vlan = mb->vlan_tci; } } @@ -201,7 +201,7 @@ nfp_net_nfd3_xmit_pkts(void *tx_queue, * the priority */ if (likely(pkt_size == 0)) - txds->offset_eop = PCIE_DESC_TX_EOP; + txds->offset_eop = NFD3_DESC_TX_EOP; else txds->offset_eop = 0; -- 2.39.1