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 3D6E7A0093; Thu, 11 Jun 2020 17:16:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 71012100C; Thu, 11 Jun 2020 17:16:24 +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 43A38100C for ; Thu, 11 Jun 2020 17:16:22 +0200 (CEST) Received: by mail-qv1-f65.google.com with SMTP id e2so2780256qvw.7 for ; Thu, 11 Jun 2020 08:16:22 -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=m3lsk0xQBQ2iXTa5ZaLS6puYNQegxRRpb/JqdW1zImU=; b=kBZFJ/tORrGT3uwkMZTvDZ4nGZElF6+O16uvGC77+5nB6ILDCbX37w5JzPl38EyDpH K3thb6z1LHZg5Pp3Ii5c3yMEPI29e0tR0zbmoDodoH8GJTAVNbCOfFMqnjd0HzkTmjfg h3ML1QLgHhK8NEDhhGLWOcRLCbLJnsQR5+II58lz3d4UNHRoG0tfdZpUSGNq+iVS2uuI LLi4QNd/GSU8HGAp1ZZ9EfqV1cVz2Zhp7rN0NZSOl3sFarxpxE3b2v928KJG2nCJ4Z/o La/iY1Rw2xDsm1e6dIZ9vBOUnlyjfCuR4tSZK/JWwQTTi1LVlwGG23iVODJygnxcrOpu buZw== 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=m3lsk0xQBQ2iXTa5ZaLS6puYNQegxRRpb/JqdW1zImU=; b=sDY6JdNWGEBED7tCSCbgpJwWwbA66thWnb/H8/rkMZBRV0TOkZv67m8UMtrvprq+l2 goBGciyxKwUHuB8+gjmLHGi8JQvvr3oId2o3NhHZoV/dhlHVPwNcSjJVyo640DGA9XPh Vb1CkUzl+KVGTBlEfQpDiEzObuG8YRMQUUDcX/ms6Be7kv1Bf5GQjOSKMBn3zdTwc8NE hZGVER+JERnAN7xE4kI1GJRYaEGgM4E6z/g1SH1ebfJaZY+4zYVx+dRCN88Gljn5VaVb 1QdiRQqgXsLvgVbjlim49UOf/X+XLgwjgwJLuzZG07kRpkEp9Ev8byco4C7sv7RXPqDV 2lBA== X-Gm-Message-State: AOAM5311Tt7zfhFHN0Ut8lhqKJjYODoUxWxReo8mqyO0CKowbVqu3zUF iWxe2Vqx7yG3nN6DJCUjpYGtJxd/UHwmMA== X-Google-Smtp-Source: ABdhPJwEbV8utQGetazgMcvma8eAL2m+sWJKAhKJX1dVT2tWsaZ5sHgN1kf0Nt8H4d2NQNJLI6/yeg== X-Received: by 2002:ad4:54ee:: with SMTP id k14mr8490408qvx.9.1591888581223; Thu, 11 Jun 2020 08:16:21 -0700 (PDT) Received: from localhost.localdomain (modemcable246.10-73-45.static.videotron.ca. [45.73.10.246]) by smtp.gmail.com with ESMTPSA id h77sm2524379qke.37.2020.06.11.08.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2020 08:16:20 -0700 (PDT) From: Patrick Keroulas To: dev@dpdk.org Cc: Patrick Keroulas Date: Thu, 11 Jun 2020 11:16:07 -0400 Message-Id: <20200611151610.32409-1-patrick.keroulas@radio-canada.ca> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [RFC][PATCH v2 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. RFC: The conversion is performed in Rx callback, in primary process because the required clock info carried by ibv_context is not shared with secundary process (pdump). Thus mbuf->timestamp is the chosen candidate to convey the nanoseconds to pdump, since doc says: "unit and time reference are not normalized but are always the same for a given port" Patrick Keroulas (3): net/mlx5: add counter-to-ns converter from libibverbs ethdev: add API to convert raw timestamps to nsec net/pcap: dump hardware timestamps drivers/common/mlx5/linux/mlx5_glue.c | 16 +++++++++++ drivers/common/mlx5/linux/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 | 35 +++++++++++++----------- 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 | 14 +++++++++- 12 files changed, 122 insertions(+), 18 deletions(-) -- 2.17.1