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:   Tue, 13 Sep 2016 17:44:58 +0300
From:   Sagi Grimberg <sagi@...mberg.me>
To:     Ram Amrani <Ram.Amrani@...gic.com>, dledford@...hat.com,
        davem@...emloft.net
Cc:     Yuval.Mintz@...gic.com, Ariel.Elior@...gic.com,
        Michal.Kalderon@...gic.com, rajesh.borundia@...gic.com,
        linux-rdma@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [RFC 07/11] Add support for memory registeration verbs


> +struct qedr_mr *__qedr_alloc_mr(struct ib_pd *ibpd, int max_page_list_len)
> +{
> +	struct qedr_pd *pd = get_qedr_pd(ibpd);
> +	struct qedr_dev *dev = get_qedr_dev(ibpd->device);
> +	struct qedr_mr *mr;
> +	int rc = -ENOMEM;
> +
> +	DP_VERBOSE(dev, QEDR_MSG_MR,
> +		   "qedr_alloc_frmr pd = %d max_page_list_len= %d\n", pd->pd_id,
> +		   max_page_list_len);
> +
> +	mr = kzalloc(sizeof(*mr), GFP_KERNEL);
> +	if (!mr)
> +		return ERR_PTR(rc);
> +
> +	mr->dev = dev;
> +	mr->type = QEDR_MR_FRMR;
> +
> +	rc = init_mr_info(dev, &mr->info, max_page_list_len, 1);
> +	if (rc)
> +		goto err0;
> +
> +	rc = dev->ops->rdma_alloc_tid(dev->rdma_ctx, &mr->hw_mr.itid);
> +	if (rc) {
> +		DP_ERR(dev, "roce alloc tid returned an error %d\n", rc);
> +		goto err0;
> +	}
> +
> +	/* Index only, 18 bit long, lkey = itid << 8 | key */
> +	mr->hw_mr.tid_type = QED_RDMA_TID_FMR;
> +	mr->hw_mr.key = 0;
> +	mr->hw_mr.pd = pd->pd_id;

Do you have a real MR<->PD association in HW? If so, can you point
me to the code that binds it? If not, any reason not to expose
the local_dma_lkey?

> +struct ib_mr *qedr_get_dma_mr(struct ib_pd *ibpd, int acc)
> +{
> +	struct qedr_dev *dev = get_qedr_dev(ibpd->device);
> +	struct qedr_pd *pd = get_qedr_pd(ibpd);
> +	struct qedr_mr *mr;
> +	int rc;
> +
> +	if (acc & IB_ACCESS_MW_BIND) {
> +		DP_ERR(dev, "Unsupported access flags received for dma mr\n");
> +		return ERR_PTR(-EINVAL);
> +	}

This check looks like it really belongs in the core, it would help
everyone if you move it...

Although I know Christoph is trying to get rid of this API altogether...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ