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, 4 Apr 2013 12:45:57 +0300
From:	Or Gerlitz <ogerlitz@...lanox.com>
To:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
CC:	target-devel <target-devel@...r.kernel.org>,
	linux-rdma <linux-rdma@...r.kernel.org>,
	linux-scsi <linux-scsi@...r.kernel.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Roland Dreier <roland@...nel.org>,
	Alexander Nezhinsky <alexandern@...lanox.com>
Subject: Re: [RFC-v3 9/9] iser-target: Add iSCSI Extensions for RDMA (iSER)
 target driver

On 04/04/2013 10:24, Nicholas A. Bellinger wrote:

> +#define ISER_RECV_DATA_SEG_LEN  8192
> +#define ISER_RX_PAYLOAD_SIZE    (ISER_HEADERS_LEN + ISER_RECV_DATA_SEG_LEN)
> [...]
> +#define ISER_RX_PAD_SIZE	(16384 - (ISER_RX_PAYLOAD_SIZE + \
> +					sizeof(u64) + sizeof(struct ib_sge)))

We're eating here too much ram for the pad, you need 8K + something, so 
the pad can count down
from 12K and not 16K which means each such element will consume three 
pages and not four.

> +struct iser_rx_desc {
> +	struct iser_hdr iser_header;
> +	struct iscsi_hdr iscsi_header;
> +	char		data[ISER_RECV_DATA_SEG_LEN];
> +	u64		dma_addr;
> +	struct ib_sge	rx_sg;
> +	char		pad[ISER_RX_PAD_SIZE];
> +} __packed;
> +
> +struct isert_rx_desc {
> +	struct isert_conn	*desc_conn;
> +	struct work_struct	desc_work;
> +	struct iser_rx_desc	desc;
> +} __packed;

You have way enough room in the pad field of struct iser_rx_desc to 
place there the two fields
added by struct isert_rx_desc (and you only use struct iser_rx_desc from 
within isert_rx_desc) --> any reason
not to unify  them?



Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ