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 1723442B47; Fri, 19 May 2023 10:37:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E25CB42D3D; Fri, 19 May 2023 10:37:01 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id CAF7740F16; Fri, 19 May 2023 10:36:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684485420; x=1716021420; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=K23Vq53WXCYzyAgvsvJGqzcwdkYN5kNhmrPojHxNngA=; b=AfNWvDwb0ueZk33PzM4bGX9y1YbZVnq6025UNPrzCPRDNNjw0okD8G52 acinMnxlkuXVdSkV91mOphuceDDYBFsKMq92Hd3aYQ8vdX4nCtUIJN2Fh LiooOKDq++ZKy+KmUpyvB7sIsrRh+9dGA7WB0Sfrtdy+Ck03GFtt+prEn 0IB/RYNceitfdrjcauDdprS6TBhp8pstLfatgQ6SdkFX8rWy0Y1MOGQ33 lsphD/EQlgAGP4EEU9u6yCQgmdGKB6HzpaULNnEFzuzO0ognCat/FK3Z6 Rl8s3LO2PMHk8uglKYpwB8rELzp6ypO62IfJBHItkWAmOcTluaPaVN/cb g==; X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="354670376" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="354670376" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2023 01:36:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10714"; a="772216228" X-IronPort-AV: E=Sophos;i="6.00,176,1681196400"; d="scan'208";a="772216228" Received: from dpdk-wenjing-01.sh.intel.com ([10.67.118.161]) by fmsmga004.fm.intel.com with ESMTP; 19 May 2023 01:36:57 -0700 From: Wenjing Qiao To: jingjing.wu@intel.com, beilei.xing@intel.com, qi.z.zhang@intel.com Cc: dev@dpdk.org, mingxia.liu@intel.com, Wenjing Qiao , stable@dpdk.org Subject: [PATCH v4 2/7] net/idpf: save main time by alarm Date: Fri, 19 May 2023 04:31:05 -0400 Message-Id: <20230519083110.809913-3-wenjing.qiao@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230519083110.809913-1-wenjing.qiao@intel.com> References: <20230424091707.488045-2-wenjing.qiao@intel.com> <20230519083110.809913-1-wenjing.qiao@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 Using alarm to save main time from registers every 1 second. Fixes: 8c6098afa075 ("common/idpf: add Rx/Tx data path") Cc: stable@dpdk.org Signed-off-by: Wenjing Qiao --- drivers/net/idpf/idpf_ethdev.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c index 7a33b9eb6a..21f3d0f76a 100644 --- a/drivers/net/idpf/idpf_ethdev.c +++ b/drivers/net/idpf/idpf_ethdev.c @@ -761,6 +761,9 @@ idpf_dev_start(struct rte_eth_dev *dev) goto err_vec; } + if (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) + idpf_rx_timestamp_start(base); + ret = idpf_vc_vectors_alloc(vport, req_vecs_num); if (ret != 0) { PMD_DRV_LOG(ERR, "Failed to allocate interrupt vectors"); @@ -808,6 +811,7 @@ static int idpf_dev_stop(struct rte_eth_dev *dev) { struct idpf_vport *vport = dev->data->dev_private; + struct idpf_adapter *base = vport->adapter; if (dev->data->dev_started == 0) return 0; @@ -820,6 +824,9 @@ idpf_dev_stop(struct rte_eth_dev *dev) idpf_vc_vectors_dealloc(vport); + if (dev->data->dev_conf.rxmode.offloads & RTE_ETH_RX_OFFLOAD_TIMESTAMP) + idpf_rx_timestamp_stop(base); + return 0; } -- 2.25.1