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] [day] [month] [year] [list]
Message-Id: <20151204.143415.1088078490863415742.davem@davemloft.net>
Date:	Fri, 04 Dec 2015 14:34:15 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	manish.chopra@...gic.com
Cc:	netdev@...r.kernel.org, Ariel.Elior@...gic.com,
	Yuval.Mintz@...gic.com, Tomer.Tayar@...gic.com
Subject: Re: [PATCH net 2/4] qed: fix handling of concurrent ramrods

From: Manish Chopra <manish.chopra@...gic.com>
Date: Thu, 3 Dec 2015 05:59:14 -0500

> @@ -124,8 +124,19 @@ struct qed_spq {
>  	dma_addr_t		p_phys;
>  	struct qed_spq_entry	*p_virt;
>  
> -	/* Used as index for completions (returns on EQ by FW) */
> -	u16			echo_idx;
> +	/* Bitmap for handling out-of-order completions */
> +#define SPQ_RING_SIZE \
> +	(CORE_SPQE_PAGE_SIZE_BYTES / sizeof(struct slow_path_element))
> +#define SPQ_COMP_BMAP_SIZE	(SPQ_RING_SIZE / BITS_PER_LONG)
> +	unsigned long		p_comp_bitmap[SPQ_COMP_BMAP_SIZE];
> +	u8			comp_bitmap_idx;
> +
> +#define SPQ_COMP_BMAP_SET_BIT(p_spq, idx)	\
> +	__set_bit((idx) % SPQ_RING_SIZE, (p_spq)->p_comp_bitmap)
> +#define SPQ_COMP_BMAP_CLEAR_BIT(p_spq, idx)	\
> +	__clear_bit((idx) % SPQ_RING_SIZE, (p_spq)->p_comp_bitmap)
> +#define SPQ_COMP_BMAP_TEST_BIT(p_spq, idx)	\
> +	test_bit((idx) % SPQ_RING_SIZE, (p_spq)->p_comp_bitmap)
>  

Don't invent stuff we already have ifrastructure for.

Use DECLARE_BITMAP(), and the helpers, as necessary, in linux/bitmap.h
--
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