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: <a20d6d9f-4428-4a6c-fb2a-089fd95e6908@grimberg.me>
Date:   Wed, 21 Sep 2016 12:53:58 -0700
From:   Sagi Grimberg <sagi@...mberg.me>
To:     Ram Amrani <Ram.Amrani@...ium.com>, davem@...emloft.net,
        dledford@...hat.com
Cc:     Ariel.Elior@...ium.com, Michal.Kalderon@...ium.com,
        Yuval.Mintz@...ium.com, rajesh.borundia@...ium.com,
        linux-rdma@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [RFC v2 07/12] qedr: Add support for memory registeration verbs


> +static int qedr_set_page(struct ib_mr *ibmr, u64 addr)
> +{
> +	struct qedr_mr *mr = get_qedr_mr(ibmr);
> +	struct qedr_pbl *pbl_table;
> +	struct regpair *pbe;
> +	u32 pbes_in_page;
> +
> +	if (unlikely(mr->npages == mr->info.pbl_info.num_pbes)) {
> +		DP_ERR(mr->dev, "qedr_set_page failes when %d\n", mr->npages);
> +		return -ENOMEM;
> +	}
> +
> +	DP_VERBOSE(mr->dev, QEDR_MSG_MR, "qedr_set_page pages[%d] = 0x%llx\n",
> +		   mr->npages, addr);
> +
> +	pbes_in_page = mr->info.pbl_info.pbl_size / sizeof(u64);
> +	pbl_table = mr->info.pbl_table + (mr->npages / pbes_in_page);
> +	pbe = (struct regpair *)pbl_table->va;
> +	pbe +=  mr->npages % pbes_in_page;
> +	pbe->lo = cpu_to_le32((u32)addr);
> +	pbe->hi = cpu_to_le32((u32)upper_32_bits(addr));
> +
> +	mr->npages++;
> +
> +	return 0;
> +}

Looks better.

Reviewed-by: Sagi Grimberg <sagi@...mberg.me>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ