get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 139821,
    "url": "http://patches.dpdk.org/api/patches/139821/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240502213618.11391-10-stephen@networkplumber.org/",
    "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": "<20240502213618.11391-10-stephen@networkplumber.org>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240502213618.11391-10-stephen@networkplumber.org",
    "date": "2024-05-02T21:31:45",
    "name": "[v12,09/12] net/tap: simplify internals",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b4ce0b6bf9038e0bae90c4b1f667057884287130",
    "submitter": {
        "id": 27,
        "url": "http://patches.dpdk.org/api/people/27/?format=api",
        "name": "Stephen Hemminger",
        "email": "stephen@networkplumber.org"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240502213618.11391-10-stephen@networkplumber.org/mbox/",
    "series": [
        {
            "id": 31871,
            "url": "http://patches.dpdk.org/api/series/31871/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31871",
            "date": "2024-05-02T21:31:36",
            "name": "net/tap: RSS and other fixes",
            "version": 12,
            "mbox": "http://patches.dpdk.org/series/31871/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/139821/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/139821/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 D037343F6C;\n\tThu,  2 May 2024 23:37:31 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 677DF4069F;\n\tThu,  2 May 2024 23:36:43 +0200 (CEST)",
            "from mail-pg1-f169.google.com (mail-pg1-f169.google.com\n [209.85.215.169])\n by mails.dpdk.org (Postfix) with ESMTP id 1196440647\n for <dev@dpdk.org>; Thu,  2 May 2024 23:36:36 +0200 (CEST)",
            "by mail-pg1-f169.google.com with SMTP id\n 41be03b00d2f7-5e42b4bbfa4so5207445a12.1\n for <dev@dpdk.org>; Thu, 02 May 2024 14:36:35 -0700 (PDT)",
            "from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226])\n by smtp.gmail.com with ESMTPSA id\n f14-20020a056a001ace00b006f3eee787d5sm1804829pfv.18.2024.05.02.14.36.34\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 02 May 2024 14:36:34 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714685795;\n x=1715290595; darn=dpdk.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=IbN2sX0BP0OYIDnVo5eo29NaVs4GWK+wgdCR6uTImtw=;\n b=kPrcCJ8sBHG1WBWy30bob/3KMf9sIszV1GDBFdex4uf8Ggaz7mZ1EI3Imh2d2qzNlM\n rLZPBBRcfKaoGJkSyNix4cnx8HzhYwy9UFotzbK8H/PJTquHSfJix+7SnaslJHnAtyiA\n N7vNu7ZVx0WJ+eshKTYAdZbhHSiqz2E+XswxOLKLIkyjSQDarjQ6tV5KpJy3A62oudFN\n DFfoi0HovsaAlW74+x+jrSUhMHmfyDl+mXFldVH4hNMsBbxS1b/eLbjQHcdHkqm4nLFP\n Hh9EI0t0FPq24DXogO/RyoHeXUeEeanVrFoT0eTLukzTtLOn8NfQoE5eDwReD7jYRFs8\n ZJ3A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1714685795; x=1715290595;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n :subject:date:message-id:reply-to;\n bh=IbN2sX0BP0OYIDnVo5eo29NaVs4GWK+wgdCR6uTImtw=;\n b=qjb1TAKrOipmyyOMOkYsJAlI18YmlaL5jPJ5OOZPltPN+tZj2cAKp/1bzOYEzzOnb/\n JTeKPC4ch9S8z9Z7a19SygccfRVAP0jmDdh0weOEuFrVT39EJYh83Y2XKau+Z2PL4vrT\n d4aGO8eagbg1BwRaRGS88NyMzV+Dv2W9YexRky/GaW+qcSS0V3d7s2FoJ1l3KVV7sW5I\n 502e8+tJQ5mJq/oc2+OZz6oyZLhafmc0ls1SyjYvYFmJS/u16gaLpbeMaCka4PAccsIh\n +aWoOSAol0EyvpBIM+BZqDcsZVAtGAtZQutA2qlnnFYdqK+fdNozX5p2BDJ/EWZiWNCF\n 91fQ==",
        "X-Gm-Message-State": "AOJu0Yz3uFgfC4eRvZrmnCYqXv0r0D8BdP0CHOhonpFKTvO1y6oOanIu\n B61av+1lDGhwTAdH4XRGJ7At4zLYm9ZcO8TqCcEWDyIe2z3jDott80cDLz8C+6OQppaQerihdp2\n 40VC+eg==",
        "X-Google-Smtp-Source": "\n AGHT+IFzF2wEZ8ZhWY9E/eYWTCDMHdBpJIfWzxsT7KfSXlGopHSCLPtqyo6vyCC9zRjxyEaprv/d7A==",
        "X-Received": "by 2002:a05:6a20:d493:b0:1a7:aecd:997c with SMTP id\n im19-20020a056a20d49300b001a7aecd997cmr1188278pzb.0.1714685795156;\n Thu, 02 May 2024 14:36:35 -0700 (PDT)",
        "From": "Stephen Hemminger <stephen@networkplumber.org>",
        "To": "dev@dpdk.org",
        "Cc": "Stephen Hemminger <stephen@networkplumber.org>",
        "Subject": "[PATCH v12 09/12] net/tap: simplify internals",
        "Date": "Thu,  2 May 2024 14:31:45 -0700",
        "Message-ID": "<20240502213618.11391-10-stephen@networkplumber.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20240502213618.11391-1-stephen@networkplumber.org>",
        "References": "<20240130034925.44869-1-stephen@networkplumber.org>\n <20240502213618.11391-1-stephen@networkplumber.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "The names of Linux network devices are IFNAMSIZ(16) not the\nsame as DPDK which has up to 64 characters. Don't need to\nhold onto the whole ifreq to save the remote interface flags.\n\nMake sure packet and byte counters are read once, so that global\nand per-queue values add up. No need for separate rx_nombuf counter\nsince there is an alloc_failed value in ethdev.\n\nKeep only the statistics that are used. I.e no ipackets on\ntx queues etc.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n drivers/net/tap/rte_eth_tap.c | 138 ++++++++++++++++++----------------\n drivers/net/tap/rte_eth_tap.h |  22 +++---\n 2 files changed, 83 insertions(+), 77 deletions(-)",
    "diff": "diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c\nindex d847565073..3614aaf1dc 100644\n--- a/drivers/net/tap/rte_eth_tap.c\n+++ b/drivers/net/tap/rte_eth_tap.c\n@@ -46,6 +46,11 @@\n #include <tap_netlink.h>\n #include <tap_tcmsgs.h>\n \n+/* Used to snapshot statistics */\n+#ifndef READ_ONCE\n+#define READ_ONCE(var) (*((volatile typeof(var) *)(&(var))))\n+#endif\n+\n /* Linux based path to the TUN device */\n #define TUN_TAP_DEV_PATH        \"/dev/net/tun\"\n #define DEFAULT_TAP_NAME        \"dtap\"\n@@ -212,7 +217,7 @@ tun_alloc(struct pmd_internals *pmd, int is_keepalive, int persistent)\n \t * and need to find the resulting device.\n \t */\n \tTAP_LOG(DEBUG, \"Device name is '%s'\", ifr.ifr_name);\n-\tstrlcpy(pmd->name, ifr.ifr_name, RTE_ETH_NAME_MAX_LEN);\n+\tstrlcpy(pmd->name, ifr.ifr_name, IFNAMSIZ);\n \n \tif (is_keepalive) {\n \t\t/*\n@@ -454,7 +459,7 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \n \t\t/* Packet couldn't fit in the provided mbuf */\n \t\tif (unlikely(rxq->pi.flags & TUN_PKT_STRIP)) {\n-\t\t\trxq->stats.ierrors++;\n+\t\t\trxq->stats.errors++;\n \t\t\tcontinue;\n \t\t}\n \n@@ -466,7 +471,8 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\tstruct rte_mbuf *buf = rte_pktmbuf_alloc(rxq->mp);\n \n \t\t\tif (unlikely(!buf)) {\n-\t\t\t\trxq->stats.rx_nombuf++;\n+\t\t\t\trte_eth_devices[rxq->in_port].data->rx_mbuf_alloc_failed++;\n+\n \t\t\t\t/* No new buf has been allocated: do nothing */\n \t\t\t\tif (!new_tail || !seg)\n \t\t\t\t\tgoto end;\n@@ -511,8 +517,8 @@ pmd_rx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\tnum_rx_bytes += mbuf->pkt_len;\n \t}\n end:\n-\trxq->stats.ipackets += num_rx;\n-\trxq->stats.ibytes += num_rx_bytes;\n+\trxq->stats.packets += num_rx;\n+\trxq->stats.bytes += num_rx_bytes;\n \n \tif (trigger && num_rx < nb_pkts)\n \t\trxq->trigger_seen = trigger;\n@@ -692,7 +698,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\ttso_segsz = mbuf_in->tso_segsz + hdrs_len;\n \t\t\tif (unlikely(tso_segsz == hdrs_len) ||\n \t\t\t\ttso_segsz > *txq->mtu) {\n-\t\t\t\ttxq->stats.errs++;\n+\t\t\t\ttxq->stats.errors++;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\tgso_ctx->gso_size = tso_segsz;\n@@ -730,7 +736,7 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\tret = tap_write_mbufs(txq, num_mbufs, mbuf,\n \t\t\t\t&num_packets, &num_tx_bytes);\n \t\tif (ret == -1) {\n-\t\t\ttxq->stats.errs++;\n+\t\t\ttxq->stats.errors++;\n \t\t\t/* free tso mbufs */\n \t\t\tif (num_tso_mbufs > 0)\n \t\t\t\trte_pktmbuf_free_bulk(mbuf, num_tso_mbufs);\n@@ -748,9 +754,8 @@ pmd_tx_burst(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t}\n \t}\n \n-\ttxq->stats.opackets += num_packets;\n-\ttxq->stats.errs += nb_pkts - num_tx;\n-\ttxq->stats.obytes += num_tx_bytes;\n+\ttxq->stats.packets += num_packets;\n+\ttxq->stats.bytes += num_tx_bytes;\n \n \treturn num_tx;\n }\n@@ -1047,43 +1052,44 @@ tap_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n static int\n tap_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *tap_stats)\n {\n-\tunsigned int i, imax;\n-\tunsigned long rx_total = 0, tx_total = 0, tx_err_total = 0;\n-\tunsigned long rx_bytes_total = 0, tx_bytes_total = 0;\n-\tunsigned long rx_nombuf = 0, ierrors = 0;\n+\tunsigned int i;\n \tconst struct pmd_internals *pmd = dev->data->dev_private;\n+\tuint64_t bytes, packets;\n \n \t/* rx queue statistics */\n-\timax = (dev->data->nb_rx_queues < RTE_ETHDEV_QUEUE_STAT_CNTRS) ?\n-\t\tdev->data->nb_rx_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS;\n-\tfor (i = 0; i < imax; i++) {\n-\t\ttap_stats->q_ipackets[i] = pmd->rxq[i].stats.ipackets;\n-\t\ttap_stats->q_ibytes[i] = pmd->rxq[i].stats.ibytes;\n-\t\trx_total += tap_stats->q_ipackets[i];\n-\t\trx_bytes_total += tap_stats->q_ibytes[i];\n-\t\trx_nombuf += pmd->rxq[i].stats.rx_nombuf;\n-\t\tierrors += pmd->rxq[i].stats.ierrors;\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\tconst struct rx_queue *rxq = &pmd->rxq[i];\n+\n+\t\tpackets = READ_ONCE(rxq->stats.packets);\n+\t\tbytes = READ_ONCE(rxq->stats.bytes);\n+\n+\t\ttap_stats->ipackets += packets;\n+\t\ttap_stats->ibytes += bytes;\n+\t\ttap_stats->ierrors += rxq->stats.errors;\n+\n+\t\tif (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {\n+\t\t\ttap_stats->q_ipackets[i] = packets;\n+\t\t\ttap_stats->q_ibytes[i] = bytes;\n+\t\t}\n \t}\n \n \t/* tx queue statistics */\n-\timax = (dev->data->nb_tx_queues < RTE_ETHDEV_QUEUE_STAT_CNTRS) ?\n-\t\tdev->data->nb_tx_queues : RTE_ETHDEV_QUEUE_STAT_CNTRS;\n-\n-\tfor (i = 0; i < imax; i++) {\n-\t\ttap_stats->q_opackets[i] = pmd->txq[i].stats.opackets;\n-\t\ttap_stats->q_obytes[i] = pmd->txq[i].stats.obytes;\n-\t\ttx_total += tap_stats->q_opackets[i];\n-\t\ttx_err_total += pmd->txq[i].stats.errs;\n-\t\ttx_bytes_total += tap_stats->q_obytes[i];\n-\t}\n-\n-\ttap_stats->ipackets = rx_total;\n-\ttap_stats->ibytes = rx_bytes_total;\n-\ttap_stats->ierrors = ierrors;\n-\ttap_stats->rx_nombuf = rx_nombuf;\n-\ttap_stats->opackets = tx_total;\n-\ttap_stats->oerrors = tx_err_total;\n-\ttap_stats->obytes = tx_bytes_total;\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\tconst struct tx_queue *txq = &pmd->txq[i];\n+\n+\t\tpackets = READ_ONCE(txq->stats.packets);\n+\t\tbytes = READ_ONCE(txq->stats.bytes);\n+\n+\t\ttap_stats->opackets += packets;\n+\t\ttap_stats->obytes += bytes;\n+\t\ttap_stats->oerrors += txq->stats.errors;\n+\n+\t\tif (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {\n+\t\t\ttap_stats->q_opackets[i] = packets;\n+\t\t\ttap_stats->q_obytes[i] = bytes;\n+\t\t}\n+\t}\n+\n \treturn 0;\n }\n \n@@ -1094,14 +1100,8 @@ tap_stats_reset(struct rte_eth_dev *dev)\n \tstruct pmd_internals *pmd = dev->data->dev_private;\n \n \tfor (i = 0; i < RTE_PMD_TAP_MAX_QUEUES; i++) {\n-\t\tpmd->rxq[i].stats.ipackets = 0;\n-\t\tpmd->rxq[i].stats.ibytes = 0;\n-\t\tpmd->rxq[i].stats.ierrors = 0;\n-\t\tpmd->rxq[i].stats.rx_nombuf = 0;\n-\n-\t\tpmd->txq[i].stats.opackets = 0;\n-\t\tpmd->txq[i].stats.errs = 0;\n-\t\tpmd->txq[i].stats.obytes = 0;\n+\t\tmemset(&pmd->rxq[i].stats, 0, sizeof(struct pkt_stats));\n+\t\tmemset(&pmd->txq[i].stats, 0, sizeof(struct pkt_stats));\n \t}\n \n \treturn 0;\n@@ -1156,9 +1156,13 @@ tap_dev_close(struct rte_eth_dev *dev)\n \t}\n \n \tif (internals->remote_if_index) {\n+\t\tstruct ifreq remote_ifr;\n+\n+\t\tstrlcpy(remote_ifr.ifr_name, internals->remote_iface, IFNAMSIZ);\n+\t\tremote_ifr.ifr_flags = internals->remote_flags;\n+\n \t\t/* Restore initial remote state */\n-\t\tint ret = ioctl(internals->ioctl_sock, SIOCSIFFLAGS,\n-\t\t\t\t&internals->remote_initial_flags);\n+\t\tint ret = ioctl(internals->ioctl_sock, SIOCSIFFLAGS, &remote_ifr);\n \t\tif (ret)\n \t\t\tTAP_LOG(ERR, \"restore remote state failed: %d\", ret);\n \n@@ -2067,16 +2071,22 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,\n \tLIST_INIT(&pmd->flows);\n \n \tif (strlen(remote_iface)) {\n+\t\tstruct ifreq remote_ifr;\n+\n \t\tpmd->remote_if_index = if_nametoindex(remote_iface);\n \t\tif (!pmd->remote_if_index) {\n \t\t\tTAP_LOG(ERR, \"%s: failed to get %s if_index.\",\n \t\t\t\tpmd->name, remote_iface);\n \t\t\tgoto error_remote;\n \t\t}\n-\t\tstrlcpy(pmd->remote_iface, remote_iface, RTE_ETH_NAME_MAX_LEN);\n+\t\tstrlcpy(pmd->remote_iface, remote_iface, IFNAMSIZ);\n+\n+\t\tmemset(&remote_ifr, 0, sizeof(ifr));\n+\t\tstrlcpy(remote_ifr.ifr_name, remote_iface, IFNAMSIZ);\n \n \t\t/* Save state of remote device */\n-\t\ttap_ioctl(pmd, SIOCGIFFLAGS, &pmd->remote_initial_flags, 0, REMOTE_ONLY);\n+\t\ttap_ioctl(pmd, SIOCGIFFLAGS, &remote_ifr, 0, REMOTE_ONLY);\n+\t\tpmd->remote_flags = remote_ifr.ifr_flags;\n \n \t\t/* Replicate remote MAC address */\n \t\tif (tap_ioctl(pmd, SIOCGIFHWADDR, &ifr, 0, REMOTE_ONLY) < 0) {\n@@ -2190,10 +2200,10 @@ set_interface_name(const char *key __rte_unused,\n \t\t\t\tvalue);\n \t\t\treturn -1;\n \t\t}\n-\t\tstrlcpy(name, value, RTE_ETH_NAME_MAX_LEN);\n+\t\tstrlcpy(name, value, IFNAMSIZ);\n \t} else {\n \t\t/* use tap%d which causes kernel to choose next available */\n-\t\tstrlcpy(name, DEFAULT_TAP_NAME \"%d\", RTE_ETH_NAME_MAX_LEN);\n+\t\tstrlcpy(name, DEFAULT_TAP_NAME \"%d\", IFNAMSIZ);\n \t}\n \treturn 0;\n }\n@@ -2211,7 +2221,7 @@ set_remote_iface(const char *key __rte_unused,\n \t\t\t\tvalue);\n \t\t\treturn -1;\n \t\t}\n-\t\tstrlcpy(name, value, RTE_ETH_NAME_MAX_LEN);\n+\t\tstrlcpy(name, value, IFNAMSIZ);\n \t}\n \n \treturn 0;\n@@ -2262,13 +2272,13 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)\n \tconst char *name, *params;\n \tint ret;\n \tstruct rte_kvargs *kvlist = NULL;\n-\tchar tun_name[RTE_ETH_NAME_MAX_LEN];\n-\tchar remote_iface[RTE_ETH_NAME_MAX_LEN];\n+\tchar tun_name[IFNAMSIZ];\n+\tchar remote_iface[IFNAMSIZ];\n \tstruct rte_eth_dev *eth_dev;\n \n \tname = rte_vdev_device_name(dev);\n \tparams = rte_vdev_device_args(dev);\n-\tmemset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN);\n+\tmemset(remote_iface, 0, IFNAMSIZ);\n \n \tif (rte_eal_process_type() == RTE_PROC_SECONDARY &&\n \t    strlen(params) == 0) {\n@@ -2284,7 +2294,7 @@ rte_pmd_tun_probe(struct rte_vdev_device *dev)\n \t}\n \n \t/* use tun%d which causes kernel to choose next available */\n-\tstrlcpy(tun_name, DEFAULT_TUN_NAME \"%d\", RTE_ETH_NAME_MAX_LEN);\n+\tstrlcpy(tun_name, DEFAULT_TUN_NAME \"%d\", IFNAMSIZ);\n \n \tif (params && (params[0] != '\\0')) {\n \t\tTAP_LOG(DEBUG, \"parameters (%s)\", params);\n@@ -2424,8 +2434,8 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)\n \tint ret;\n \tstruct rte_kvargs *kvlist = NULL;\n \tint speed;\n-\tchar tap_name[RTE_ETH_NAME_MAX_LEN];\n-\tchar remote_iface[RTE_ETH_NAME_MAX_LEN];\n+\tchar tap_name[IFNAMSIZ];\n+\tchar remote_iface[IFNAMSIZ];\n \tstruct rte_ether_addr user_mac = { .addr_bytes = {0} };\n \tstruct rte_eth_dev *eth_dev;\n \tint tap_devices_count_increased = 0;\n@@ -2479,8 +2489,8 @@ rte_pmd_tap_probe(struct rte_vdev_device *dev)\n \tspeed = RTE_ETH_SPEED_NUM_10G;\n \n \t/* use tap%d which causes kernel to choose next available */\n-\tstrlcpy(tap_name, DEFAULT_TAP_NAME \"%d\", RTE_ETH_NAME_MAX_LEN);\n-\tmemset(remote_iface, 0, RTE_ETH_NAME_MAX_LEN);\n+\tstrlcpy(tap_name, DEFAULT_TAP_NAME \"%d\", IFNAMSIZ);\n+\tmemset(remote_iface, 0, IFNAMSIZ);\n \n \tif (params && (params[0] != '\\0')) {\n \t\tTAP_LOG(DEBUG, \"parameters (%s)\", params);\ndiff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h\nindex ce4322ad04..8f9ab613c7 100644\n--- a/drivers/net/tap/rte_eth_tap.h\n+++ b/drivers/net/tap/rte_eth_tap.h\n@@ -34,13 +34,9 @@ enum rte_tuntap_type {\n };\n \n struct pkt_stats {\n-\tuint64_t opackets;              /* Number of output packets */\n-\tuint64_t ipackets;              /* Number of input packets */\n-\tuint64_t obytes;                /* Number of bytes on output */\n-\tuint64_t ibytes;                /* Number of bytes on input */\n-\tuint64_t errs;                  /* Number of TX error packets */\n-\tuint64_t ierrors;               /* Number of RX error packets */\n-\tuint64_t rx_nombuf;             /* Nb of RX mbuf alloc failures */\n+\tuint64_t packets;       /* Number of packets */\n+\tuint64_t bytes;         /* Number of bytes */\n+\tuint64_t errors;        /* Number of errors */\n };\n \n struct rx_queue {\n@@ -68,15 +64,16 @@ struct tx_queue {\n \n struct pmd_internals {\n \tstruct rte_eth_dev *dev;          /* Ethernet device. */\n-\tchar remote_iface[RTE_ETH_NAME_MAX_LEN]; /* Remote netdevice name */\n-\tchar name[RTE_ETH_NAME_MAX_LEN];  /* Internal Tap device name */\n+\tchar remote_iface[IFNAMSIZ];\t  /* Remote netdevice name */\n+\tchar name[IFNAMSIZ];\t\t  /* Internal Tap device name */\n \tint type;                         /* Type field - TUN|TAP */\n \tint persist;\t\t\t  /* 1 if keep link up, else 0 */\n \tstruct rte_ether_addr eth_addr;   /* Mac address of the device port */\n-\tstruct ifreq remote_initial_flags;/* Remote netdevice flags on init */\n+\tuint16_t remote_flags;\t\t  /* Remote netdevice flags on init */\n \tint remote_if_index;              /* remote netdevice IF_INDEX */\n \tint if_index;                     /* IF_INDEX for the port */\n \tint ioctl_sock;                   /* socket for ioctl calls */\n+\tint ka_fd;                        /* keep-alive file descriptor */\n \n #ifdef HAVE_TCA_FLOWER\n \tint nlsk_fd;                      /* Netlink socket fd */\n@@ -88,12 +85,11 @@ struct pmd_internals {\n \t/* implicit rte_flow rules set when a remote device is active */\n \tLIST_HEAD(tap_implicit_flows, rte_flow) implicit_flows;\n #endif\n+\tstruct rte_intr_handle *intr_handle;         /* LSC interrupt handle. */\n+\tstruct rte_mempool *gso_ctx_mp;     /* Mempool for GSO packets */\n \n \tstruct rx_queue rxq[RTE_PMD_TAP_MAX_QUEUES]; /* List of RX queues */\n \tstruct tx_queue txq[RTE_PMD_TAP_MAX_QUEUES]; /* List of TX queues */\n-\tstruct rte_intr_handle *intr_handle;         /* LSC interrupt handle. */\n-\tint ka_fd;                        /* keep-alive file descriptor */\n-\tstruct rte_mempool *gso_ctx_mp;     /* Mempool for GSO packets */\n };\n \n struct pmd_process_private {\n",
    "prefixes": [
        "v12",
        "09/12"
    ]
}