From: Leon Romanovsky <leon@kernel.org>
To: Jason Gunthorpe <jgg@mellanox.com>
Cc: Doug Ledford <dledford@redhat.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 13:01:26 +0300 [thread overview]
Message-ID: <20190909100126.GD6601@unreal> (raw)
In-Reply-To: <20190909085355.GE2843@mellanox.com>
On Mon, Sep 09, 2019 at 08:53:57AM +0000, Jason Gunthorpe wrote:
> 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
It makes sense.
Thanks
>
> rdma_nl_put_odp_stats(...)
>
> Jason
prev parent reply other threads:[~2019-09-09 10:01 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
2019-09-09 10:01 ` Leon Romanovsky [this message]
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=20190909100126.GD6601@unreal \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=ereza@mellanox.com \
--cc=jgg@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).