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 8229641DB5; Thu, 2 Mar 2023 14:07:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F26A42D6C; Thu, 2 Mar 2023 14:06:33 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 70C2C42D39 for ; Thu, 2 Mar 2023 14:06:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1677762391; x=1709298391; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tgzrXYLJlSI0Pln/4aLHLUAX5GsYjc2MOUQg6YzEzNE=; b=nctEhX7GWOcfVQsWrpzuR1CQNFHh++N2nQEm8JKbM6+sTJw4F9HyEmOj UykGnmZMOD6pTa9mGkjNpDZlyBsqAA78yhRzV1UdO0SkUnM6wQpeYL/04 +nXZMtPNqinpn+XpM23Vk6T/OxAwY+2sWZljAxhiHW1uWEXqeHBhAkf/p tYR1XzoZ9KcOhNbSUlUFijiPrTveRugG7hszTDrDCJhYGlhmzDsiDKCXe OCIorH2DRUXD/jO64VX/NkPvG5SpvVfFrP9SBhcz7Nyf2nQm0tt+qrHir +XfUNExkDjUaAG5nUbAg2KwLhyXwVEWgDgy1LJ8dE51hpZ78JTlsxHTKJ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="322988296" X-IronPort-AV: E=Sophos;i="5.98,227,1673942400"; d="scan'208";a="322988296" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2023 05:06:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10636"; a="707406441" X-IronPort-AV: E=Sophos;i="5.98,227,1673942400"; d="scan'208";a="707406441" Received: from dpdk-mingxial-ice.sh.intel.com ([10.67.110.191]) by orsmga001.jf.intel.com with ESMTP; 02 Mar 2023 05:06:29 -0800 From: Mingxia Liu To: dev@dpdk.org, beilei.xing@intel.com, yuying.zhang@intel.com Cc: Mingxia Liu Subject: [PATCH v9 16/21] net/cpfl: support timestamp offload Date: Thu, 2 Mar 2023 21:20:52 +0000 Message-Id: <20230302212057.1114863-17-mingxia.liu@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230302212057.1114863-1-mingxia.liu@intel.com> References: <20230302103527.931071-1-mingxia.liu@intel.com> <20230302212057.1114863-1-mingxia.liu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Add support for timestamp offload. Signed-off-by: Mingxia Liu --- drivers/net/cpfl/cpfl_ethdev.c | 3 ++- drivers/net/cpfl/cpfl_rxtx.c | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c index e64cadfd38..ae716d104c 100644 --- a/drivers/net/cpfl/cpfl_ethdev.c +++ b/drivers/net/cpfl/cpfl_ethdev.c @@ -100,7 +100,8 @@ cpfl_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | RTE_ETH_RX_OFFLOAD_UDP_CKSUM | RTE_ETH_RX_OFFLOAD_TCP_CKSUM | - RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM; + RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM | + RTE_ETH_RX_OFFLOAD_TIMESTAMP; dev_info->tx_offload_capa = RTE_ETH_TX_OFFLOAD_IPV4_CKSUM | diff --git a/drivers/net/cpfl/cpfl_rxtx.c b/drivers/net/cpfl/cpfl_rxtx.c index a3832acd4f..ea28d3978c 100644 --- a/drivers/net/cpfl/cpfl_rxtx.c +++ b/drivers/net/cpfl/cpfl_rxtx.c @@ -516,6 +516,13 @@ cpfl_rx_queue_init(struct rte_eth_dev *dev, uint16_t rx_queue_id) return -EINVAL; } + err = idpf_qc_ts_mbuf_register(rxq); + if (err != 0) { + PMD_DRV_LOG(ERR, "fail to register timestamp mbuf %u", + rx_queue_id); + return -EIO; + } + if (rxq->adapter->is_rx_singleq) { /* Single queue */ err = idpf_qc_single_rxq_mbufs_alloc(rxq); -- 2.34.1