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 57E4A423C1; Fri, 13 Jan 2023 10:16:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9481B42E0A; Fri, 13 Jan 2023 10:15:32 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 4EC1942DCC for ; Fri, 13 Jan 2023 10:15:23 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673601323; x=1705137323; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Gl9osNA2vuhccntnApUjzNhzDEXNPwNXG6hsW1vkZhI=; b=N72khMBEt611qiUHqSJrwL5fMmgd6Yurcg0U4eC2qm1v51FmfNTngkwJ befkXs5kJC48Ov6840FRvt1dm5/3xzgH0h6he0ayqZsgM1hVYIyquvvbh 5GUwF/VpFrrdEoROicLZ0ccUA5CBBdJbOQyEpFBkRSTWM1J8Vc7Xk08AF cO7JNUrrTQxyOwT0g1Z9GkyLS9bUOhSIruTHwfFhbuUkWc11iHRzpLiTc kmakaEKvvZkNayNWORyzfg/K0TYKbquO8Wjjy6TzuH5F8l+lHy/UadqeZ BqC0zxL7IOiKflKqWigW429T8ERslxY54vqVC8zPoChdT9+7e6C11bJ8Z w==; X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="304332566" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="304332566" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2023 01:15:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10588"; a="903522731" X-IronPort-AV: E=Sophos;i="5.97,213,1669104000"; d="scan'208";a="903522731" Received: from dpdk-mingxial-01.sh.intel.com ([10.67.119.167]) by fmsmga006.fm.intel.com with ESMTP; 13 Jan 2023 01:15:21 -0800 From: Mingxia Liu To: dev@dpdk.org, qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: wenjun1.wu@intel.com, Mingxia Liu Subject: [PATCH v2 16/21] net/cpfl: support timestamp offload Date: Fri, 13 Jan 2023 08:19:26 +0000 Message-Id: <20230113081931.221576-17-mingxia.liu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230113081931.221576-1-mingxia.liu@intel.com> References: <20221223015558.3143279-1-mingxia.liu@intel.com> <20230113081931.221576-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 --- doc/guides/nics/features/cpfl.ini | 1 + drivers/net/cpfl/cpfl_ethdev.c | 3 ++- drivers/net/cpfl/cpfl_rxtx.c | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/features/cpfl.ini b/doc/guides/nics/features/cpfl.ini index f4e45c7c68..c1209df3e5 100644 --- a/doc/guides/nics/features/cpfl.ini +++ b/doc/guides/nics/features/cpfl.ini @@ -11,6 +11,7 @@ MTU update = Y TSO = P L3 checksum offload = P L4 checksum offload = P +Timestamp offload = P Linux = Y x86-32 = Y x86-64 = Y diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c index a4ebbb9821..5fc40f8298 100644 --- a/drivers/net/cpfl/cpfl_ethdev.c +++ b/drivers/net/cpfl/cpfl_ethdev.c @@ -103,7 +103,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 a5bb3c728b..3101e59ee1 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_register_ts_mbuf(rxq); + if (err != 0) { + PMD_DRV_LOG(ERR, "fail to register timestamp mbuf %u", + rx_queue_id); + return -EIO; + } + if (rxq->bufq1 == NULL) { /* Single queue */ err = idpf_alloc_single_rxq_mbufs(rxq); -- 2.25.1