Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/82723/?format=api
http://patches.dpdk.org/api/patches/82723/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201029092751.3837177-12-thomas@monjalon.net/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20201029092751.3837177-12-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20201029092751.3837177-12-thomas@monjalon.net", "date": "2020-10-29T09:27:46", "name": "[11/15] net/pcap: switch timestamp to dynamic mbuf field", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "34de9cbf9e4a0b45678b5d76b5738d394a1eb353", "submitter": { "id": 685, "url": "http://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201029092751.3837177-12-thomas@monjalon.net/mbox/", "series": [ { "id": 13454, "url": "http://patches.dpdk.org/api/series/13454/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13454", "date": "2020-10-29T09:27:35", "name": "remove mbuf timestamp", "version": 1, "mbox": "http://patches.dpdk.org/series/13454/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/82723/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/82723/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2E283A04DD;\n\tThu, 29 Oct 2020 10:31:54 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E2C9DC972;\n\tThu, 29 Oct 2020 10:28:34 +0100 (CET)", "from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com\n [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id CB49EC93A\n for <dev@dpdk.org>; Thu, 29 Oct 2020 10:28:27 +0100 (CET)", "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.west.internal (Postfix) with ESMTP id 86EBA9F3;\n Thu, 29 Oct 2020 05:28:25 -0400 (EDT)", "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Thu, 29 Oct 2020 05:28:26 -0400", "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id 21283328005E;\n Thu, 29 Oct 2020 05:28:24 -0400 (EDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm2; bh=zreLXuW/VQbq1\n G/2toaLV/kjXG9nHBevfn/tWKO5IWE=; b=eujxcvGKzMqkH0XaVc4sJqU5ZFbpr\n 27FcxJkkm2eGFrZFa0JCTMYlB5ED5hr3eNnK8gi3baAEMDem9Z8yLZxx/8EnpWbd\n pxSO8pqqj5wnZ02XN3wYItOo3NjlvkD5IXrEo3jU2KlMsdZIfaA5sld4haqPUN+Q\n 4irWzUaMsIL9IjQoQj7dtKrOH+R6m//It/CFOqM5Xy6bhMD5yKvZXsAqEl40ceA7\n ZjVu2dB0KjOxgdqWJi0koe/wHuWeMmRqZJGbCEBwYNtTbV9Gfmw6K0Jl1tVW7qGz\n w1zw915JInEu7AFy9NMUPqqYoIb3AjmGDALYNg0MWWgDVav3IY53bvZLw==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm1; bh=zreLXuW/VQbq1G/2toaLV/kjXG9nHBevfn/tWKO5IWE=; b=Lku3PtUG\n dcm/eQWMrHTN3ctjDXrhcqwjJOs5EsJBMkfBc8NhDq1GzgPRmdQbhnODWtPpK5Y3\n JcvrdHP2DlQfX5JATMGnICClUuGjYvhvkaRwnuFN8XByghp8NHrBq4krBTWOj1ot\n +IKDJBBEaI4WhqKokNRoooqwezrBTwcrnvcxcC32CrL84UNH1kabVAzi7sU8mSIk\n BK6PzBnOksy5IZFeHb62Ic8BiA+EHpUB2lyNUeW/ALlJt2KEGOM/dTjknG/chQws\n vO6GFBjkBKr6tYOCTHNjDrQp1x9gSpNoF9OkDx6F++DqViasl9lVaqUU85IZZkwJ\n ZgdvDu/AeXqBTA==" ], "X-ME-Sender": "<xms:OYuaXy2VotPuH-og_39UHbI5MYYYFpBSCLhQN1xF-qF01Mg4Zxpxug>\n <xme:OYuaX1EOsgEUkGAtzL6_Td4Jj9X1RNbHfn9ZiqEeU3qEREk5mHFa5iCaAt6kZlDtm\n 6DvEL_VTdXARUwH2w>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedrleefgddthecutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd\n ertddtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehm\n ohhnjhgrlhhonhdrnhgvtheqnecuggftrfgrthhtvghrnhepleevudelgeeguddvveeute\n euheffgeeiudevuddvffdtveetuddthedtieetgfelnecuffhomhgrihhnpehtshdrthhv\n necukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtne\n curfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght", "X-ME-Proxy": "<xmx:OYuaX642uRnLZM6bW6iBsJWHypjX8Pfqf2kF6F2DiaMgqpxJNOODHw>\n <xmx:OYuaXz0ISOyEzDHrWyqntUKVdFzomIGwDsJF3CqFhW5sLooEvBCpkA>\n <xmx:OYuaX1EUkgyOjT4HSieY_aUqHdWsLRYTJjKvr8GKeG3v7JFqsFcbUw>\n <xmx:OYuaX-OUat8NnVDMEssHFoqp9u4ifSbI-0gLOntHUBkoTTuBKrkyZQ>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com, david.marchand@redhat.com,\n bruce.richardson@intel.com, olivier.matz@6wind.com,\n andrew.rybchenko@oktetlabs.ru, jerinj@marvell.com, viacheslavo@nvidia.com", "Date": "Thu, 29 Oct 2020 10:27:46 +0100", "Message-Id": "<20201029092751.3837177-12-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.28.0", "In-Reply-To": "<20201029092751.3837177-1-thomas@monjalon.net>", "References": "<20201029092751.3837177-1-thomas@monjalon.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 11/15] net/pcap: switch timestamp to dynamic mbuf\n\tfield", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The mbuf timestamp is moved to a dynamic field\nin order to allow removal of the deprecated static field.\nThe related mbuf flag is also replaced.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n drivers/net/pcap/rte_eth_pcap.c | 29 ++++++++++++++++++++++++++---\n 1 file changed, 26 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c\nindex 34e82317b1..b4b7a1839b 100644\n--- a/drivers/net/pcap/rte_eth_pcap.c\n+++ b/drivers/net/pcap/rte_eth_pcap.c\n@@ -18,6 +18,7 @@\n \n #include <pcap.h>\n \n+#include <rte_bitops.h>\n #include <rte_cycles.h>\n #include <rte_ethdev_driver.h>\n #include <rte_ethdev_vdev.h>\n@@ -51,6 +52,9 @@ static uint64_t start_cycles;\n static uint64_t hz;\n static uint8_t iface_idx;\n \n+static uint64_t timestamp_rx_dynflag;\n+static int timestamp_dynfield_offset = -1;\n+\n struct queue_stat {\n \tvolatile unsigned long pkts;\n \tvolatile unsigned long bytes;\n@@ -265,9 +269,11 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t}\n \n \t\tmbuf->pkt_len = (uint16_t)header.caplen;\n-\t\tmbuf->timestamp = (uint64_t)header.ts.tv_sec * 1000000\n-\t\t\t\t\t\t\t+ header.ts.tv_usec;\n-\t\tmbuf->ol_flags |= PKT_RX_TIMESTAMP;\n+\t\t*RTE_MBUF_DYNFIELD(mbuf, timestamp_dynfield_offset,\n+\t\t\trte_mbuf_timestamp_t *) =\n+\t\t\t\t(uint64_t)header.ts.tv_sec * 1000000 +\n+\t\t\t\theader.ts.tv_usec;\n+\t\tmbuf->ol_flags |= timestamp_rx_dynflag;\n \t\tmbuf->port = pcap_q->port_id;\n \t\tbufs[num_rx] = mbuf;\n \t\tnum_rx++;\n@@ -656,6 +662,23 @@ eth_dev_stop(struct rte_eth_dev *dev)\n static int\n eth_dev_configure(struct rte_eth_dev *dev __rte_unused)\n {\n+\tint timestamp_rx_dynflag_offset;\n+\n+\ttimestamp_dynfield_offset = rte_mbuf_dynfield_lookup(\n+\t\t\tRTE_MBUF_DYNFIELD_TIMESTAMP_NAME, NULL);\n+\tif (timestamp_dynfield_offset < 0) {\n+\t\tPMD_LOG(ERR, \"Failed to lookup timestamp field\");\n+\t\treturn -rte_errno;\n+\t}\n+\ttimestamp_rx_dynflag_offset = rte_mbuf_dynflag_lookup(\n+\t\t\tRTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME, NULL);\n+\tif (timestamp_rx_dynflag_offset < 0) {\n+\t\tPMD_LOG(ERR, \"Failed lookup Rx timestamp flag\");\n+\t\treturn -rte_errno;\n+\t}\n+\ttimestamp_rx_dynflag =\n+\t\tRTE_BIT64(timestamp_rx_dynflag_offset);\n+\n \treturn 0;\n }\n \n", "prefixes": [ "11/15" ] }{ "id": 82723, "url": "