lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250805134042.2604897-2-dhill@redhat.com>
Date: Tue,  5 Aug 2025 09:40:42 -0400
From: David Hill <dhill@...hat.com>
To: netdev@...r.kernel.org
Cc: horms@...nel.org,
	anthony.l.nguyen@...el.com,
	przemyslaw.kitszel@...el.com,
	andrew+netdev@...n.ch,
	davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	David Hill <dhill@...hat.com>
Subject: [PATCH 2/2] PATCH: i40e Add module option to disable max VF limit

When a VF reaches the limit introduced in this commit [1], the driver
refuses to add any more MACs to the filter which changes the behavior
from previous releases and might break some NFVs which sometimes add
more VFs than the hardcoded limit of 18 and variable limit depending
on the number of VFs created on a given PF.   Disabling limit_mac_per_vf
would revert to previous behavior.

[1] commit cfb1d572c986 ("i40e: Add ensurance of MacVlan resources for every
trusted VF")

Signed-off-by: David Hill <dhill@...hat.com>
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index c66c8bbc3993..fb9eb4a80069 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -4,6 +4,10 @@
 #include "i40e.h"
 #include "i40e_lan_hmc.h"
 #include "i40e_virtchnl_pf.h"
+#include <linux/moduleparam.h>
+
+bool __read_mostly limit_mac_per_vf = 1;
+module_param_named(limit_mac_per_vf, limit_mac_per_vf, bool, 0444);
 
 /*********************notification routines***********************/
 
@@ -2950,7 +2954,7 @@ static inline int i40e_check_vf_permission(struct i40e_vf *vf,
 	 * all VFs.
 	 */
 	} else {
-		if (new_count > max_macvlan) {
+		if (new_count > max_macvlan && limit_mac_per_vf) {
 			dev_err(&pf->pdev->dev,
 				"Cannot add more MAC addresses, trusted VF %d uses (%d/%d) MAC addresses\n",
 				vf->vf_id, new_count, max_macvlan);
-- 
2.50.1


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ