From: Jason Gunthorpe <jgg@mellanox.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Doug Ledford <dledford@redhat.com>,
Leon Romanovsky <leonro@mellanox.com>,
RDMA mailing list <linux-rdma@vger.kernel.org>,
Erez Alfasi <ereza@mellanox.com>
Subject: Re: [PATCH rdma-next v1 4/4] RDMA/mlx5: Return ODP type per MR
Date: Mon, 9 Sep 2019 08:53:57 +0000 [thread overview]
Message-ID: <20190909085355.GE2843@mellanox.com> (raw)
In-Reply-To: <20190830081612.2611-5-leon@kernel.org>
On Fri, Aug 30, 2019 at 11:16:12AM +0300, Leon Romanovsky wrote:
> +static int fill_res_mr_entry(struct sk_buff *msg,
> + struct rdma_restrack_entry *res)
> +{
> + struct ib_mr *ibmr = container_of(res, struct ib_mr, res);
> + struct mlx5_ib_mr *mr = to_mmr(ibmr);
> + struct nlattr *table_attr;
> +
> + if (!is_odp_mr(mr))
> + return 0;
> +
> + table_attr = nla_nest_start(msg, RDMA_NLDEV_ATTR_DRIVER);
> + if (!table_attr)
> + goto err;
> +
> + if (to_ib_umem_odp(mr->umem)->is_implicit_odp) {
> + if (rdma_nl_put_driver_string(msg, "odp", "implicit"))
> + goto err;
> + } else {
> + if (rdma_nl_put_driver_string(msg, "odp", "explicit"))
> + goto err;
> + }
> +
> + nla_nest_end(msg, table_attr);
> + return 0;
> +
> +err:
> + nla_nest_cancel(msg, table_attr);
> + return -EMSGSIZE;
> +}
If we are having a custom fill function why not fill the ODP stats
here instead of adding that callback and memcopies/etc
rdma_nl_put_odp_stats(...)
Jason
next prev parent reply other threads:[~2019-09-09 8:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 8:16 [PATCH rdma-next v1 0/4] ODP information and statistics Leon Romanovsky
2019-08-30 8:16 ` [PATCH rdma-next v1 1/4] IB/mlx5: Introduce ODP diagnostic counters Leon Romanovsky
2019-09-09 8:45 ` Jason Gunthorpe
2019-09-09 9:40 ` Leon Romanovsky
2019-08-30 8:16 ` [PATCH rdma-next v1 2/4] RDMA/nldev: Allow different fill function per resource Leon Romanovsky
2019-09-09 8:48 ` Jason Gunthorpe
2019-09-09 9:46 ` Leon Romanovsky
2019-08-30 8:16 ` [PATCH rdma-next v1 3/4] RDMA/nldev: Provide MR statistics Leon Romanovsky
2019-08-30 10:18 ` Parav Pandit
2019-08-30 11:12 ` Leon Romanovsky
2019-08-30 12:06 ` Parav Pandit
2019-09-09 8:51 ` Jason Gunthorpe
2019-09-09 10:00 ` Leon Romanovsky
2019-08-30 8:16 ` [PATCH rdma-next v1 4/4] RDMA/mlx5: Return ODP type per MR Leon Romanovsky
2019-09-09 8:53 ` Jason Gunthorpe [this message]
2019-09-09 10:01 ` Leon Romanovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190909085355.GE2843@mellanox.com \
--to=jgg@mellanox.com \
--cc=dledford@redhat.com \
--cc=ereza@mellanox.com \
--cc=leon@kernel.org \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.