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: <d34b0e13-1365-07db-d6bb-694625c8f82c@intel.com>
Date: Fri, 16 Jun 2023 13:56:15 -0700
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: Dave Ertman <david.m.ertman@...el.com>, <intel-wired-lan@...ts.osuosl.org>
CC: <netdev@...r.kernel.org>, <bcreeley@....com>,
	<daniel.machon@...rochip.com>, <simon.horman@...igine.com>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v5 06/10] ice: Flesh out
 implementation of support for SRIOV on bonded interface

On 6/15/2023 9:29 AM, Dave Ertman wrote:

...

>   /**
> @@ -622,6 +1324,69 @@ static void ice_lag_monitor_active(struct ice_lag *lag, void *ptr)
>   static bool
>   ice_lag_chk_comp(struct ice_lag *lag, void *ptr)
>   {
> +	struct net_device *event_netdev, *event_upper;
> +	struct netdev_notifier_bonding_info *info;
> +	struct netdev_bonding_info *bonding_info;
> +	struct list_head *tmp;
> +	int count = 0;
> +
> +	if (!lag->primary)
> +		return true;
> +
> +	event_netdev = netdev_notifier_info_to_dev(ptr);
> +	rcu_read_lock();
> +	event_upper = netdev_master_upper_dev_get_rcu(event_netdev);
> +	rcu_read_unlock();
> +	if (event_upper != lag->upper_netdev)
> +		return true;
> +
> +	info = (struct netdev_notifier_bonding_info *)ptr;
> +	bonding_info = &info->bonding_info;
> +	lag->bond_mode = bonding_info->master.bond_mode;
> +	if (lag->bond_mode != BOND_MODE_ACTIVEBACKUP) {
> +		netdev_info(lag->netdev, "Bond Mode not ACTIVE-BACKUP\n");
> +		return false;
> +	}
> +
> +	list_for_each(tmp, lag->netdev_head) {
> +		struct ice_dcbx_cfg *dcb_cfg, *peer_dcb_cfg;
> +		struct ice_lag_netdev_list *entry;
> +		struct ice_netdev_priv *peer_np;
> +		struct net_device *peer_netdev;
> +		struct ice_vsi *vsi, *peer_vsi;
> +
> +		entry = list_entry(tmp, struct ice_lag_netdev_list, node);
> +		peer_netdev = entry->netdev;
> +		if (!netif_is_ice(peer_netdev)) {
> +			netdev_info(lag->netdev, "Found non-ice netdev in LAG\n");
> +			return false;
> +		}
> +
> +		count++;
> +		if (count > 2) {
> +			netdev_info(lag->netdev, "Found more than two netdevs in LAG\n");
> +			return false;
> +		}
> +
> +		peer_np = netdev_priv(peer_netdev);
> +		vsi = ice_get_main_vsi(lag->pf);
> +		peer_vsi = peer_np->vsi;
> +		if (lag->pf->pdev->bus != peer_vsi->back->pdev->bus ||
> +		    lag->pf->pdev->slot != peer_vsi->back->pdev->slot) {
> +			netdev_info(lag->netdev, "Found netdev on different device in LAG\n");
> +			return false;
> +		}
> +
> +		dcb_cfg = &vsi->port_info->qos_cfg.local_dcbx_cfg;
> +		peer_dcb_cfg = &peer_vsi->port_info->qos_cfg.local_dcbx_cfg;
> +		if (memcmp(dcb_cfg, peer_dcb_cfg,
> +			   sizeof(struct ice_dcbx_cfg))) {
> +			netdev_info(lag->netdev, "Found netdev with different DCB config in LAG\n");
> +			return false;
> +		}
> +
> +	}

As you have to respin anyways...

CHECK: Blank lines aren't necessary before a close brace '}'
#893: FILE: drivers/net/ethernet/intel/ice/ice_lag.c:1388:
+
+       }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ