From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 047711098781 for ; Fri, 20 Mar 2026 13:19:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AA531847CA; Fri, 20 Mar 2026 13:19:13 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id RuXHzA1ojjv8; Fri, 20 Mar 2026 13:19:13 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2A2D4847CE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1774012753; bh=9MLYYERdfFA1CB4OH/+XWHwZn9CqGwo7sksbez6iZNc=; h=Date:To:Cc:References:From:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BViC/SGYYCoRsROLnOM1eNBeu5RMM+joaTuPADHyxbpFzd7WLUaGtm58vhsTYqdrL 9wHNyvBtl3yuRrvLPPLM+DX/il065ZTAnzYFAErv0wXOmSGZEvzaJcFwreRR/bEDtn BvGp+rlAlv0UmBs89ve1q+LDTJbX4XnQhYU/jpb01fH1RrLESbY64CCojj4XKyLOKz rXNRpYc07GNOlhc20AnuwgjU7axWENhx+n8jqHptzwzOB2Qi3ns0YLSG8cUaLfYMT7 aY0f1TOBy2fbxM8eJwr1Ndsn/IzbxVEKhzpL9Fv3QQYvJUYPzGf1ZT3/abdJfRgRUS osSrhMYqDWj+g== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 2A2D4847CE; Fri, 20 Mar 2026 13:19:13 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 1F3D91B6 for ; Fri, 20 Mar 2026 13:19:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0815041CC7 for ; Fri, 20 Mar 2026 13:19:12 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id gfN4uQBQ1EfD for ; Fri, 20 Mar 2026 13:19:11 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.11; helo=mgamail.intel.com; envelope-from=marcin.szycik@linux.intel.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org EFAFA41CC5 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EFAFA41CC5 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by smtp4.osuosl.org (Postfix) with ESMTPS id EFAFA41CC5 for ; Fri, 20 Mar 2026 13:19:10 +0000 (UTC) X-CSE-ConnectionGUID: UEHPyYT5R9qzJCQZEg9riw== X-CSE-MsgGUID: W5XUoZUZQjORG3UOT0sDjw== X-IronPort-AV: E=McAfee;i="6800,10657,11735"; a="85722485" X-IronPort-AV: E=Sophos;i="6.23,130,1770624000"; d="scan'208";a="85722485" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2026 06:19:10 -0700 X-CSE-ConnectionGUID: Lx423qDxSKu/l1MtS1QhTQ== X-CSE-MsgGUID: USvdCJOpRS2ELwjrPwdxxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,130,1770624000"; d="scan'208";a="227409341" Received: from mszycik-mobl1.ger.corp.intel.com (HELO [10.246.17.139]) ([10.246.17.139]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2026 06:19:07 -0700 Message-ID: Date: Fri, 20 Mar 2026 14:18:59 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Aleksandr Loktionov , intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com Cc: netdev@vger.kernel.org, Marcin Szycik , Martyna Szapar-Mudlaw References: <20260320050556.422762-1-aleksandr.loktionov@intel.com> Content-Language: en-US From: Marcin Szycik In-Reply-To: <20260320050556.422762-1-aleksandr.loktionov@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1774012751; x=1805548751; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=qZa3UKNeYYMd21cN91QyetESTuvn9ZfMASz3YdI2F6c=; b=GPQ08PbE6YkIucK/2bcVqIGLNUrvsmiz4HCItJ4cYmgJXT8D72cV/WVf WFDLbvgSFXMBboyVg4RxwHqSsso4ORcnjo9NREpEGT0UiCOR2z8R8ZMql dM91emR7SFDBIRzyGro8jHkASwX+jBNjVOhYULLbqD8q40Mt7ffoT8VQL 3ezwWnDd1tY4rhoRKBBkOE89BwXfP/ROT9n7LGQEGYgQLvI/zg0+YZnqR ALX6c8iuugERuoRAcTShHiE2TfBn3dg7TNEG6zT+EJjonsThrvF7Xt3Pn ZaiwXagv2eVXET1ZCo/XQkZSKmPG5zGb7zByQ7mq73Af8gLNiSofkNAKt A==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=none (p=none dis=none) header.from=linux.intel.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=GPQ08PbE Subject: Re: [Intel-wired-lan] [PATCH iwl-next] ice: use ice_fill_eth_hdr() in ice_fill_sw_rule() X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On 20.03.2026 06:05, Aleksandr Loktionov wrote: > From: Marcin Szycik ACK > Use the already existing helper function to fill Ethernet header. Also > replace sizeof with a (also existing) macro to reduce the number of > variables. > > Suggested-by: Martyna Szapar-Mudlaw > Signed-off-by: Marcin Szycik > Signed-off-by: Aleksandr Loktionov > --- > drivers/net/ethernet/intel/ice/ice_switch.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c > index bb0f990..6496534 100644 > --- a/drivers/net/ethernet/intel/ice/ice_switch.c > +++ b/drivers/net/ethernet/intel/ice/ice_switch.c > @@ -2612,7 +2612,6 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info, > u16 vlan_id = ICE_MAX_VLAN_ID + 1; > u16 vlan_tpid = ETH_P_8021Q; > void *daddr = NULL; > - u16 eth_hdr_sz; > u8 *eth_hdr; > u32 act = 0; > __be16 *off; > @@ -2625,11 +2624,10 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info, > return; > } > > - eth_hdr_sz = sizeof(dummy_eth_header); > eth_hdr = s_rule->hdr_data; > > /* initialize the ether header with a dummy header */ > - memcpy(eth_hdr, dummy_eth_header, eth_hdr_sz); > + ice_fill_eth_hdr(eth_hdr); > ice_fill_sw_info(hw, f_info); > > switch (f_info->fltr_act) { > @@ -2730,7 +2728,7 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info, > > /* Create the switch rule with the final dummy Ethernet header */ > if (opc != ice_aqc_opc_update_sw_rules) > - s_rule->hdr_len = cpu_to_le16(eth_hdr_sz); > + s_rule->hdr_len = cpu_to_le16(DUMMY_ETH_HDR_LEN); > } > > /**