Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2193053/?format=api
{ "id": 2193053, "url": "http://patchwork.ozlabs.org/api/patches/2193053/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260204154418.1285309-4-jakub.slepecki@intel.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": "<20260204154418.1285309-4-jakub.slepecki@intel.com>", "list_archive_url": null, "date": "2026-02-04T15:44:14", "name": "[iwl-next,v4,3/7] ice: allow overriding lan_en, lb_en in switch", "commit_ref": null, "pull_url": null, "state": "under-review", "archived": false, "hash": "910a39e6cd2bfeb16759af369ee51a89bf0e216c", "submitter": { "id": 92132, "url": "http://patchwork.ozlabs.org/api/people/92132/?format=api", "name": "Jakub Slepecki", "email": "jakub.slepecki@intel.com" }, "delegate": { "id": 109701, "url": "http://patchwork.ozlabs.org/api/users/109701/?format=api", "username": "anguy11", "first_name": "Anthony", "last_name": "Nguyen", "email": "anthony.l.nguyen@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260204154418.1285309-4-jakub.slepecki@intel.com/mbox/", "series": [ { "id": 490998, "url": "http://patchwork.ozlabs.org/api/series/490998/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=490998", "date": "2026-02-04T15:44:12", "name": "ice: in VEB, prevent \"cross-vlan\" traffic", "version": 4, "mbox": "http://patchwork.ozlabs.org/series/490998/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2193053/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2193053/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=1gBM8+6S;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.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 [140.211.166.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 4f5l646fypz1xpg\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 05 Feb 2026 02:44:44 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 4F6E96105A;\n\tWed, 4 Feb 2026 15:44:38 +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 XM2ZVlJlNuC2; Wed, 4 Feb 2026 15:44:35 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id F1455610B1;\n\tWed, 4 Feb 2026 15:44:33 +0000 (UTC)", "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by lists1.osuosl.org (Postfix) with ESMTP id 9F647F5\n for <intel-wired-lan@lists.osuosl.org>; Wed, 4 Feb 2026 15:44:29 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 8019480B3F\n for <intel-wired-lan@lists.osuosl.org>; Wed, 4 Feb 2026 15:44:29 +0000 (UTC)", "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id jPvAbDoj0F7c for <intel-wired-lan@lists.osuosl.org>;\n Wed, 4 Feb 2026 15:44:28 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.8])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 484F380A79\n for <intel-wired-lan@lists.osuosl.org>; Wed, 4 Feb 2026 15:44:28 +0000 (UTC)", "from orviesa010.jf.intel.com ([10.64.159.150])\n by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 04 Feb 2026 07:44:28 -0800", "from hpe-dl385gen10.igk.intel.com ([10.91.240.117])\n by orviesa010.jf.intel.com with ESMTP; 04 Feb 2026 07:44:26 -0800" ], "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 F1455610B1", "OpenDKIM Filter v2.11.0 smtp1.osuosl.org 484F380A79" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1770219874;\n\tbh=kNSPUkMn+4jd2EtoaMs0Jl1E0LSfQYPIgtw85UsoAQ0=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=1gBM8+6S6xA46BMJhTTJUWIFf/1ju7eE1Qf44HIg4YiVx1BYYBNlEY+2YDk/4I07M\n\t vO/WjgJgIKyJdFekQvaZTRaNI9EqeMPDwcfPrukRFmuNaEpvqvUq60JCIDyfuJoEnT\n\t 1tC7ygWKPOsvmIqHkqbw08xpmMUMyagWRqFq9QDN6FLGI36MLHHRSgSCln5LLcngwL\n\t OKS4ANhzQGwownSX5lGDidGOv81TxP1ro+GhOii9rwoLrm/8Np7oDmXbQ4Mj6u8CAp\n\t xW5Ps+j06V8uVkyg/0Ndz6ANHBf1cwZoVwFVpYG5qkE8wV3qlSVgw2+UF39T/iVS9q\n\t 5wq48if3yp0DQ==", "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.8;\n helo=mgamail.intel.com; envelope-from=jakub.slepecki@intel.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp1.osuosl.org 484F380A79", "X-CSE-ConnectionGUID": [ "Qg6jo6xeQme0OwRNmIk6rA==", "yBmta7mfQ8+a1p3dhQUvbA==" ], "X-CSE-MsgGUID": [ "LaMve96lTcqQ3JgN+a51JA==", "+nldAG6bQ7Cu9jKtAMF2nw==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11691\"; a=\"88987095\"", "E=Sophos;i=\"6.21,272,1763452800\"; d=\"scan'208\";a=\"88987095\"", "E=Sophos;i=\"6.21,272,1763452800\"; d=\"scan'208\";a=\"209494121\"" ], "X-ExtLoop1": "1", "From": "Jakub Slepecki <jakub.slepecki@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Cc": "linux-kernel@vger.kernel.org, netdev@vger.kernel.org,\n przemyslaw.kitszel@intel.com, anthony.l.nguyen@intel.com,\n michal.swiatkowski@linux.intel.com, jakub.slepecki@intel.com,\n aleksandr.loktionov@intel.com", "Date": "Wed, 4 Feb 2026 16:44:14 +0100", "Message-ID": "<20260204154418.1285309-4-jakub.slepecki@intel.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260204154418.1285309-1-jakub.slepecki@intel.com>", "References": "<20260204154418.1285309-1-jakub.slepecki@intel.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Organization": "Intel Technology Poland sp. z o.o. - ul. Slowackiego 173,\n 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316", "Content-Transfer-Encoding": "8bit", "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1770219868; x=1801755868;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=Jlx1HM4WhK92C63jv0PewtEGzcL37nDTi+iriH0kgzk=;\n b=aHcPivog6DkbdZVRUsMKPFsEvsUj8O4TkpCI278ljLOBTC3XPvujT4u8\n 5znGPm1SfgNPxSKEORRwGs0ZnHcjiLHLiOW8H6fu3X+jOVpAJzbfXZ86H\n 85nZRI1Gi5z1lfbno9nqdoRf+RHRI3c461LgY0YOTT8/+V0vtdMbn8fDq\n rdUhu99h6/mrbM5KdM5yJeUACGpAXFhbRQ7zYo1jcqsarlpmF8kefZ7ue\n pRAbttuk+Eqaei2V8nS47Ikms2sm1vBrMHNRAn/oDb+1GFYpBrOcdGQTr\n LEU9tLxNciNAglRg7CNV85rYJZg8JLWGpXVsupxxQmbcOm9DbOtNWNsGG\n Q==;", "X-Mailman-Original-Authentication-Results": [ "smtp1.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com", "smtp1.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=aHcPivog" ], "Subject": "[Intel-wired-lan] [PATCH iwl-next v4 3/7] ice: allow overriding\n lan_en, lb_en in switch", "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": "Currently, lan_en and lb_en are determined based on switching mode,\ndestination MAC, and the lookup type, action type and flags of the rule\nin question. This gives little to no options for the user (such as\nice_fltr.c) to enforce rules to behave in a specific way.\n\nSuch functionality is needed to work with pairs of rules, for example,\nwhen handling MAC forward to LAN together with MAC,VLAN forward to\nloopback rules pair. This case could not be easily deduced in a context\nof a single filter without adding some guessing logic or a specialized\nflag.\n\nAdd a slightly more generic flag to the lan_en and lb_en themselves\nfor the ice_fltr.c to request specific destination flags later on,\nfor example, to override both values:\n\n struct ice_fltr_info fi;\n fi.lb_en = ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED;\n fi.lan_en = ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED;\n\nReviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\nSigned-off-by: Jakub Slepecki <jakub.slepecki@intel.com>\n---\nAdded R-B from Aleksandr as we talked live and he reviewed the changes.\n\nNo changes in v4.\n\nChanges in v3:\n - LB_LAN masks and values no longer rely on boolean promotion.\n - ice_fill_sw_info() deals with u8 the entire time instead of building\n building lb_en and lan_en values at the end from booleans.\n\nChanges in v2:\n - Use FIELD_GET et al. when handling fi.lb_en and fi.lan_en.\n - Rename /LB_LAN/s/_MASK/_M/ because one of uses would need to break\n line\n---\n drivers/net/ethernet/intel/ice/ice_switch.c | 25 +++++++++++++--------\n drivers/net/ethernet/intel/ice/ice_switch.h | 19 +++++++++++++---\n 2 files changed, 32 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c\nindex 04e5d653efce..3caccd798220 100644\n--- a/drivers/net/ethernet/intel/ice/ice_switch.c\n+++ b/drivers/net/ethernet/intel/ice/ice_switch.c\n@@ -2534,12 +2534,14 @@ int ice_get_initial_sw_cfg(struct ice_hw *hw)\n *\n * This helper function populates the lb_en and lan_en elements of the provided\n * ice_fltr_info struct using the switch's type and characteristics of the\n- * switch rule being configured.\n+ * switch rule being configured. Elements are updated only if their FORCE bit\n+ * is not set.\n */\n static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)\n {\n-\tfi->lb_en = false;\n-\tfi->lan_en = false;\n+\tu8 lan_en = fi->lan_en;\n+\tu8 lb_en = fi->lb_en;\n+\n \tif ((fi->flag & ICE_FLTR_TX) &&\n \t (fi->fltr_act == ICE_FWD_TO_VSI ||\n \t fi->fltr_act == ICE_FWD_TO_VSI_LIST ||\n@@ -2549,7 +2551,7 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)\n \t\t * packets to the internal switch that will be dropped.\n \t\t */\n \t\tif (fi->lkup_type != ICE_SW_LKUP_VLAN)\n-\t\t\tfi->lb_en = true;\n+\t\t\tFIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &lb_en, 1);\n \n \t\t/* Set lan_en to TRUE if\n \t\t * 1. The switch is a VEB AND\n@@ -2578,14 +2580,19 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)\n \t\t\t !is_unicast_ether_addr(fi->l_data.mac.mac_addr)) ||\n \t\t\t (fi->lkup_type == ICE_SW_LKUP_MAC_VLAN &&\n \t\t\t !is_unicast_ether_addr(fi->l_data.mac.mac_addr)))\n-\t\t\t\tfi->lan_en = true;\n+\t\t\t\tFIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M,\n+\t\t\t\t\t &lan_en, 1);\n \t\t} else {\n-\t\t\tfi->lan_en = true;\n+\t\t\tFIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &lan_en, 1);\n \t\t}\n \t}\n \n \tif (fi->flag & ICE_FLTR_TX_ONLY)\n-\t\tfi->lan_en = false;\n+\t\tFIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &lan_en, 0);\n+\tif (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, lb_en))\n+\t\tfi->lb_en = lb_en;\n+\tif (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, lan_en))\n+\t\tfi->lan_en = lan_en;\n }\n \n /**\n@@ -2669,9 +2676,9 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,\n \t\treturn;\n \t}\n \n-\tif (f_info->lb_en)\n+\tif (FIELD_GET(ICE_FLTR_INFO_LB_LAN_VALUE_M, f_info->lb_en))\n \t\tact |= ICE_SINGLE_ACT_LB_ENABLE;\n-\tif (f_info->lan_en)\n+\tif (FIELD_GET(ICE_FLTR_INFO_LB_LAN_VALUE_M, f_info->lan_en))\n \t\tact |= ICE_SINGLE_ACT_LAN_ENABLE;\n \n \tswitch (f_info->lkup_type) {\ndiff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h\nindex 671d7a5f359f..137eae878ab1 100644\n--- a/drivers/net/ethernet/intel/ice/ice_switch.h\n+++ b/drivers/net/ethernet/intel/ice/ice_switch.h\n@@ -72,6 +72,14 @@ enum ice_src_id {\n \tICE_SRC_ID_LPORT,\n };\n \n+#define ICE_FLTR_INFO_LB_LAN_VALUE_M BIT(0)\n+#define ICE_FLTR_INFO_LB_LAN_FORCE_M BIT(1)\n+#define ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED\t\t\t \\\n+\t(FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_VALUE_M, 1) | \\\n+\t FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, 1))\n+#define ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED\t\t\t \\\n+\t(FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, 1))\n+\n struct ice_fltr_info {\n \t/* Look up information: how to look up packet */\n \tenum ice_sw_lkup_type lkup_type;\n@@ -131,9 +139,14 @@ struct ice_fltr_info {\n \t */\n \tu8 qgrp_size;\n \n-\t/* Rule creations populate these indicators basing on the switch type */\n-\tu8 lb_en;\t/* Indicate if packet can be looped back */\n-\tu8 lan_en;\t/* Indicate if packet can be forwarded to the uplink */\n+\t/* Following members have two bits: VALUE and FORCE. Rule creation will\n+\t * populate VALUE bit of these members based on switch type, but only if\n+\t * their FORCE bit is not set.\n+\t *\n+\t * See ICE_FLTR_INFO_LB_LAN_VALUE_M and ICE_FLTR_INFO_LB_LAN_FORCE_M.\n+\t */\n+\tu8 lb_en;\t/* VALUE bit: packet can be looped back */\n+\tu8 lan_en;\t/* VALUE bit: packet can be forwarded to the uplink */\n };\n \n struct ice_update_recipe_lkup_idx_params {\n", "prefixes": [ "iwl-next", "v4", "3/7" ] }