Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/137744/?format=api
https://patches.dpdk.org/api/patches/137744/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240301171707.95242-55-stephen@networkplumber.org/", "project": { "id": 1, "url": "https://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": "<20240301171707.95242-55-stephen@networkplumber.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20240301171707.95242-55-stephen@networkplumber.org", "date": "2024-03-01T17:15:50", "name": "[v2,54/71] net/bnx2x: replace use of fixed size rte_memcpy", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "a1b98869ae07e36bb9211618fa9273e0dd31f990", "submitter": { "id": 27, "url": "https://patches.dpdk.org/api/people/27/?format=api", "name": "Stephen Hemminger", "email": "stephen@networkplumber.org" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240301171707.95242-55-stephen@networkplumber.org/mbox/", "series": [ { "id": 31340, "url": "https://patches.dpdk.org/api/series/31340/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31340", "date": "2024-03-01T17:14:57", "name": "replace use of fixed size rte_mempcy", "version": 2, "mbox": "https://patches.dpdk.org/series/31340/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/137744/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/137744/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 8909543C12;\n\tFri, 1 Mar 2024 18:23:40 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E9E1D434C2;\n\tFri, 1 Mar 2024 18:18:28 +0100 (CET)", "from mail-pl1-f169.google.com (mail-pl1-f169.google.com\n [209.85.214.169])\n by mails.dpdk.org (Postfix) with ESMTP id 21CF643441\n for <dev@dpdk.org>; Fri, 1 Mar 2024 18:18:00 +0100 (CET)", "by mail-pl1-f169.google.com with SMTP id\n d9443c01a7336-1d7232dcb3eso18704455ad.2\n for <dev@dpdk.org>; Fri, 01 Mar 2024 09:18:00 -0800 (PST)", "from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141])\n by smtp.gmail.com with ESMTPSA id\n j14-20020a170902da8e00b001dc8d6a9d40sm3695764plx.144.2024.03.01.09.17.58\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 01 Mar 2024 09:17:58 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1709313479;\n x=1709918279; 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=cjxhR4csAsqJ0aUw/Iixg8P9RLtulDrA5Ua4mBysleI=;\n b=P1A/lRdHUk8b+njW4Kc/wp5wrEGQSVW3TIOrqS+yY1hRTU+5wQwvdV5oDOb6ElfVUC\n N21DBNL9KgTZTVgZVh6XrQUEpSYmE/J4jmK8C8YUOj2DrCaCAzQquLyACH6+uFNm3NQ6\n T0eJPrGkG/0QuKhyaifHd2p+FA/wlHk9WcrFiL3DGPQMCDKEMpcjQwguxhV3vYzGDgGT\n awZjFnlaXI+tEG63M2V+ZvvsCNtqvmZzVqLYv6tCdWaEMWuvifhUd6NBaHpVhSFGyWhz\n w4p+AOiksVmWQ3EOBWozVT4JKtGvd/O+V+vDQCTJCCQ+KE9rOgYjSsPs04xyS5wvVB9i\n 3KtQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1709313479; x=1709918279;\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=cjxhR4csAsqJ0aUw/Iixg8P9RLtulDrA5Ua4mBysleI=;\n b=QnlK4YCCtpH/B8h54UxCJl6STG4Iz36MWMz1D3R90Wn0bDnjnue0L4thkJ4+XhC/DS\n uEYzmur5MlBVn+vinbU0w+ebRQN3iRAncsK9p77yg5V+7oBcE7+x5Bg2kbSRR81gdpO5\n GgVuXjspKxRhhJA1ewxki3dxueDCc35aeQ/VUTcwS+22xgg8ZlYvchrIRRJVDNByOX3Q\n xRR7b2TVaiT1Uht4KThH56DNPjV/jV7tVsaGqtGDRt7zBkfgHg4jVSpos4w5IX2Q23IS\n uYF9FTevp+zKuHYjVOG/3tOqnAhZx2802ui+gtJaIo0Pt6NYV2YEoo7c5xGOZKpWxGbm\n xDBA==", "X-Gm-Message-State": "AOJu0YzSLsJsLT+uwDiFkueUFjR4sa9dm++hRFjL3jFpbUOSM2ub4l/A\n UsRxqKJOJUt3xUCD5ABTB14whSRjZbHEXBszGvKxmpsXg2dMzkzjfhtCkU2yR/NXNFvkG/p9BGo\n S8ati3Q==", "X-Google-Smtp-Source": "\n AGHT+IH+ojb7fcWDQoG+sAI4NSDufkFBN5k1PZS8ZS6rXrDVEC3jucfOvc8zrBtdvd8uN0B40qkupQ==", "X-Received": "by 2002:a17:902:8c93:b0:1dc:b3a3:ca73 with SMTP id\n t19-20020a1709028c9300b001dcb3a3ca73mr2026742plo.38.1709313479320;\n Fri, 01 Mar 2024 09:17:59 -0800 (PST)", "From": "Stephen Hemminger <stephen@networkplumber.org>", "To": "dev@dpdk.org", "Cc": "Stephen Hemminger <stephen@networkplumber.org>,\n Julien Aube <julien_dpdk@jaube.fr>", "Subject": "[PATCH v2 54/71] net/bnx2x: replace use of fixed size rte_memcpy", "Date": "Fri, 1 Mar 2024 09:15:50 -0800", "Message-ID": "<20240301171707.95242-55-stephen@networkplumber.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240301171707.95242-1-stephen@networkplumber.org>", "References": "<20240229225936.483472-1-stephen@networkplumber.org>\n <20240301171707.95242-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": "Automatically generated by devtools/cocci/rte_memcpy.cocci.\n\nNote: the indentation in this file does not follow the coding\nstandard of DPDK, so it will get some checkpatch warnings.\n\nSigned-off-by: Stephen Hemminger <stephen@networkplumber.org>\n---\n drivers/net/bnx2x/bnx2x.c | 32 +++++++++++++++-----------------\n drivers/net/bnx2x/bnx2x_stats.c | 10 +++++-----\n drivers/net/bnx2x/bnx2x_vfpf.c | 19 ++++++++++---------\n 3 files changed, 30 insertions(+), 31 deletions(-)", "diff": "diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c\nindex 597ee4335977..16a9ff7f8c06 100644\n--- a/drivers/net/bnx2x/bnx2x.c\n+++ b/drivers/net/bnx2x/bnx2x.c\n@@ -2242,18 +2242,18 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0)\n \t\ttx_parse_bd->parsing_data =\n \t\t (mac_type << ETH_TX_PARSE_BD_E2_ETH_ADDR_TYPE_SHIFT);\n \n-\t\trte_memcpy(&tx_parse_bd->data.mac_addr.dst_hi,\n-\t\t\t &eh->dst_addr.addr_bytes[0], 2);\n-\t\trte_memcpy(&tx_parse_bd->data.mac_addr.dst_mid,\n-\t\t\t &eh->dst_addr.addr_bytes[2], 2);\n-\t\trte_memcpy(&tx_parse_bd->data.mac_addr.dst_lo,\n-\t\t\t &eh->dst_addr.addr_bytes[4], 2);\n-\t\trte_memcpy(&tx_parse_bd->data.mac_addr.src_hi,\n-\t\t\t &eh->src_addr.addr_bytes[0], 2);\n-\t\trte_memcpy(&tx_parse_bd->data.mac_addr.src_mid,\n-\t\t\t &eh->src_addr.addr_bytes[2], 2);\n-\t\trte_memcpy(&tx_parse_bd->data.mac_addr.src_lo,\n-\t\t\t &eh->src_addr.addr_bytes[4], 2);\n+\t\tmemcpy(&tx_parse_bd->data.mac_addr.dst_hi,\n+\t\t &eh->dst_addr.addr_bytes[0], 2);\n+\t\tmemcpy(&tx_parse_bd->data.mac_addr.dst_mid,\n+\t\t &eh->dst_addr.addr_bytes[2], 2);\n+\t\tmemcpy(&tx_parse_bd->data.mac_addr.dst_lo,\n+\t\t &eh->dst_addr.addr_bytes[4], 2);\n+\t\tmemcpy(&tx_parse_bd->data.mac_addr.src_hi,\n+\t\t &eh->src_addr.addr_bytes[0], 2);\n+\t\tmemcpy(&tx_parse_bd->data.mac_addr.src_mid,\n+\t\t &eh->src_addr.addr_bytes[2], 2);\n+\t\tmemcpy(&tx_parse_bd->data.mac_addr.src_lo,\n+\t\t &eh->src_addr.addr_bytes[4], 2);\n \n \t\ttx_parse_bd->data.mac_addr.dst_hi =\n \t\t rte_cpu_to_be_16(tx_parse_bd->data.mac_addr.dst_hi);\n@@ -6675,8 +6675,7 @@ bnx2x_config_rss_pf(struct bnx2x_softc *sc, struct ecore_rss_config_obj *rss_obj\n \t/* Hash bits */\n \tparams.rss_result_mask = MULTI_MASK;\n \n-\trte_memcpy(params.ind_table, rss_obj->ind_table,\n-\t\t\t sizeof(params.ind_table));\n+\tmemcpy(params.ind_table, rss_obj->ind_table, sizeof(params.ind_table));\n \n \tif (config_hash) {\n /* RSS keys */\n@@ -6742,8 +6741,7 @@ bnx2x_set_mac_one(struct bnx2x_softc *sc, uint8_t * mac,\n \n \t/* fill a user request section if needed */\n \tif (!rte_bit_relaxed_get32(RAMROD_CONT, ramrod_flags)) {\n-\t\trte_memcpy(ramrod_param.user_req.u.mac.mac, mac,\n-\t\t\t\t ETH_ALEN);\n+\t\tmemcpy(ramrod_param.user_req.u.mac.mac, mac, ETH_ALEN);\n \n \t\trte_bit_relaxed_set32(mac_type,\n \t\t\t\t &ramrod_param.user_req.vlan_mac_flags);\n@@ -6958,7 +6956,7 @@ static void bnx2x_link_report_locked(struct bnx2x_softc *sc)\n \n \tELINK_DEBUG_P1(sc, \"link status change count = %x\", sc->link_cnt);\n \t/* report new link params and remember the state for the next time */\n-\trte_memcpy(&sc->last_reported_link, &cur_data, sizeof(cur_data));\n+\tmemcpy(&sc->last_reported_link, &cur_data, sizeof(cur_data));\n \n \tif (rte_bit_relaxed_get32(BNX2X_LINK_REPORT_LINK_DOWN,\n \t\t\t &cur_data.link_report_flags)) {\ndiff --git a/drivers/net/bnx2x/bnx2x_stats.c b/drivers/net/bnx2x/bnx2x_stats.c\nindex c07b01510a06..23c74c21c635 100644\n--- a/drivers/net/bnx2x/bnx2x_stats.c\n+++ b/drivers/net/bnx2x/bnx2x_stats.c\n@@ -114,8 +114,8 @@ bnx2x_hw_stats_post(struct bnx2x_softc *sc)\n \n \t/* Update MCP's statistics if possible */\n \tif (sc->func_stx) {\n-\t\trte_memcpy(BNX2X_SP(sc, func_stats), &sc->func_stats,\n-\t\t\t\tsizeof(sc->func_stats));\n+\t\tmemcpy(BNX2X_SP(sc, func_stats), &sc->func_stats,\n+\t\t sizeof(sc->func_stats));\n \t}\n \n \t/* loader */\n@@ -817,10 +817,10 @@ bnx2x_hw_stats_update(struct bnx2x_softc *sc)\n \t\t\t etherstatspktsover1522octets);\n }\n \n- rte_memcpy(old, new, sizeof(struct nig_stats));\n+ memcpy(old, new, sizeof(struct nig_stats));\n \n- rte_memcpy(&(estats->rx_stat_ifhcinbadoctets_hi), &(pstats->mac_stx[1]),\n-\t sizeof(struct mac_stx));\n+ memcpy(&(estats->rx_stat_ifhcinbadoctets_hi), &(pstats->mac_stx[1]),\n+ sizeof(struct mac_stx));\n estats->brb_drop_hi = pstats->brb_drop_hi;\n estats->brb_drop_lo = pstats->brb_drop_lo;\n \ndiff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c\nindex 63953c2979ce..678c9e7d7d7c 100644\n--- a/drivers/net/bnx2x/bnx2x_vfpf.c\n+++ b/drivers/net/bnx2x/bnx2x_vfpf.c\n@@ -52,9 +52,9 @@ bnx2x_check_bull(struct bnx2x_softc *sc)\n \n \t/* check the mac address and VLAN and allocate memory if valid */\n \tif (valid_bitmap & (1 << MAC_ADDR_VALID) && memcmp(bull->mac, sc->old_bulletin.mac, ETH_ALEN))\n-\t\trte_memcpy(&sc->link_params.mac_addr, bull->mac, ETH_ALEN);\n+\t\tmemcpy(&sc->link_params.mac_addr, bull->mac, ETH_ALEN);\n \tif (valid_bitmap & (1 << VLAN_VALID))\n-\t\trte_memcpy(&bull->vlan, &sc->old_bulletin.vlan, RTE_VLAN_HLEN);\n+\t\tmemcpy(&bull->vlan, &sc->old_bulletin.vlan, RTE_VLAN_HLEN);\n \n \tsc->old_bulletin = *bull;\n \n@@ -569,7 +569,7 @@ bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set)\n \n \tbnx2x_check_bull(sc);\n \n-\trte_memcpy(query->filters[0].mac, sc->link_params.mac_addr, ETH_ALEN);\n+\tmemcpy(query->filters[0].mac, sc->link_params.mac_addr, ETH_ALEN);\n \n \tbnx2x_add_tlv(sc, query, query->first_tlv.tl.length,\n \t\t BNX2X_VF_TLV_LIST_END,\n@@ -583,10 +583,10 @@ bnx2x_vf_set_mac(struct bnx2x_softc *sc, int set)\n \twhile (BNX2X_VF_STATUS_FAILURE == reply->status &&\n \t\t\tbnx2x_check_bull(sc)) {\n \t\t/* A new mac was configured by PF for us */\n-\t\trte_memcpy(sc->link_params.mac_addr, sc->pf2vf_bulletin->mac,\n-\t\t\t\tETH_ALEN);\n-\t\trte_memcpy(query->filters[0].mac, sc->pf2vf_bulletin->mac,\n-\t\t\t\tETH_ALEN);\n+\t\tmemcpy(sc->link_params.mac_addr, sc->pf2vf_bulletin->mac,\n+\t\t ETH_ALEN);\n+\t\tmemcpy(query->filters[0].mac, sc->pf2vf_bulletin->mac,\n+\t\t ETH_ALEN);\n \n \t\trc = bnx2x_do_req4pf(sc, sc->vf2pf_mbox_mapping.paddr);\n \t\tif (rc)\n@@ -622,10 +622,11 @@ bnx2x_vf_config_rss(struct bnx2x_softc *sc,\n \t\t BNX2X_VF_TLV_LIST_END,\n \t\t sizeof(struct channel_list_end_tlv));\n \n-\trte_memcpy(query->rss_key, params->rss_key, sizeof(params->rss_key));\n+\tmemcpy(query->rss_key, params->rss_key, sizeof(params->rss_key));\n \tquery->rss_key_size = T_ETH_RSS_KEY;\n \n-\trte_memcpy(query->ind_table, params->ind_table, T_ETH_INDIRECTION_TABLE_SIZE);\n+\tmemcpy(query->ind_table, params->ind_table,\n+\t T_ETH_INDIRECTION_TABLE_SIZE);\n \tquery->ind_table_size = T_ETH_INDIRECTION_TABLE_SIZE;\n \n \tquery->rss_result_mask = params->rss_result_mask;\n", "prefixes": [ "v2", "54/71" ] }{ "id": 137744, "url": "