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]
Date:	Thu, 10 Dec 2009 11:50:18 +1100
From:	Simon Horman <horms@...ge.net.au>
To:	Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc:	netdev@...r.kernel.org, gospo@...hat.com,
	Greg Rose <gregory.v.rose@...el.com>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
Subject: Re: [RFC PATCH 01/12] ixgbe: Mailbox header and code module

On Tue, Dec 08, 2009 at 02:13:12PM -0800, Jeff Kirsher wrote:
> From: Greg Rose <gregory.v.rose@...el.com>
> 
> The 82599 virtual function device and the master 82599 physical function
> device implement a mailbox utility for communication between the devices
> using some SRAM scratch memory and a doorbell/answering mechanism enabled
> via interrupt and/or polling.  This C module and accompanying header
> file implement the base functions for use of this feature.
> 
> Signed-off-by: Greg Rose <gregory.v.rose@...el.com>
> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
> 
>  drivers/net/ixgbe/ixgbe_mbx.c |  480 +++++++++++++++++++++++++++++++++++++++++
>  drivers/net/ixgbe/ixgbe_mbx.h |   96 ++++++++
>  2 files changed, 576 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/net/ixgbe/ixgbe_mbx.c
>  create mode 100644 drivers/net/ixgbe/ixgbe_mbx.h
> 
> diff --git a/drivers/net/ixgbe/ixgbe_mbx.c b/drivers/net/ixgbe/ixgbe_mbx.c
> new file mode 100644
> index 0000000..5cd5ae8
> --- /dev/null
> +++ b/drivers/net/ixgbe/ixgbe_mbx.c

[snip]

> +/**
> + *  ixgbe_init_mbx_params_pf - set initial values for pf mailbox
> + *  @hw: pointer to the HW structure
> + *
> + *  Initializes the hw->mbx struct to correct values for pf mailbox
> + */
> +s32 ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
> +{
> +	struct ixgbe_mbx_info *mbx = &hw->mbx;
> +
> +	if (hw->mac.type == ixgbe_mac_82599EB) {
> +		mbx->timeout = 0;
> +		mbx->usec_delay = 0;
> +
> +		mbx->size = IXGBE_VFMAILBOX_SIZE;
> +
> +		mbx->stats.msgs_tx = 0;
> +		mbx->stats.msgs_rx = 0;
> +		mbx->stats.reqs = 0;
> +		mbx->stats.acks = 0;
> +		mbx->stats.rsts = 0;
> +	}
> +
> +	return 0;
> +}

Does ixgbe_init_mbx_params_pf() need a return value?
The only caller seems to ignore it.

Also, I prefer the following idiom, but in this case
it doesn't seem to offer any advantage:

void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
{
	struct ixgbe_mbx_info *mbx = &hw->mbx;

	if (hw->mac.type != ixgbe_mac_82599EB)
		return;

	mbx->timeout = 0;
	mbx->usec_delay = 0;

	mbx->size = IXGBE_VFMAILBOX_SIZE;

	mbx->stats.msgs_tx = 0;
	mbx->stats.msgs_rx = 0;
	mbx->stats.reqs = 0;
	mbx->stats.acks = 0;
	mbx->stats.rsts = 0;
}
--
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