get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/104933/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 104933,
    "url": "http://patchwork.dpdk.org/api/patches/104933/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20211206121824.3493-6-nipun.gupta@nxp.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20211206121824.3493-6-nipun.gupta@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211206121824.3493-6-nipun.gupta@nxp.com",
    "date": "2021-12-06T12:18:12",
    "name": "[05/17] net/dpaa2: fix timestamping for IEEE1588",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1611925feda8c01050a6590db441fd796a87ca92",
    "submitter": {
        "id": 471,
        "url": "http://patchwork.dpdk.org/api/people/471/?format=api",
        "name": "Nipun Gupta",
        "email": "nipun.gupta@nxp.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20211206121824.3493-6-nipun.gupta@nxp.com/mbox/",
    "series": [
        {
            "id": 20873,
            "url": "http://patchwork.dpdk.org/api/series/20873/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20873",
            "date": "2021-12-06T12:18:07",
            "name": "features and fixes on NXP eth devices",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/20873/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/104933/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/104933/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 5C763A034F;\n\tMon,  6 Dec 2021 13:19:01 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7D3CF4272F;\n\tMon,  6 Dec 2021 13:18:35 +0100 (CET)",
            "from inva020.nxp.com (inva020.nxp.com [92.121.34.13])\n by mails.dpdk.org (Postfix) with ESMTP id 589CC41180;\n Mon,  6 Dec 2021 13:18:29 +0100 (CET)",
            "from inva020.nxp.com (localhost [127.0.0.1])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 38EBD1A134E;\n Mon,  6 Dec 2021 13:18:29 +0100 (CET)",
            "from aprdc01srsp001v.ap-rdc01.nxp.com\n (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16])\n by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id CBC241A1320;\n Mon,  6 Dec 2021 13:18:28 +0100 (CET)",
            "from lsv03274.swis.in-blr01.nxp.com (lsv03274.swis.in-blr01.nxp.com\n [92.120.147.114])\n by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 34547183AC96;\n Mon,  6 Dec 2021 20:18:28 +0800 (+08)"
        ],
        "From": "nipun.gupta@nxp.com",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, ferruh.yigit@intel.com, hemant.agrawal@nxp.com,\n stable@dpdk.org, Vanshika Shukla <vanshika.shukla@nxp.com>",
        "Subject": "[PATCH 05/17] net/dpaa2: fix timestamping for IEEE1588",
        "Date": "Mon,  6 Dec 2021 17:48:12 +0530",
        "Message-Id": "<20211206121824.3493-6-nipun.gupta@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20211206121824.3493-1-nipun.gupta@nxp.com>",
        "References": "<20211206121824.3493-1-nipun.gupta@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "From: Vanshika Shukla <vanshika.shukla@nxp.com>\n\nThe current implementation of DPAA2 driver code is such\nthat it records Rx and Tx timestamp for PTP without checking\nif they are PTP packets or not. Packets for which\nRTE_MBUF_F_RX_IEEE1588_TMST and RTE_MBUF_F_TX_IEEE1588_TMST\nis not set, Rx and Tx timestamp should not be recorded.\n\nThis patch fixes this issue by checking if the required\nflags are set in the mbuf before recording timestamps.\n\nAlso this change defines separate values for\nDPAA2_TX_CONF_ENABLE and DPAA2_NO_PREFETCH_RX\n\nFixes: e806bf878c17 (\"net/dpaa2: support timestamp\")\nCc: stable@dpdk.org\n\nSigned-off-by: Vanshika Shukla <vanshika.shukla@nxp.com>\n---\n drivers/net/dpaa2/dpaa2_ethdev.h |  2 +-\n drivers/net/dpaa2/dpaa2_ptp.c    |  8 ++++---\n drivers/net/dpaa2/dpaa2_rxtx.c   | 39 +++++++++++++++++++++++++-------\n 3 files changed, 37 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h\nindex c5e9267bf0..c21571e63d 100644\n--- a/drivers/net/dpaa2/dpaa2_ethdev.h\n+++ b/drivers/net/dpaa2/dpaa2_ethdev.h\n@@ -62,7 +62,7 @@\n /* Disable RX tail drop, default is enable */\n #define DPAA2_RX_TAILDROP_OFF\t0x04\n /* Tx confirmation enabled */\n-#define DPAA2_TX_CONF_ENABLE\t0x08\n+#define DPAA2_TX_CONF_ENABLE\t0x06\n \n #define DPAA2_RSS_OFFLOAD_ALL ( \\\n \tRTE_ETH_RSS_L2_PAYLOAD | \\\ndiff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c\nindex 8d79e39244..3a4536dd69 100644\n--- a/drivers/net/dpaa2/dpaa2_ptp.c\n+++ b/drivers/net/dpaa2/dpaa2_ptp.c\n@@ -111,10 +111,12 @@ int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev,\n {\n \tstruct dpaa2_dev_priv *priv = dev->data->dev_private;\n \n-\tif (priv->next_tx_conf_queue)\n-\t\tdpaa2_dev_tx_conf(priv->next_tx_conf_queue);\n-\telse\n+\tif (priv->next_tx_conf_queue) {\n+\t\twhile (!priv->tx_timestamp)\n+\t\t\tdpaa2_dev_tx_conf(priv->next_tx_conf_queue);\n+\t} else {\n \t\treturn -1;\n+\t}\n \t*timestamp = rte_ns_to_timespec(priv->tx_timestamp);\n \n \treturn 0;\ndiff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c\nindex c65589a5f3..ee3ed1b152 100644\n--- a/drivers/net/dpaa2/dpaa2_rxtx.c\n+++ b/drivers/net/dpaa2/dpaa2_rxtx.c\n@@ -140,8 +140,10 @@ dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,\n \t\t\tannotation->word3, annotation->word4);\n \n #if defined(RTE_LIBRTE_IEEE1588)\n-\tif (BIT_ISSET_AT_POS(annotation->word1, DPAA2_ETH_FAS_PTP))\n+\tif (BIT_ISSET_AT_POS(annotation->word1, DPAA2_ETH_FAS_PTP)) {\n \t\tmbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_PTP;\n+\t\tmbuf->ol_flags |= RTE_MBUF_F_RX_IEEE1588_TMST;\n+\t}\n #endif\n \n \tif (BIT_ISSET_AT_POS(annotation->word3, L2_VLAN_1_PRESENT)) {\n@@ -769,7 +771,10 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\telse\n \t\t\tbufs[num_rx] = eth_fd_to_mbuf(fd, eth_data->port_id);\n #if defined(RTE_LIBRTE_IEEE1588)\n-\t\tpriv->rx_timestamp = *dpaa2_timestamp_dynfield(bufs[num_rx]);\n+\t\tif (bufs[num_rx]->ol_flags & PKT_RX_IEEE1588_TMST) {\n+\t\t\tpriv->rx_timestamp =\n+\t\t\t\t*dpaa2_timestamp_dynfield(bufs[num_rx]);\n+\t\t}\n #endif\n \n \t\tif (eth_data->dev_conf.rxmode.offloads &\n@@ -986,6 +991,13 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\t\tbufs[num_rx] = eth_fd_to_mbuf(fd,\n \t\t\t\t\t\t\teth_data->port_id);\n \n+#if defined(RTE_LIBRTE_IEEE1588)\n+\t\tif (bufs[num_rx]->ol_flags & PKT_RX_IEEE1588_TMST) {\n+\t\t\tpriv->rx_timestamp =\n+\t\t\t\t*dpaa2_timestamp_dynfield(bufs[num_rx]);\n+\t\t}\n+#endif\n+\n \t\tif (eth_data->dev_conf.rxmode.offloads &\n \t\t\t\tRTE_ETH_RX_OFFLOAD_VLAN_STRIP) {\n \t\t\trte_vlan_strip(bufs[num_rx]);\n@@ -1021,6 +1033,8 @@ uint16_t dpaa2_dev_tx_conf(void *queue)\n \tstruct rte_eth_dev_data *eth_data = dpaa2_q->eth_data;\n \tstruct dpaa2_dev_priv *priv = eth_data->dev_private;\n \tstruct dpaa2_annot_hdr *annotation;\n+\tvoid *v_addr;\n+\tstruct rte_mbuf *mbuf;\n #endif\n \n \tif (unlikely(!DPAA2_PER_LCORE_DPIO)) {\n@@ -1105,10 +1119,16 @@ uint16_t dpaa2_dev_tx_conf(void *queue)\n \t\t\tnum_tx_conf++;\n \t\t\tnum_pulled++;\n #if defined(RTE_LIBRTE_IEEE1588)\n-\t\t\tannotation = (struct dpaa2_annot_hdr *)((size_t)\n-\t\t\t\tDPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) +\n-\t\t\t\tDPAA2_FD_PTA_SIZE);\n-\t\t\tpriv->tx_timestamp = annotation->word2;\n+\t\t\tv_addr = DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd));\n+\t\t\tmbuf = DPAA2_INLINE_MBUF_FROM_BUF(v_addr,\n+\t\t\t\trte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size);\n+\n+\t\t\tif (mbuf->ol_flags & PKT_TX_IEEE1588_TMST) {\n+\t\t\t\tannotation = (struct dpaa2_annot_hdr *)((size_t)\n+\t\t\t\t\tDPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) +\n+\t\t\t\t\tDPAA2_FD_PTA_SIZE);\n+\t\t\t\tpriv->tx_timestamp = annotation->word2;\n+\t\t\t}\n #endif\n \t\t} while (pending);\n \n@@ -1184,8 +1204,11 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t * corresponding to last packet transmitted for reading\n \t * the timestamp\n \t */\n-\tpriv->next_tx_conf_queue = dpaa2_q->tx_conf_queue;\n-\tdpaa2_dev_tx_conf(dpaa2_q->tx_conf_queue);\n+\tif ((*bufs)->ol_flags & PKT_TX_IEEE1588_TMST) {\n+\t\tpriv->next_tx_conf_queue = dpaa2_q->tx_conf_queue;\n+\t\tdpaa2_dev_tx_conf(dpaa2_q->tx_conf_queue);\n+\t\tpriv->tx_timestamp = 0;\n+\t}\n #endif\n \n \t/*Prepare enqueue descriptor*/\n",
    "prefixes": [
        "05/17"
    ]
}