Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2217797/?format=api
{ "id": 2217797, "url": "http://patchwork.ozlabs.org/api/patches/2217797/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260329162151.2043655-1-aaron1esau@gmail.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260329162151.2043655-1-aaron1esau@gmail.com>", "list_archive_url": null, "date": "2026-03-29T16:21:51", "name": "[net] i40e: fix memcmp of pointer in i40e_hw_set_dcb_config()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ff101fb885dfe37d3fbd315fb44d29388c607b1f", "submitter": { "id": 93010, "url": "http://patchwork.ozlabs.org/api/people/93010/?format=api", "name": "Aaron Esau", "email": "aaron1esau@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260329162151.2043655-1-aaron1esau@gmail.com/mbox/", "series": [ { "id": 498058, "url": "http://patchwork.ozlabs.org/api/series/498058/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=498058", "date": "2026-03-29T16:21:51", "name": "[net] i40e: fix memcmp of pointer in i40e_hw_set_dcb_config()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498058/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2217797/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2217797/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=OfDOzwKu;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fkwFr2fLQz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 02:31:28 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id EC96060BF8;\n\tMon, 30 Mar 2026 15:31:24 +0000 (UTC)", "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id UxSXG5brk1uw; Mon, 30 Mar 2026 15:31:24 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 7183760C06;\n\tMon, 30 Mar 2026 15:31:23 +0000 (UTC)", "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id 2690B2EB\n for <intel-wired-lan@lists.osuosl.org>; Sun, 29 Mar 2026 16:22:27 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 0FEDB60770\n for <intel-wired-lan@lists.osuosl.org>; Sun, 29 Mar 2026 16:22:27 +0000 (UTC)", "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id YYg7-5zD-MZw for <intel-wired-lan@lists.osuosl.org>;\n Sun, 29 Mar 2026 16:22:26 +0000 (UTC)", "from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com\n [IPv6:2a00:1450:4864:20::32a])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 2A5B460768\n for <intel-wired-lan@lists.osuosl.org>; Sun, 29 Mar 2026 16:22:26 +0000 (UTC)", "by mail-wm1-x32a.google.com with SMTP id\n 5b1f17b1804b1-4853a485721so5375225e9.3\n for <intel-wired-lan@lists.osuosl.org>; Sun, 29 Mar 2026 09:22:25 -0700 (PDT)", "from localhost ([2a01:cb1d:4ec:6700:174f:90cc:2ec3:a84b])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43cf24707f2sm12760803f8f.26.2026.03.29.09.22.22\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 29 Mar 2026 09:22:22 -0700 (PDT)" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 7183760C06", "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 2A5B460768" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1774884683;\n\tbh=39nWh5Sbwqb3QyZ67qx+99ZIlQgRVmnOj8xt3uyYktk=;\n\th=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=OfDOzwKuVZlQQAYEGusiLk5uZ4SD8EW3ZRZq0/mTD+OVEy08XzP02EGVX4AIMaFxJ\n\t EW3OxADk51XBKn+nD1jyl2QDMShlfj9EQrxohbMib0Hs9yCfPEsXWLwy3I3umPmXeC\n\t O5r20MYQR8aewHXHNx6rUVuOgVZcBlqaqWyplciKwXj4xK7LKmSWwfbG8lqXAzb09N\n\t H9+1OwICySg5Xi6NIQvZJZ4AWQmtdnA2JhdHyrQbtt78cjCC4z20gJ529AEARxQi4o\n\t UtBpFDTru/2EZQQFl3rr8+pO9hBsuPeayvJpN8iDJHYADNPCS+u2EfWZq9wGxr0Xsl\n\t oGacdPMOM+lfQ==", "Received-SPF": "Pass (mailfrom) identity=mailfrom;\n client-ip=2a00:1450:4864:20::32a; helo=mail-wm1-x32a.google.com;\n envelope-from=aaron1esau@gmail.com; receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org 2A5B460768", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774801344; x=1775406144;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=39nWh5Sbwqb3QyZ67qx+99ZIlQgRVmnOj8xt3uyYktk=;\n b=Ury6lS5n7Md/lwDB8EpcrpuwMmX+WbF2npmaKIiTZb4dL8EWxhzlnp17K/yzIg/1F5\n t0FabxwOgQKnsHBo77MpWsTs8CRejNePOTHSZSpDBEH6rWEYXcSz/PJkwd5mGnADUl0/\n aK4NASgAfsAItHz1KFIfTlT5ffsh5XBRvNkgEaPGRgFbclHLru276Mzc+/CWwiGQw16q\n YTjFF3Qo9CgJnSa68DB7MUEc3DZsENe6zs+0gFMJN4g+w6O6IDUy6o52BF7gCLfW75pP\n d+WEjwEUYhnbkK++RuP9dm7PhFdxBD/BVc6iERdvYDxkYCbt3hzk5yo2jsgpdiBPZ3mi\n nSPA==", "X-Gm-Message-State": "AOJu0YxyPMZrAlzBmAgJmsShCH77F3gu94GLaP6hiDID6ftW4cE98hN2\n eva13WsacaaVjoXfhAbcjxyNe3m/WsCMCSVvJeAqjUbOIqii522JUTwibYPytA70xeM=", "X-Gm-Gg": "ATEYQzx7ILLqjqbPNpxCIr12LfDeHZAf1anHhtH3lQXBk/asEYlgLzlaGUwkVZbVQ0H\n n+rILeRAPNxNynFJtDM73z34zIkjev0WVO61sZn/QsXI61f9nHjmJ5w6dwKIpwLgmXcxJ8JmHcZ\n lZVx+3L5NxVeddN6ATyPln/R8UJX6u3yjXOaluzijaSYtb6veQ1/KxEpbvQqxSUxtLrNBb9DXrl\n CwfPE0yxFU3uGOFNEPnkKVLcwGe2PwCFjwADQ5jzCpeQQmTG7rnBZ6HU7yldCszWOog9TjXmFVs\n +S4JEbPXGrUlztJpEItJ1nOWTgYdLOhrltzkQPnUhw0gzPuFNDcPXx9rRTobGgOKDwdH0RI/zQD\n JcOrOVLbqySFSHn9jcPK8tpVxvWMXIEm9zli+05tqo/9b4Fr0k6H+8jPAdWR9Sy07fMTNrFgdkm\n R93WXaDwQ3xtR/OoqFwsIqXS9F472eGA+QoIkr47cTlabx37mo7uXityxsLN+VcrC2iZLkNHcic\n 8jzTauN7DDQj39ddSsrrkctBcXI", "X-Received": "by 2002:a05:600c:b99:b0:485:39a1:bcb3 with SMTP id\n 5b1f17b1804b1-48727f5f8d8mr76636175e9.6.1774801343387;\n Sun, 29 Mar 2026 09:22:23 -0700 (PDT)", "From": "Aaron Esau <aaron1esau@gmail.com>", "To": "intel-wired-lan@lists.osuosl.org", "Cc": "netdev@vger.kernel.org, anthony.l.nguyen@intel.com,\n przemyslaw.kitszel@intel.com, arkadiusz.kubalewski@intel.com,\n stable@vger.kernel.org, Aaron Esau <aaron1esau@gmail.com>", "Date": "Sun, 29 Mar 2026 18:21:51 +0200", "Message-ID": "<20260329162151.2043655-1-aaron1esau@gmail.com>", "X-Mailer": "git-send-email 2.52.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Approved-At": "Mon, 30 Mar 2026 15:31:21 +0000", "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1774801344; x=1775406144; darn=lists.osuosl.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=39nWh5Sbwqb3QyZ67qx+99ZIlQgRVmnOj8xt3uyYktk=;\n b=K5zjnkLBRQmLZOrcXL/uMMjQxsLvySkNce2POEbRwn/ZmjPTgePJBnpvv4CquZjcfu\n wCg3Pjdz3+bskS8YHD25aXnOgOF5EaAyroWiZoj+oM3HYi4xC9QX1NbrQR3JA7TzTXPx\n bgKmlAgWny2oyjYoDSOEHlhQrYu0vY92EQEdOqGY8lnociyrdXV9g7co+Ua9fXyeB+cI\n jUuM/biV+KXkTGO/K01ASrSGN4K424rQ9ZSIgZYVI6Ioint9g005bm12/R/isyRmvUMB\n YkRAD2nmqFJzytPZIECalMrq3ytaXFq2AxoI8EyoS12Vt0w4rfttmB9RCo9HyOY2Q2zL\n +GKQ==", "X-Mailman-Original-Authentication-Results": [ "smtp3.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=gmail.com", "smtp3.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=K5zjnkLB" ], "Subject": "[Intel-wired-lan] [PATCH net] i40e: fix memcmp of pointer in\n i40e_hw_set_dcb_config()", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "In i40e_hw_set_dcb_config(), both new_cfg and old_cfg are pointers to\nstruct i40e_dcbx_config, so sizeof(new_cfg) evaluates to the size of a\npointer (8 bytes on 64-bit) rather than the size of the struct. Likewise,\n&new_cfg and &old_cfg are the addresses of the pointer variables on the\nstack, not the addresses of the actual config structs.\n\nAs a result, the memcmp never compares the actual configuration data,\nmeaning the \"no change needed\" early return never fires. Every call to\nthis function performs a full DCB reconfiguration (quiescing all VSIs,\nreprogramming via \"Set LLDP MIB\" AQC, and reconfiguring VEB/VSIs) even\nwhen the configuration has not changed.\n\nFix this by comparing the structs themselves rather than the pointers.\n\nFixes: 4b208eaa8078 (\"i40e: Add init and default config of software based DCB\")\nCc: stable@vger.kernel.org\nSigned-off-by: Aaron Esau <aaron1esau@gmail.com>\n---\n\nFound using Coccinelle/spatch with a semantic patch that matches\nsizeof(ptr) and &ptr used together where ptr is a pointer type.\n\n drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\n--\n2.49.0", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex XXXXXXX..XXXXXXX 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -6904,7 +6904,7 @@ static int i40e_hw_set_dcb_config(struct i40e_pf *pf,\n \tint ret;\n\n \t/* Check if need reconfiguration */\n-\tif (!memcmp(&new_cfg, &old_cfg, sizeof(new_cfg))) {\n+\tif (!memcmp(new_cfg, old_cfg, sizeof(*new_cfg))) {\n \t\tdev_dbg(&pf->pdev->dev, \"No Change in DCB Config required.\\n\");\n \t\treturn 0;\n \t}\n", "prefixes": [ "net" ] }