From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C818AA0513; Tue, 9 Jun 2020 16:17:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42CCA37AF; Tue, 9 Jun 2020 16:17:20 +0200 (CEST) Received: from mail-qv1-f65.google.com (mail-qv1-f65.google.com [209.85.219.65]) by dpdk.org (Postfix) with ESMTP id 660BA1F28 for ; Tue, 9 Jun 2020 16:17:19 +0200 (CEST) Received: by mail-qv1-f65.google.com with SMTP id fc4so10150674qvb.1 for ; Tue, 09 Jun 2020 07:17:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=radio-canada-ca.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=gdomGGZOWadO9eIRWsI28ZKSbYFcDidI7GXpxMOdSRI=; b=I/lrnWDleI6w9B2hhSs3lCZ3vsDJN9ieh67y4cPXkUd9yboMcIz1dbQHn4RjoE599b alMVeDXCU4ELedQOfObrZW5U0HmG8joH+i5+IbQ8WDL6rTNYkzdXReIymUhWRiCg96g8 lP1CXDJKAJwLh/UbDOXiH/1jxomSsCfGoybyh+JUYltgLKS+e34Zk9ommSQsdSoc55Gg mMufRpyNJLYCoHtcHhpzY81J8ehrGLT920Jsvgy/3N8ON5GQq7FsrRHY8XH+8eA2RA2/ Xx5v15QF9L7AE+WE6AwqiqPBV3SUHmIfctWVf2pm2ZvmZE9L5Azal9UH55uHPAIw6r/9 GsdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gdomGGZOWadO9eIRWsI28ZKSbYFcDidI7GXpxMOdSRI=; b=rrvgMSbAJ9LTA7uU8RgKSPso4PACGVCQ442u4TxWxxaObs2mRBGgZAnCNNqJuOip4a a+THjyydyE857bN2Ef95HM2P0fgohSj3TRujZQIJIAHmIDUwWaMIHXhkWyIFPNbFVtmp aUJrxbUNGM9piu3fhO0rAt49KRXhPWE4Mm7Xlq/Aj5iD0tHdfsonDGfZN3Quun9YsxEp J58iavC8VpG8BW+G1NUgq0SAthweJTus1p7HhIHXx1OXYmM6pnb3DaEEVbWZzL+d47Wf ovL44so6+nDU27MBFrw3w553o/M3xgSnR4u6jrI7Hr1nVQVT1n4YjefrMQTtauyq9pea kOIw== X-Gm-Message-State: AOAM532FpZlOmzvBG6+sbSo6gEG/ymAbRyuEYd+uza6wWkDf4w6HeQ4N mZ/ZHUNKOc338ZI5sajhHJAaMi8rwjsPLg== X-Google-Smtp-Source: ABdhPJwWxoLJIXdGZSaHO962mMpMezcdO/fSApl5ADIxCk3GVH5jAza03z3xefyXklEj0Il5lPDwBg== X-Received: by 2002:ad4:54aa:: with SMTP id r10mr4185201qvy.6.1591712238542; Tue, 09 Jun 2020 07:17:18 -0700 (PDT) Received: from localhost.localdomain (104-163-142-249.qc.dsl.ebox.net. [104.163.142.249]) by smtp.gmail.com with ESMTPSA id a82sm10287148qkb.29.2020.06.09.07.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2020 07:17:18 -0700 (PDT) From: Patrick Keroulas To: dev@dpdk.org Cc: Patrick Keroulas Date: Tue, 9 Jun 2020 10:17:10 -0400 Message-Id: <20200609141713.11614-1-patrick.keroulas@radio-canada.ca> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [RFC] [PATCH v1 0/3] pdump HW timestamps for mlx5 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" The intention is to produce a pcap with nanosecond precision when timestamp offloading is activated on mlx5 NIC. The packets forwarded by testpmd hold the raw counter but a pcap requires a time unit. Assuming that the NIC clock is already synced with external master clock, this patchset simply integrates the nanosecond converter that is already implemented by ibverbs. The conversion is performed is pdump rx callback. Patrick Keroulas (3): net/mlx5: add timestamp-to-ns converter from libibverbs ethdev: add API to convert raw timestamps to nsec net/pcap: dump hardware timestamps drivers/common/mlx5/mlx5_glue.c | 16 ++++++++++++ drivers/common/mlx5/mlx5_glue.h | 4 +++ drivers/net/mlx5/mlx5.c | 1 + drivers/net/mlx5/mlx5.h | 1 + drivers/net/mlx5/mlx5_ethdev.c | 30 ++++++++++++++++++++++ drivers/net/pcap/rte_eth_pcap.c | 32 ++++++++++++++++-------- lib/librte_ethdev/rte_ethdev.c | 12 +++++++++ lib/librte_ethdev/rte_ethdev.h | 17 +++++++++++++ lib/librte_ethdev/rte_ethdev_core.h | 5 ++++ lib/librte_ethdev/rte_ethdev_version.map | 2 ++ lib/librte_mbuf/rte_mbuf_core.h | 3 ++- lib/librte_pdump/rte_pdump.c | 15 ++++++++++- 12 files changed, 126 insertions(+), 12 deletions(-) -- 2.17.1