From patchwork Wed May 8 17:33:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13658956 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92922127E34 for ; Wed, 8 May 2024 17:33:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189634; cv=none; b=Ga86V08f0jpmol8Uxg/eFW5YzFDOocXCOUjo0DsE6X9i/uX4FlHPQdpmtnKrukL9Nlk6WzdYeVQa6FJ8bKfOyHMNz+eFAcEwpQor6wTBpoHUKu+iwMdwXFwqdw/pw1KPYgjaGA0AoSRmzUdd9Jg5QKugclTwyS5Uyq5FeHmroOI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189634; c=relaxed/simple; bh=+rUXdlHEyy7kwyMtKRB+ZWoUZ9vj9Z0ixiPDttmOnyM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IIaywyqwR05u/ZFYIlTLeCeqn5Aac1Y1+RhaMLjLw6XWtJuFbdlk7nrUjYGSEG7CrCDSb+wjOnKtaQJDpCehfJmcuMrhW3OxwSE1l9jz0CB5v2vUkz1eT5UshbICcY7ZSzJhh5kfJf/9Yi5FKpwXClJTsfmyIKfAiuvttjKeqmQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=a5gJeJqH; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="a5gJeJqH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715189632; x=1746725632; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+rUXdlHEyy7kwyMtKRB+ZWoUZ9vj9Z0ixiPDttmOnyM=; b=a5gJeJqH9kx+9WTfT/TPbloOgbaeDwtjiwGMU/dqQXwtSezGVxBlsJAj VslD8YViCcw1a/Be8L4xyqk5W4kttukp+P1RpGZxD7ipkLUjHIHuASd9j PeJjZICOnGuAyydYuehmRIAnH8qm+GRjcjyIpyjzzS+4RY3Uph7vm+bZx vQHzxXvFsgzrPUbS4JmYynxDGSPHVpIrDlgkfQaC6D5q0nhQRTPxd02Q6 BXfGEQbHpYqps0km/BfWnE2rJL2QgdHRXcujZv3KyRSJxNWN63lvrBAtQ 3Yej7BA+1iaeTGj9xYBgdD5bg4veHsuu0EbNsSwZ0ojzR6awMdpZ2cB0r A==; X-CSE-ConnectionGUID: n7G/LxQHRwygxGkDXuG/kQ== X-CSE-MsgGUID: VPZDrFJvRDmQh3OckSziBg== X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="10938939" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="10938939" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 10:33:51 -0700 X-CSE-ConnectionGUID: DSWI0EOwSlu2hFOmLxJRVQ== X-CSE-MsgGUID: z4Bmr4IMTXmLOcb1DafYQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="28843707" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 08 May 2024 10:33:51 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , anthony.l.nguyen@intel.com, Simon Horman , Sujai Buvaneswaran Subject: [PATCH net-next 1/7] i40e: flower: validate control flags Date: Wed, 8 May 2024 10:33:33 -0700 Message-ID: <20240508173342.2760994-2-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> References: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Asbjørn Sloth Tønnesen This driver currently doesn't support any control flags. Use flow_rule_has_control_flags() to check for control flags, such as can be set through `tc flower ... ip_flags frag`. In case any control flags are masked, flow_rule_has_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP. Only compile-tested. Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 143e37ae88ef..1f188c052828 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -8671,6 +8671,10 @@ static int i40e_parse_cls_flower(struct i40e_vsi *vsi, flow_rule_match_control(rule, &match); addr_type = match.key->addr_type; + + if (flow_rule_has_control_flags(match.mask->flags, + f->common.extack)) + return -EOPNOTSUPP; } if (addr_type == FLOW_DISSECTOR_KEY_IPV4_ADDRS) { From patchwork Wed May 8 17:33:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13658957 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3822012AAEC for ; Wed, 8 May 2024 17:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189634; cv=none; b=eulkVUvCWyZ7AlQR+ZEkiwyGP+QuthD6ScS6xzOdNEA63k/69OW+gEmFpBJ9u6xaR0PI9tnHGd+HSd63zPYLlBUT8pQQwZWJ4JR8q04k8KemRvd/59ogc1HOUiwbDt0YpJMTG2OIkiROfHzrg0NfTiEjZV2kxXfBny2ksBE0/28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189634; c=relaxed/simple; bh=WBiSsgbBUNtAglsHoC5hNdDSuNKpU1nH1GioWhG2ma4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ueScAloCwMSAWeXx7NuPcXrXWJ7VRRO9ycjJtjUoBMYK+PQp58y6AOlkjNnoD9SMk7tbEasse7A5UERM/W/fNQX8dx6PeLKGk+ub1JUAbZ7Dz1nvtMAKON0J7OXFXTA+ydW7GdxQ2mSmN+05b9dGm/mXqjCRVkuh9CcVLAwrROQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=coJ7KI36; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="coJ7KI36" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715189633; x=1746725633; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WBiSsgbBUNtAglsHoC5hNdDSuNKpU1nH1GioWhG2ma4=; b=coJ7KI36Pdc9Em8esvO6VCrfJgekuA3o3cAoHLdBIn5YO0d1c8s2543G zVRgACsqHw4qt5Y5d+PaiKAnNOX8MkGtL5VwCtLclYiSDRdMx42ql9Uw2 Sz/aAVtaJg1BnMqwy4r+WiQPn+o7vQv8hAoF1H68AohDs4EJspCRxI11N YO8eUe8GNQmNf8ixiFJh+EhoEy/HVJlfxz87Efg7sBm1uS2KQ9wdSM8a5 e0xqMqAcLcfLVMVMa+iBcfzTbQMGoSCxig/AUNvGJtZdpjmyi7GroOIDD JAKbrc8b2dj52qL3mX85GpKIpT+SNwnoLcDO0BmXT/Mb4XeSy1YbOfIxJ w==; X-CSE-ConnectionGUID: gyJjQqViT5OC+/MXpebrHg== X-CSE-MsgGUID: 3pURlmNTRECG5mpEq5loTg== X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="10938947" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="10938947" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 10:33:51 -0700 X-CSE-ConnectionGUID: PwELXY4zT2GWgMYtJykBjQ== X-CSE-MsgGUID: C9pAzyd3Sd+jtVOEVAaPhA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="28843710" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 08 May 2024 10:33:51 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , anthony.l.nguyen@intel.com, Simon Horman , Sujai Buvaneswaran Subject: [PATCH net-next 2/7] iavf: flower: validate control flags Date: Wed, 8 May 2024 10:33:34 -0700 Message-ID: <20240508173342.2760994-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> References: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Asbjørn Sloth Tønnesen This driver currently doesn't support any control flags. Use flow_rule_has_control_flags() to check for control flags, such as can be set through `tc flower ... ip_flags frag`. In case any control flags are masked, flow_rule_has_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP. Only compile-tested. Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/iavf/iavf_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index d4699c4c535d..c6dff0963053 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -3757,6 +3757,10 @@ static int iavf_parse_cls_flower(struct iavf_adapter *adapter, flow_rule_match_control(rule, &match); addr_type = match.key->addr_type; + + if (flow_rule_has_control_flags(match.mask->flags, + f->common.extack)) + return -EOPNOTSUPP; } if (addr_type == FLOW_DISSECTOR_KEY_IPV4_ADDRS) { From patchwork Wed May 8 17:33:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13658958 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9EAE812B156 for ; Wed, 8 May 2024 17:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189635; cv=none; b=M8GMmXIXS9qV6bSfwwqaeuMLXlqF3NAI3RHDHBHlNEZYkQaIRt81Ma3wXsDbLCa2CiF9jh8UTo/S2h10t6ZSisSAZljOVQ1KqgsoMaKugG1FG64NxzyuUyYverC2TrHU65hexDVvZ0VzWfxxP9rQh/AT0iaIGbT/v/5C7xAfeFo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189635; c=relaxed/simple; bh=AJWQtHY/Gl5ou1kfkMv5lyL7Co1FgnX75ygFF9J1XsA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=f91kJ5UtTLCkdruR0BU77Bdmmz3tlreI4tfK3U3Xi+gQCvwBGp5e6HLo2FS6UIJG5mXWpUTBfAucYekqOPQlO3XpUKmrfD/GAAp9EO3kxronatsBqwiEgQL3SFOR2Y3Y6KJvVG2Gvplq2xSR50fNZImJ8j8osekoLp1V7NGXjmI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=N1ilIi5r; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="N1ilIi5r" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715189633; x=1746725633; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AJWQtHY/Gl5ou1kfkMv5lyL7Co1FgnX75ygFF9J1XsA=; b=N1ilIi5rFat7SRFh0NT4Y81uunZQ/AISu73AWMSQehq/wgBDJLMU2r73 VR04Rm+0OI9OJ4yEfOQfELxifPhCD1X/6bGTpzwxS5HYtGq2h3WCpYM4k aQzwdUAYtvaXr6epYimtR4iqSv/fcp1nC1a2F+klQVM4ezpJtojMlGgiH cTu9E9HqGb5aZqKElRgTBkds0S3UL8bcKAi5GmYmd301NdqfnJ44Logd7 J4yhvnaIn7Ezw/M/Pq9HLRHLtm9ArV7igTfn2/Fc/rkKsU2rM5Btqh1gQ l+d3q//ABUu5NXBwsZtiS5EWfXFKC9AvFSvNjTDz4ohWk2Wlv8DJNyGVU w==; X-CSE-ConnectionGUID: fEo7NETTTCitsxsqxQYFvA== X-CSE-MsgGUID: su8PKgf/T1y3Ht17FwcnGg== X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="10938955" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="10938955" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 10:33:51 -0700 X-CSE-ConnectionGUID: SrudjMmnTIuglTigTro5vQ== X-CSE-MsgGUID: iwcOs3erSJaQHeqzxmUP5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="28843713" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 08 May 2024 10:33:51 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , anthony.l.nguyen@intel.com, Michal Swiatkowski , Simon Horman , Sujai Buvaneswaran Subject: [PATCH net-next 3/7] ice: flower: validate control flags Date: Wed, 8 May 2024 10:33:35 -0700 Message-ID: <20240508173342.2760994-4-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> References: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Asbjørn Sloth Tønnesen This driver currently doesn't support any control flags. Use flow_rule_has_control_flags() to check for control flags, such as can be set through `tc flower ... ip_flags frag`. In case any control flags are masked, flow_rule_has_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP. Only compile-tested. Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Michal Swiatkowski Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_tc_lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c index 8553c56dc95d..8bd24b33f3a6 100644 --- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c @@ -1658,6 +1658,10 @@ ice_parse_cls_flower(struct net_device *filter_dev, struct ice_vsi *vsi, flow_rule_match_control(rule, &match); addr_type = match.key->addr_type; + + if (flow_rule_has_control_flags(match.mask->flags, + fltr->extack)) + return -EOPNOTSUPP; } if (addr_type == FLOW_DISSECTOR_KEY_IPV4_ADDRS) { From patchwork Wed May 8 17:33:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13658959 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37EB612BE9D for ; Wed, 8 May 2024 17:33:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189635; cv=none; b=rsLY/v2tvKRsLuHHk9d/SStPsnbp/cpqQ7DnpAubCHgqUQLBvmuqchZiXF641h6URPv3TpxEvzlSr1cw/07JTcvq1Wt9sAIUSrES17R7HWgOURnal/wWOGEqvj0YUmu157WmHx2LRytmv+DT6X6lB+CV23an3emLXAyCoxBzfaQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189635; c=relaxed/simple; bh=i2rE7RB46M3I6tqFG9AwFsAkKlvwz1kxaqxYlQYQ8Bg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rQ8p3DvnjgJFWJX/j1hWjhM61wS1u88G9hkcfGq9bk/7+KKbWuWKxvtCfhPqZBQim8Qf9zKYSlXDRbTyDJu8qeZTOnNfH1RXWN+5bjINAgpGah53lY+sU66K40fSxNI9GB1hakPQntLZ49hIO7FaJX4i5DibkE4+aWTZ7siSQQE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Tq4wJkch; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Tq4wJkch" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715189634; x=1746725634; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i2rE7RB46M3I6tqFG9AwFsAkKlvwz1kxaqxYlQYQ8Bg=; b=Tq4wJkchSWXn/Jpba2qhhnpm1k8/Xuo2TvzZV6cjeyxQXBIW6MZUqfyT xHHH+53fz9rOOsNI/gp9CQvip0EViHMnQTAewg0z2/HHObWyMKrWUwTnh cjoTZ39d41MwQR2p5c+lo+If2kp9+MqPmXr7fRPyRtSX1k1takP+4LAkF N9kc0le488OnQOw8SxSMN9DSrajdJEiTC6Zqh/KANOqOIJct/fb3t0q8Y tDlDbGz0UC6SaNZItHy6AIUjTNBzHLIsPP1M+NGM1xFBWveevVbf87lyH gozkbQeOA2YiIg4JCLre+nBT0s+bK+zoAnUM2H5Qs9ot/DoOz8yWIWj5L A==; X-CSE-ConnectionGUID: e6P6UH6tSAauEecO2vY8EQ== X-CSE-MsgGUID: 5ljq+R9BRFKI/veevrraRw== X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="10938963" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="10938963" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 10:33:51 -0700 X-CSE-ConnectionGUID: ydxxWsgfTFGYdSR1s2u5Yg== X-CSE-MsgGUID: NHB+mebTTJGSKnmGfh84fA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="28843716" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 08 May 2024 10:33:51 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: =?utf-8?q?Asbj=C3=B8rn_Sloth_T=C3=B8nnesen?= , anthony.l.nguyen@intel.com, Simon Horman , Pucha Himasekhar Reddy Subject: [PATCH net-next 4/7] igb: flower: validate control flags Date: Wed, 8 May 2024 10:33:36 -0700 Message-ID: <20240508173342.2760994-5-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> References: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Asbjørn Sloth Tønnesen This driver currently doesn't support any control flags. Use flow_rule_match_has_control_flags() to check for control flags, such as can be set through `tc flower ... ip_flags frag`. In case any control flags are masked, flow_rule_match_has_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP. Only compile-tested. Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Simon Horman Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igb/igb_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 7d9389040e40..fce2930ae6af 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -2597,6 +2597,9 @@ static int igb_parse_cls_flower(struct igb_adapter *adapter, return -EOPNOTSUPP; } + if (flow_rule_match_has_control_flags(rule, extack)) + return -EOPNOTSUPP; + if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) { struct flow_match_eth_addrs match; From patchwork Wed May 8 17:33:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13658962 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C10E312BF06 for ; Wed, 8 May 2024 17:33:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189637; cv=none; b=EMof9QVMssK9BGRTYU29H4EMvC6DgLn+aZGovBSekHPVEo/ZYu7HeAtcodRzt1/ZUxQja+DWLy8o1pAfH+HokrbNyOWjpi7blloIg5qny4//obk4oi7uEJIMC7wtB9ayUnxjbMgk4XczmjvJj/HQYNzq5whnOTd6vr5QnTPLvnA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189637; c=relaxed/simple; bh=bd4feFvKbjqOv94UXOdYnIEnDyv/yB3NTDkVfaG20HU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qW9UBnOp0ixxluLhmUS9wSmCt1yq3J+3sz9GuELF8pdyooZPniv3wVA4fgWZ+cc+dFk+xZMnXq5yCtvfwVG4816avVBTKZrIBiJNZWCGI3vIETmiGVCyfd89JbvgLs95qA64XwGuY9h/pvPFsMZA0iq7zKwQWs6kYOfrdq0OKBo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=SKYle/7n; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SKYle/7n" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715189635; x=1746725635; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bd4feFvKbjqOv94UXOdYnIEnDyv/yB3NTDkVfaG20HU=; b=SKYle/7n7pNe1HectSH835o24KtNLLUVE8371ISQG+feZqYLCRtHGD5n Nxg71ySD2CdfI4shRWJM5YOUzNKoeIfaYxhJWpuZQ94LiCddbRCje/hfh qRm1Fpz7Gyo3ofk8lS5YvfclAnBJSYKLms3j1uWa3YscIbVwXfW2Col4E bE1wqqb95b0f4QnEzRt+dRXtrZfdq0tq0e9/WF/4wLiHzJVLbg94Rj9C+ kAs3Pwpx0tdu5k0FSTiur+sOQtEcUWzFQSLgaQGCzqqxRFuO8cSbXbYsI GJHfTLi/CDWOQpxtu7sGlqLtH9F8LXV7iO7ZqlBgl5tjYWLp0MnUEk6u3 A==; X-CSE-ConnectionGUID: l43CHNByTj2vFeHf0KXueA== X-CSE-MsgGUID: YgD+AQqsSBuKL7n7btvtSg== X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="10938970" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="10938970" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 10:33:52 -0700 X-CSE-ConnectionGUID: t17WCCHnRya9CsOjDRGhdA== X-CSE-MsgGUID: dAtnRWIGRxWpBqJBZwfCjg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="28843719" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 08 May 2024 10:33:51 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: Michal Swiatkowski , anthony.l.nguyen@intel.com, Wojciech Drewek , Marcin Szycik , Simon Horman , Sujai Buvaneswaran Subject: [PATCH net-next 5/7] ice: remove correct filters during eswitch release Date: Wed, 8 May 2024 10:33:37 -0700 Message-ID: <20240508173342.2760994-6-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> References: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Michal Swiatkowski ice_clear_dflt_vsi() is only removing default rule. Both default RX and TX rule should be removed during release. If it isn't switching to switchdev, second time results in error, because TX filter is already there. Fix it by removing the correct set of rules. Fixes: 50d62022f455 ("ice: default Tx rule instead of to queue") Reviewed-by: Wojciech Drewek Signed-off-by: Michal Swiatkowski Signed-off-by: Marcin Szycik Reviewed-by: Simon Horman Tested-by: Sujai Buvaneswaran Signed-off-by: Tony Nguyen --- It is targetting net-next with fix, because the broken patch isn't yet in net repo. drivers/net/ethernet/intel/ice/ice_eswitch.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c index c902848cf88e..b102db8b829a 100644 --- a/drivers/net/ethernet/intel/ice/ice_eswitch.c +++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c @@ -246,7 +246,10 @@ static void ice_eswitch_release_env(struct ice_pf *pf) ice_vsi_update_local_lb(uplink_vsi, false); ice_vsi_update_security(uplink_vsi, ice_vsi_ctx_clear_allow_override); vlan_ops->ena_rx_filtering(uplink_vsi); - ice_clear_dflt_vsi(uplink_vsi); + ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false, + ICE_FLTR_TX); + ice_cfg_dflt_vsi(uplink_vsi->port_info, uplink_vsi->idx, false, + ICE_FLTR_RX); ice_fltr_add_mac_and_broadcast(uplink_vsi, uplink_vsi->port_info->mac.perm_addr, ICE_FWD_TO_VSI); From patchwork Wed May 8 17:33:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13658961 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC36D12C814 for ; Wed, 8 May 2024 17:33:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189637; cv=none; b=XuMhft4mgAvbFsLMaGOuyEMAS44BKpByq0aEOByRZoDV6xoYchtf4U3qSrONg48HHIz1SDjewBWtyx87vIXw5qR7uW8xeukcDjTQhrmnOUJvi4CWTxSp01y3dSblsIdYq/JRJg3e2JGdxUYUB1zrIMjdAJz1EO1z0dghJ5Vi2bM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189637; c=relaxed/simple; bh=+UlE0uRvIBeDGtHuF18/CMaRnd6DaV+tRcmN2Mlr2mI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=P/KDxL9z1AgOVyFLfphQGPmJAL0/x4FjmY9jn35L4OLCQ9bJg5YzOmBFz3cnz7yoqbNd/qPWzKUNYRpeb0M0NELAlxeYdGipr5TrWM0GiLLoa2YvqrXN2TIcR9tNVtydf7/rBof+7LKApQ0Bqxam5MP6iB2I3hwGyf8MywrE4ZA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=TKyJM3mh; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TKyJM3mh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715189636; x=1746725636; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+UlE0uRvIBeDGtHuF18/CMaRnd6DaV+tRcmN2Mlr2mI=; b=TKyJM3mh3BAEZEscgtTLZndKkfCKxseKekL7snZwDFbSE/iH/cBO6CGo EfwHWSQUwNOTayraAP2UwtdWUpSXvLWK3Mkh9jADhaiohGFIdSl5sFViu iU63QU3gEdoNb1wWlnThZb2Beolw92P0s2kdVOMdx6wpx/OY7JX5Obvx9 IkOCMJIwCZl7tHMpOB7iQ7N/s22q5UqvggGiVmd0DGuUfdqqIJZ5NMMvR yvkkN00hGK6eoPtXDaMTUczCc+3YWzbl00kDqzS2224e0jn0U1SvCPpKS lh4AB0wA8eWQa9F9D9VFrPVQLg+LZK49M25fDLJe0cynpzGMAw6dNKu7W Q==; X-CSE-ConnectionGUID: 07ZyBibwRpaRf+YpNm5vqg== X-CSE-MsgGUID: qs1R3HbKQV+ONaAWF0XfJg== X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="10938974" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="10938974" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 10:33:52 -0700 X-CSE-ConnectionGUID: uHYXkWLzTKScGAIu7lPIBQ== X-CSE-MsgGUID: IbX97DHmQVaGSmGvfcisYg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="28843722" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 08 May 2024 10:33:51 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: Corinna Vinschen , anthony.l.nguyen@intel.com, sasha.neftin@intel.com, richardcochran@gmail.com, Hariprasad Kelam , Vinicius Costa Gomes , Naama Meir Subject: [PATCH net-next 6/7] igc: fix a log entry using uninitialized netdev Date: Wed, 8 May 2024 10:33:38 -0700 Message-ID: <20240508173342.2760994-7-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> References: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Corinna Vinschen During successful probe, igc logs this: [ 5.133667] igc 0000:01:00.0 (unnamed net_device) (uninitialized): PHC added ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The reason is that igc_ptp_init() is called very early, even before register_netdev() has been called. So the netdev_info() call works on a partially uninitialized netdev. Fix this by calling igc_ptp_init() after register_netdev(), right after the media autosense check, just as in igb. Add a comment, just as in igb. Now the log message is fine: [ 5.200987] igc 0000:01:00.0 eth0: PHC added Signed-off-by: Corinna Vinschen Reviewed-by: Hariprasad Kelam Acked-by: Vinicius Costa Gomes Tested-by: Naama Meir Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/igc/igc_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index c30f0f572600..b5bcabab7a1d 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -7028,8 +7028,6 @@ static int igc_probe(struct pci_dev *pdev, device_set_wakeup_enable(&adapter->pdev->dev, adapter->flags & IGC_FLAG_WOL_SUPPORTED); - igc_ptp_init(adapter); - igc_tsn_clear_schedule(adapter); /* reset the hardware with the new settings */ @@ -7051,6 +7049,9 @@ static int igc_probe(struct pci_dev *pdev, /* Check if Media Autosense is enabled */ adapter->ei = *ei; + /* do hw tstamp init after resetting */ + igc_ptp_init(adapter); + /* print pcie link status and MAC address */ pcie_print_link_status(pdev); netdev_info(netdev, "MAC: %pM\n", netdev->dev_addr); From patchwork Wed May 8 17:33:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13658960 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39E2212C469 for ; Wed, 8 May 2024 17:33:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189636; cv=none; b=Ij3sWRJ8I1ttaHjgMBlfgkeTYkMpTQ8dw/NcWAhKOro73OTX31qoSPqvAL+26DMELut9YxidKdgWdRLE42g5s+Lt97kVsDCuBDSkZqgmSG+mXg9Z9plyXdphsizDm0SQAhYTY12ehmyLQfS+XVJKh4xesg6y63UlWW5PZ4sLLL8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715189636; c=relaxed/simple; bh=S5kAvu7vvLLNh2OrPSKBV1yzdQzL7XdknFdkUe9c6Oc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EkCFVtxigwn7tzMGkNvYXTwp0gXdaxeiL3FjM7Zp+JGtUIt48pLpv9F3gUF1faTfocv0jn7yjF3Ml9PFKGJB8TcXWerwZJqu7xxgLw4TG9ssHCU80puw9Ukly9+iiLd88essm4FM/mNNA8fyveE8UFgSao1+K599YYmTuqSG3UU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IESRWX5V; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IESRWX5V" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715189635; x=1746725635; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=S5kAvu7vvLLNh2OrPSKBV1yzdQzL7XdknFdkUe9c6Oc=; b=IESRWX5VZuanFw2ifUFgxOBcSKfAk4yAN33IiAz6U1fSHrEvnLLaA6uW gZ6RK36vWZiHAWDPUTJFkA8vttL/6cVfeAGvKBBj2rsK92YcEboscZgq2 eL5h4bOPmV6XtgLxB4vwxLV+YarHnP01bsp/hVL2FlDp1pAGpfAlA+sjE 7ernqU4mydlLF8/kDGOf47sZfFHgaZJz8WgSnCj9nnL279GR+kD9CeXuc rLaA051d4W6tVODVGtxcdHRhfvlRl18b3M0RsvsU8yvVyCqFJ6dtA+cm/ 7uIBK1Va0Rryvbr/+QZXOnOdoMyHgVNvLCRb0jham8yi6zWFYjDhCa06V Q==; X-CSE-ConnectionGUID: TNSNYiJNRE2Lb7x0KBYZgw== X-CSE-MsgGUID: b7aN4xgPSM6P9EteyzsXog== X-IronPort-AV: E=McAfee;i="6600,9927,11067"; a="10938980" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="10938980" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 10:33:52 -0700 X-CSE-ConnectionGUID: FohlTwPFR5OsuEqxfPJgWg== X-CSE-MsgGUID: IsVsMyQ6RAmlL3JniZBw8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="28843725" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa010.jf.intel.com with ESMTP; 08 May 2024 10:33:51 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: =?utf-8?q?Ilpo_J=C3=A4rvinen?= , anthony.l.nguyen@intel.com, Hariprasad Kelam , Jesse Brandeburg , Sasha Neftin Subject: [PATCH net-next 7/7] net: e1000e & ixgbe: Remove PCI_HEADER_TYPE_MFD duplicates Date: Wed, 8 May 2024 10:33:39 -0700 Message-ID: <20240508173342.2760994-8-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> References: <20240508173342.2760994-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Ilpo Järvinen PCI_HEADER_TYPE_MULTIFUNC is define by e1000e and ixgbe and both are unused. There is already PCI_HEADER_TYPE_MFD in pci_regs.h anyway which should be used instead so remove the duplicated defines of it. Signed-off-by: Ilpo Järvinen Reviewed-by: Hariprasad Kelam Reviewed-by: Jesse Brandeburg Acked-by: Sasha Neftin Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/e1000e/defines.h | 2 -- drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/defines.h b/drivers/net/ethernet/intel/e1000e/defines.h index 23a58cada43a..5e2cfa73f889 100644 --- a/drivers/net/ethernet/intel/e1000e/defines.h +++ b/drivers/net/ethernet/intel/e1000e/defines.h @@ -679,8 +679,6 @@ /* PCI/PCI-X/PCI-EX Config space */ #define PCI_HEADER_TYPE_REGISTER 0x0E -#define PCI_HEADER_TYPE_MULTIFUNC 0x80 - #define PHY_REVISION_MASK 0xFFFFFFF0 #define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */ #define MAX_PHY_MULTI_PAGE_REG 0xF diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h index ed440dd0c4f9..897fe357b65b 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h @@ -2179,7 +2179,6 @@ enum { #define IXGBE_PCI_LINK_SPEED_5000 0x2 #define IXGBE_PCI_LINK_SPEED_8000 0x3 #define IXGBE_PCI_HEADER_TYPE_REGISTER 0x0E -#define IXGBE_PCI_HEADER_TYPE_MULTIFUNC 0x80 #define IXGBE_PCI_DEVICE_CONTROL2_16ms 0x0005 #define IXGBE_PCIDEVCTRL2_TIMEO_MASK 0xf