From patchwork Tue Feb 23 06:14:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 386249 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp1905274jap; Mon, 22 Feb 2021 22:26:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOV+J1+Xeg8PC+35NrjeTEM8Es3pGqK1g/9qOdKtMDHjq4Svy8z1nH9/o7W8xMRAug8F42 X-Received: by 2002:a17:906:2bce:: with SMTP id n14mr23477022ejg.171.1614061577326; Mon, 22 Feb 2021 22:26:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614061577; cv=none; d=google.com; s=arc-20160816; b=MOO9yx/1hUH70oFcJZJUUkCFynwe/8LoR/LPBUN5e+CxQBB2KxuYptFpmf1Y8wJYJR za2iN6FX1HucdxILx4THUTkVywJ22w3zBeSEVSpFsAXU/kDmXldGXVg0bxDocUAQo2kb kEEd9wbnyQaMzm6crNWr4MnIbRDH50zTngrqZHr53F7+0zm+q5CtPXvIrhnHIHPHvBuC IbAZtGrcz8eC9k5rl1EP0yQugxa+o7H24hJgOIC96lluOTW7pSt8YKn9tklKTj4Fcp+8 937M80Zi6p6kI7/Z/2eQDUKi6HCvTv485agQXiwZrwTvP9HhFXM7w6/MG6p/XqrLba8F PBFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:cc:to :from; bh=a6qX0ihwGhyTxfuU40sAwrA1Ow/0h4k9cCZUTpvjt5s=; b=cT6+k918eqyyGhJ2dh8c6C4f5JnU13AzMexywWpeaZvqTOKwUpn235Fx9z2z0loOyw KxEGYEieWwmVXLhVzbBoYn/YPRfZZ4RI2jVsyJY4pEMUxAkuG3/4DbHy2DNciQzaEQPT FoghsFVjO21PZXw4QgYiRrYj5h8g6Js+jm8G6eGfS3SQfjP07lgc4v9RQAbi7bKfvDuq zf+OfjvmxgY8dWSf96LaMv+NCOv2S1Hfw7WHvHaXd2UBqInAe3D7KYbNsXQOJh05C+6w tSn6OPmRcoIdNATpr0705WESSZd8g2kkfiEDz7hF8zlI7VH+8u5YE2LlqW491EFgyAgB dVag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id n13si10416908eja.132.2021.02.22.22.26.17; Mon, 22 Feb 2021 22:26:17 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3C2C4067A; Tue, 23 Feb 2021 07:26:16 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 4E37740041 for ; Tue, 23 Feb 2021 07:26:15 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 05DA31A0270; Tue, 23 Feb 2021 07:26:15 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E50CA1A06EF; Tue, 23 Feb 2021 07:26:12 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4448E40324; Tue, 23 Feb 2021 07:26:10 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org, kirill.rybalchenko@intel.com Cc: Gagandeep Singh Date: Tue, 23 Feb 2021 11:44:12 +0530 Message-Id: <20210223061412.22827-1-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH] ptpclient: enable timestamp offload support 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 Sender: "dev" This patch add support to enabled rx offload for timestamp. It is required to be enabled for some pmds e.g. dpaa2 Signed-off-by: Gagandeep Singh Signed-off-by: Hemant Agrawal --- examples/ptpclient/ptpclient.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 Acked-by: Kirill Rybalchenko diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c index 09968cdfc..33b297e37 100644 --- a/examples/ptpclient/ptpclient.c +++ b/examples/ptpclient/ptpclient.c @@ -197,6 +197,9 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool) return retval; } + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TIMESTAMP) + port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_TIMESTAMP; + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MBUF_FAST_FREE) port_conf.txmode.offloads |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;