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: <1380919061.3214.13.camel@bwh-desktop.uk.level5networks.com>
Date:	Fri, 4 Oct 2013 21:37:41 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Himanshu Madhani <himanshu.madhani@...gic.com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>,
	<Dept_NX_Linux_NIC_Driver@...gic.com>,
	Pratik Pujar <pratik.pujar@...gic.com>
Subject: Re: [PATCH net-next 02/10] qlcnic: Enhance ethtool to display ring
 indices and interrupt mask

On Fri, 2013-10-04 at 14:30 -0400, Himanshu Madhani wrote:
> From: Pratik Pujar <pratik.pujar@...gic.com>
> 
> o Updated ethtool -d <ethX> option to display ring indices for Transmit(Tx),
>   Receive(Rx), and Status(St) rings.
> o Updated ethtool -d <ethX> option to display ring interrupt mask for Transmit(Tx),
>   and Status(St) rings.
> 
> Signed-off-by: Pratik Pujar <pratik.pujar@...gic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@...gic.com>
> ---
>  .../net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c    |  8 +--
>  .../net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c    | 61 +++++++++++++++++-----
>  2 files changed, 51 insertions(+), 18 deletions(-)
> 
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
> index 66e94dc..c2df4ce 100644
> --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
> +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
[...]
> @@ -512,21 +527,39 @@ qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p)
>  	if (!test_bit(__QLCNIC_DEV_UP, &adapter->state))
>  		return;
>  
> -	regs_buff[i++] = 0xFFEFCDAB; /* Marker btw regs and ring count*/
> -
> -	regs_buff[i++] = 1; /* No. of tx ring */
> -	regs_buff[i++] = le32_to_cpu(*(adapter->tx_ring->hw_consumer));
> -	regs_buff[i++] = readl(adapter->tx_ring->crb_cmd_producer);
> -
> -	regs_buff[i++] = 2; /* No. of rx ring */
> -	regs_buff[i++] = readl(recv_ctx->rds_rings[0].crb_rcv_producer);
> -	regs_buff[i++] = readl(recv_ctx->rds_rings[1].crb_rcv_producer);
> -
> -	regs_buff[i++] = adapter->max_sds_rings;
> +	/* Marker btw regs and TX ring count */
> +	regs_buff[i++] = QLCNIC_TX_RING_MARKER;
[...]

This is really sad; why don't you write a proper dump parser for ethtool
rather than including markers that make it slightly easier to read hex
dumps?

And when changing the dump format in an incompatible way like this, you
should also bump the version number.

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