Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2193054/?format=api
{ "id": 2193054, "url": "http://patchwork.ozlabs.org/api/patches/2193054/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260204154418.1285309-5-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-5-jakub.slepecki@intel.com>", "list_archive_url": null, "date": "2026-02-04T15:44:15", "name": "[iwl-next,v4,4/7] ice: update mac, vlan rules when toggling between VEB and VEPA", "commit_ref": null, "pull_url": null, "state": "under-review", "archived": false, "hash": "d7044d29df377344c580cca44c746f7c38854326", "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-5-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/2193054/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2193054/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=O6BHHk27;\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 4f5l676jFTz1xpg\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 05 Feb 2026 02:44:47 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 2A8DE60FA2;\n\tWed, 4 Feb 2026 15:44:39 +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 Z96c4hz0SOwM; Wed, 4 Feb 2026 15:44:37 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 2F6B2610C3;\n\tWed, 4 Feb 2026 15:44:35 +0000 (UTC)", "from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by lists1.osuosl.org (Postfix) with ESMTP id 8C206F5\n for <intel-wired-lan@lists.osuosl.org>; Wed, 4 Feb 2026 15:44:32 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id 7C0A280CA6\n for <intel-wired-lan@lists.osuosl.org>; Wed, 4 Feb 2026 15:44:31 +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 c1Vk3Puay-f4 for <intel-wired-lan@lists.osuosl.org>;\n Wed, 4 Feb 2026 15:44:30 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.8])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 79C6980B3F\n for <intel-wired-lan@lists.osuosl.org>; Wed, 4 Feb 2026 15:44:30 +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:30 -0800", "from hpe-dl385gen10.igk.intel.com ([10.91.240.117])\n by orviesa010.jf.intel.com with ESMTP; 04 Feb 2026 07:44:28 -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 2F6B2610C3", "OpenDKIM Filter v2.11.0 smtp1.osuosl.org 79C6980B3F" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1770219875;\n\tbh=uKyNx8lMoHJQ/Jfxt76k9bG+ZskJPSeHH3I+fJIkJSA=;\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=O6BHHk27RB6R9cypMisO40VB2NsUtw+yM0UL3/x+K9waRh6TKPvNj10HYdeuH47SE\n\t 6K5MvHRbEXthvsgPD52FN8BDwOq5j7vaHFXW8ParSw9d/K06edViXg1v9NvZYQCoWM\n\t 5FRTVV10XYgmXEwArui4jI4y9sbtevVwBbSOP6gfsKfO/GYZ0pZyNSl2/jLGf8D2DY\n\t fqpq09Yqx7Igo41yV/HHSgp50U4rTkeoDWfioTEd03Dg4EeAoxvzlyhAm6xENv98VH\n\t 2WrPEklahq7Iw1ruOdvu5rfk/bNkO1WdCsLAkvFnldJkYBw2W5dY50GRhbRrpDzG8O\n\t VbX5OQVOURM9g==", "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 79C6980B3F", "X-CSE-ConnectionGUID": [ "cn7EktiQS0uVa7OJvTxKqg==", "cFOsk7zVSginhXY31HNwMw==" ], "X-CSE-MsgGUID": [ "ZjYNE0WxS/iRhN/4cRc2Dw==", "a+e4FSwITle8ySiOHsA5fQ==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11691\"; a=\"88987101\"", "E=Sophos;i=\"6.21,272,1763452800\"; d=\"scan'208\";a=\"88987101\"", "E=Sophos;i=\"6.21,272,1763452800\"; d=\"scan'208\";a=\"209494127\"" ], "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:15 +0100", "Message-ID": "<20260204154418.1285309-5-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=1770219870; x=1801755870;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=VtWdhFUE9gOJbP7DjdO6rFEgJIeaxW8Qh0Bpnc0ITuA=;\n b=JjJyxBH/oeAHWOikgpSSFyKEG++wECuThyfIkD1Uy9+m/DBhdtBHLIbI\n AHOmZ8LAKImtBWnCHjaXVzf04rlOdffZtJcQ3lEb3TkC5N3OQR7K/LKhE\n Dz2n71eoNchcKC4JgCg5qitzFlZaXHBr5DaBsTPL8dHw+A42LJ/yZdx23\n MXwLYNrOfDjFz8WIj6rR9s+N9tptk0ko1Hs1OfWzWiRpNxD/8VqR0Scg4\n T1eud4btzML/i+gnz9K6dtjbfm/17Mv3tWnpXTHLaRNtTYYKrHsWMdrLX\n 3VAEFHr6f/9sPNoeU+XqyYeBT/Ts3TioVKiiLgWoroJW2x1SLvGzo7tpf\n g==;", "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=JjJyxBH/" ], "Subject": "[Intel-wired-lan] [PATCH iwl-next v4 4/7] ice: update mac,\n vlan rules when toggling between VEB and VEPA", "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": "When changing into VEPA mode MAC rules are modified to forward all traffic\nto the wire instead of allowing some packets to go into the loopback.\nMAC,VLAN rules may and will also be used to forward loopback traffic\nin VEB, so when we switch to VEPA, we want them to behave similarly to\nMAC-only rules.\n\nice_vsi_update_bridge_mode() will now attempt a rollback of switch\nfilters in case an update fails. If the rollback also fails, we will\nnow return the rollback error instead of the initial error.\n\nReviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\nSigned-off-by: Jakub Slepecki <jakub.slepecki@intel.com>\n\n---\nTesting hints:\n MAC,VLAN rules are created only if entire series is applied.\n The easiest way to test that rules were adjusted is to run traffic\n and observe what packets are sent to LAN. VEPA is expected to behave\n same as before the series. VEB is expected to (a) behave like VEPA\n if loopback traffic would cross VLANs, or (b) behave as before.\n Traffic from/to external hosts is expected to remain unchanged.\n \n Refer to cover letter (0/7) for full network configuration. To\n change hwmode use:\n\n # bridge link set dev $pf hwmode {veb,vepa}\n\nNo changes in v4.\n\nChanges in v3:\n - Refer to reproduction in cover letter in current 4/7.\n\nChanges in v2:\n - Close open parenthesis in ice_vsi_update_bridge_mode() description.\n - Explain returns in ice_vsi_update_bridge_mode().\n---\n drivers/net/ethernet/intel/ice/ice_main.c | 48 +++++++++++++++++----\n drivers/net/ethernet/intel/ice/ice_switch.c | 8 ++--\n drivers/net/ethernet/intel/ice/ice_switch.h | 3 +-\n 3 files changed, 46 insertions(+), 13 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex cb80b77d29fd..7b3ab69b8300 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -8208,8 +8208,16 @@ static int ice_vsi_update_bridge_mode(struct ice_vsi *vsi, u16 bmode)\n *\n * Sets the bridge mode (VEB/VEPA) of the switch to which the netdev (VSI) is\n * hooked up to. Iterates through the PF VSI list and sets the loopback mode (if\n- * not already set for all VSIs connected to this switch. And also update the\n+ * not already set for all VSIs connected to this switch). And also update the\n * unicast switch filter rules for the corresponding switch of the netdev.\n+ *\n+ * Return:\n+ * * %0 if mode was set, propagated to VSIs, and changes to filters were all\n+ * successful,\n+ * * %-EINVAL if requested netlink attributes or bridge mode were invalid,\n+ * * otherwise an error from VSI update, filter rollback, or filter update is\n+ * forwarded. This may include %-EINVAL. See ice_vsi_update_bridge_mode() and\n+ * ice_update_sw_rule_bridge_mode().\n */\n static int\n ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,\n@@ -8219,8 +8227,8 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,\n \tstruct ice_pf *pf = ice_netdev_to_pf(dev);\n \tstruct nlattr *attr, *br_spec;\n \tstruct ice_hw *hw = &pf->hw;\n+\tint rem, v, rb_err, err = 0;\n \tstruct ice_sw *pf_sw;\n-\tint rem, v, err = 0;\n \n \tpf_sw = pf->first_sw;\n \t/* find the attribute in the netlink message */\n@@ -8230,6 +8238,7 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,\n \n \tnla_for_each_nested_type(attr, IFLA_BRIDGE_MODE, br_spec, rem) {\n \t\t__u16 mode = nla_get_u16(attr);\n+\t\tu8 old_evb_veb = hw->evb_veb;\n \n \t\tif (mode != BRIDGE_MODE_VEPA && mode != BRIDGE_MODE_VEB)\n \t\t\treturn -EINVAL;\n@@ -8251,17 +8260,38 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,\n \t\t/* Update the unicast switch filter rules for the corresponding\n \t\t * switch of the netdev\n \t\t */\n-\t\terr = ice_update_sw_rule_bridge_mode(hw);\n+\t\terr = ice_update_sw_rule_bridge_mode(hw, ICE_SW_LKUP_MAC);\n+\t\tif (err) {\n+\t\t\t/* evb_veb is expected to be already reverted in error\n+\t\t\t * path because of the potential rollback.\n+\t\t\t */\n+\t\t\thw->evb_veb = old_evb_veb;\n+\t\t\tgoto err_without_rollback;\n+\t\t}\n+\t\terr = ice_update_sw_rule_bridge_mode(hw, ICE_SW_LKUP_MAC_VLAN);\n \t\tif (err) {\n-\t\t\tnetdev_err(dev, \"switch rule update failed, mode = %d err %d aq_err %s\\n\",\n-\t\t\t\t mode, err,\n+\t\t\t/* ice_update_sw_rule_bridge_mode looks this up, so we\n+\t\t\t * must revert it before attempting a rollback.\n+\t\t\t */\n+\t\t\thw->evb_veb = old_evb_veb;\n+\t\t\tgoto err_rollback_mac;\n+\t\t}\n+\t\tpf_sw->bridge_mode = mode;\n+\t\tcontinue;\n+\n+err_rollback_mac:\n+\t\trb_err = ice_update_sw_rule_bridge_mode(hw, ICE_SW_LKUP_MAC);\n+\t\tif (rb_err) {\n+\t\t\tnetdev_err(dev, \"switch rule update failed, mode = %d err %d; rollback failed, err %d aq_err %s\\n\",\n+\t\t\t\t mode, err, rb_err,\n \t\t\t\t libie_aq_str(hw->adminq.sq_last_status));\n-\t\t\t/* revert hw->evb_veb */\n-\t\t\thw->evb_veb = (pf_sw->bridge_mode == BRIDGE_MODE_VEB);\n-\t\t\treturn err;\n+\t\t\treturn rb_err;\n \t\t}\n \n-\t\tpf_sw->bridge_mode = mode;\n+err_without_rollback:\n+\t\tnetdev_err(dev, \"switch rule update failed, mode = %d err %d aq_err %s\\n\",\n+\t\t\t mode, err, libie_aq_str(hw->adminq.sq_last_status));\n+\t\treturn err;\n \t}\n \n \treturn 0;\ndiff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c\nindex 3caccd798220..3b526383b8ed 100644\n--- a/drivers/net/ethernet/intel/ice/ice_switch.c\n+++ b/drivers/net/ethernet/intel/ice/ice_switch.c\n@@ -3067,10 +3067,12 @@ ice_update_pkt_fwd_rule(struct ice_hw *hw, struct ice_fltr_info *f_info)\n /**\n * ice_update_sw_rule_bridge_mode\n * @hw: pointer to the HW struct\n+ * @lkup: recipe/lookup type to update\n *\n * Updates unicast switch filter rules based on VEB/VEPA mode\n */\n-int ice_update_sw_rule_bridge_mode(struct ice_hw *hw)\n+int ice_update_sw_rule_bridge_mode(struct ice_hw *hw,\n+\t\t\t\t enum ice_sw_lkup_type lkup)\n {\n \tstruct ice_switch_info *sw = hw->switch_info;\n \tstruct ice_fltr_mgmt_list_entry *fm_entry;\n@@ -3078,8 +3080,8 @@ int ice_update_sw_rule_bridge_mode(struct ice_hw *hw)\n \tstruct mutex *rule_lock; /* Lock to protect filter rule list */\n \tint status = 0;\n \n-\trule_lock = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rule_lock;\n-\trule_head = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rules;\n+\trule_lock = &sw->recp_list[lkup].filt_rule_lock;\n+\trule_head = &sw->recp_list[lkup].filt_rules;\n \n \tmutex_lock(rule_lock);\n \tlist_for_each_entry(fm_entry, rule_head, list_entry) {\ndiff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h\nindex 137eae878ab1..b442db4a2ce5 100644\n--- a/drivers/net/ethernet/intel/ice/ice_switch.h\n+++ b/drivers/net/ethernet/intel/ice/ice_switch.h\n@@ -366,7 +366,8 @@ int\n ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,\n \t\t u16 lkups_cnt, struct ice_adv_rule_info *rinfo,\n \t\t struct ice_rule_query_data *added_entry);\n-int ice_update_sw_rule_bridge_mode(struct ice_hw *hw);\n+int ice_update_sw_rule_bridge_mode(struct ice_hw *hw,\n+\t\t\t\t enum ice_sw_lkup_type lkup);\n int ice_add_vlan(struct ice_hw *hw, struct list_head *m_list);\n int ice_remove_vlan(struct ice_hw *hw, struct list_head *v_list);\n int ice_add_mac(struct ice_hw *hw, struct list_head *m_lst);\n", "prefixes": [ "iwl-next", "v4", "4/7" ] }