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: <1389190590.2728.58.camel@deadeye.wl.decadent.org.uk>
Date:	Wed, 8 Jan 2014 14:16:30 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
CC:	<davem@...emloft.net>, Greg Rose <gregory.v.rose@...el.com>,
	<netdev@...r.kernel.org>, <gospo@...hat.com>,
	<sassmann@...hat.com>,
	"Mitch Williams" <mitch.a.williams@...el.com>
Subject: Re: [net-next 4/8] i40evf: virtual channel interface

On Tue, 2013-12-31 at 16:53 -0800, Jeff Kirsher wrote:
[...]
> --- /dev/null
> +++ b/drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
[...]
> +void i40evf_virtchnl_completion(struct i40evf_adapter *adapter,
> +				enum i40e_virtchnl_ops v_opcode,
> +				i40e_status v_retval,
> +				u8 *msg, u16 msglen)
> +{
> +	struct net_device *netdev = adapter->netdev;
> +
> +	if (v_opcode == I40E_VIRTCHNL_OP_EVENT) {
> +		struct i40e_virtchnl_pf_event *vpe =
> +			(struct i40e_virtchnl_pf_event *)msg;
> +		switch (vpe->event) {
> +		case I40E_VIRTCHNL_EVENT_LINK_CHANGE:
> +			adapter->link_up =
> +				vpe->event_data.link_event.link_status;
> +			if (adapter->link_up && !netif_carrier_ok(netdev)) {
> +				dev_info(&adapter->pdev->dev, "NIC Link is Up\n");
> +				netif_carrier_on(netdev);
> +				netif_tx_wake_all_queues(netdev);
> +			} else if (!adapter->link_up) {
> +				dev_info(&adapter->pdev->dev, "NIC Link is Down\n");
> +				netif_carrier_off(netdev);
> +				netif_tx_stop_all_queues(netdev);
> +			}
[...]

The queue start/stop here should be redundant as linkwatch will do it
automatically.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ