From: Max Gurtovoy <maxg@mellanox.com>
To: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagig@mellanox.com>
Cc: linux-rdma@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH 4/4] IB/isert: the kill ->isert_cmd back pointer in the struct iser_tx_desc
Date: Wed, 17 Feb 2016 11:31:31 +0200 [thread overview]
Message-ID: <56C43DF3.8080509@mellanox.com> (raw)
In-Reply-To: <1455567060-18381-5-git-send-email-hch@lst.de>
Hi,
On 2/15/2016 10:11 PM, Christoph Hellwig wrote:
> We only use the pointer when processing regular iSER commands, and it then
> always points to the struct iser_cmd that contains the TX descriptor.
>
> Remove it and rely on container_of to save a little space and avoid a
> pointer that is updated multiple times per processed command.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> drivers/infiniband/ulp/isert/ib_isert.c | 14 ++++++--------
> drivers/infiniband/ulp/isert/ib_isert.h | 1 -
> 2 files changed, 6 insertions(+), 9 deletions(-)
>
maybe we can define it once as:
static inline struct isert_cmd *
isert_tx_to_cmd(iser_tx_desc *tx_desc)
{
return container_of(tx_desc, struct isert_cmd, tx_desc);
}
in the .h file ?
cheers,
Max.
next prev parent reply other threads:[~2016-02-17 9:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-15 20:10 isert: convert to the new CQ API and a few random cleanups Christoph Hellwig
2016-02-15 20:10 ` [PATCH 1/4] IB/isert: properly type the login buffer Christoph Hellwig
2016-02-16 6:47 ` Or Gerlitz
[not found] ` <1455567060-18381-2-git-send-email-hch-jcswGhMUV9g@public.gmane.org>
2016-02-16 4:40 ` Leon Romanovsky
[not found] ` <20160216044058.GA27580-2ukJVAZIZ/Y@public.gmane.org>
2016-02-17 10:29 ` Christoph Hellwig
2016-02-16 17:19 ` Max Gurtovoy
2016-02-17 10:33 ` Christoph Hellwig
2016-02-15 20:10 ` [PATCH 2/4] IB/isert: convert to new CQ API Christoph Hellwig
2016-02-16 18:04 ` Max Gurtovoy
2016-02-17 14:18 ` Christoph Hellwig
2016-02-18 12:32 ` Max Gurtovoy
[not found] ` <1455567060-18381-1-git-send-email-hch-jcswGhMUV9g@public.gmane.org>
2016-02-15 20:10 ` [PATCH 3/4] IB/isert: kill struct isert_rdma_wr Christoph Hellwig
[not found] ` <1455567060-18381-4-git-send-email-hch-jcswGhMUV9g@public.gmane.org>
2016-02-17 9:03 ` Max Gurtovoy
2016-02-15 20:11 ` [PATCH 4/4] IB/isert: the kill ->isert_cmd back pointer in the struct iser_tx_desc Christoph Hellwig
2016-02-17 9:31 ` Max Gurtovoy [this message]
2016-02-17 14:19 ` Christoph Hellwig
2016-02-16 10:53 ` isert: convert to the new CQ API and a few random cleanups Sagi Grimberg
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=56C43DF3.8080509@mellanox.com \
--to=maxg@mellanox.com \
--cc=hch@lst.de \
--cc=linux-rdma@vger.kernel.org \
--cc=sagig@mellanox.com \
--cc=target-devel@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