From: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Parav Pandit <pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
Amir Vadai <amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Yevgeny Petrilin
<yevgenyp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Tal Alon <talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Moshe Lazer <moshel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Bodong Wang <bodong-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Eric Dube <edube-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH for-next 1/2] IB/core: Add support for RX/TX checksum offload capabilities report
Date: Thu, 6 Aug 2015 19:50:07 +0300 [thread overview]
Message-ID: <55C3903F.40301@mellanox.com> (raw)
In-Reply-To: <CAG53R5UUgp5JHkwGVtY1MrrthgyVeoRS_N+-4WsOKQ-T2y04wA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 08/06/2015 02:18 PM, Parav Pandit wrote:
> On Thu, Aug 6, 2015 at 4:30 PM, Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
> <mailto:haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>> wrote:
>
> On Wednesday, August 5, 2015 8:16 PM, Jason Gunthorpe
> jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org
> <mailto:jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>> wrote:
> > On Wed, Aug 05, 2015 at 06:34:26PM +0300, Amir Vadai wrote:
> >> struct ib_uverbs_ex_query_device {
> >> __u32 comp_mask;
> >> + __u32 csum_caps;
> >> __u32 reserved;
> >> };
> >
> > Uh no.
> This is the struct of the command, not the response. There is no
> need to extend it. The command is designed to always return as much
> information as possible, so the user space code doesn't need to pass
> anything for it to work.
>
> Even if you did want to extend it, you would need to replace the
> reserved word. The structs in this header file must be made in such
> way that they have the same size on 32-bit systems and on 64-bit
> systems (see the comment at the beginning of the header file). This
> is why the reserved word is there.
>
> >
> >> @@ -221,6 +222,7 @@ struct ib_uverbs_odp_caps {
> >> struct ib_uverbs_ex_query_device_resp {
> >> struct ib_uverbs_query_device_resp base;
> >> __u32 comp_mask;
> >> + __u32 csum_caps;
> >> __u32 response_length;
> >> struct ib_uverbs_odp_caps odp_caps;
> >> __u64 timestamp_mask;
> >
> > Also totally wrong.
>
> The response struct must maintain backward compatibility. You cannot
> change the order of the existing fields. The only valid way of
> extending it is at the end. Here too, you must make sure that the
> struct has the same size on 32-bit systems, so you would need to add
> a 32-bit reserved word at the end.
>
> Haggai
>
> As struct ib_uverbs_ex_query_device_resp captures extended capabilities,
> does it make sense to have few more reserved words defined as part of
> this patch?
> So that later on those reserved can be defined in future for additional
> features.
> This way for every new feature we dont need to bump structure size of
> ABI, not we need to define new set of ABI calls.
> Its hard to say how much more is sufficient, but was thinking of 8
> 32-bit words.
>
I don't see how increasing the size now would get you anything that
changing the returned response_length field wouldn't. I'm not sure what
you consider an ABI change. Doesn't adding new meaning to reserved
fields count as a change? In any case, increasing the response length
doesn't require adding new calls. The kernel code will agree to fill
only the fields that fit in the buffer provided by the user-space caller.
Haggai
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-08-06 16:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-05 15:34 [PATCH for-next 0/2] IB/{core,mlx4_ib}: RX/TX checksum offload Amir Vadai
[not found] ` <1438788867-18332-1-git-send-email-amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-08-05 15:34 ` [PATCH for-next 1/2] IB/core: Add support for RX/TX checksum offload capabilities report Amir Vadai
[not found] ` <1438788867-18332-2-git-send-email-amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-08-05 16:17 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A9022CBD-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-08-05 16:49 ` Yevgeny Petrilin
[not found] ` <HE1PR05MB1004A52EBD00FA30FAFFD225AA750-eBadYZ65MZ9M5L2kK+KmM9qRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-08-05 17:12 ` Hefty, Sean
2015-08-05 22:29 ` Or Gerlitz
[not found] ` <CAJ3xEMgzKdFVtFfXC93EH=gBVGCpVJzKWm=C4RYttc1uz+phhQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-05 23:23 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373A9022F1D-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-08-06 8:21 ` Or Gerlitz
2015-08-05 17:16 ` Jason Gunthorpe
[not found] ` <20150805171634.GA12274-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-05 22:16 ` Or Gerlitz
[not found] ` <CAJ3xEMgFCx3Xaan2WYL53HRnhdvnoDsS2TriYbENQizpnV31dw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-06 0:00 ` Jason Gunthorpe
[not found] ` <20150806000042.GC2483-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-08-06 8:18 ` Or Gerlitz
2015-08-06 11:00 ` Haggai Eran
[not found] ` <HE1PR05MB1355B04E4B418A48DB5137B0C1740-eBadYZ65MZ+lkJP6d7MyxNqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-08-06 11:47 ` Parav Pandit
[not found] ` <CAG53R5UUgp5JHkwGVtY1MrrthgyVeoRS_N+-4WsOKQ-T2y04wA@mail.gmail.com>
[not found] ` <CAG53R5UUgp5JHkwGVtY1MrrthgyVeoRS_N+-4WsOKQ-T2y04wA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-06 16:50 ` Haggai Eran [this message]
[not found] ` <55C3903F.40301-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-08-06 17:27 ` Parav Pandit
2015-08-05 15:34 ` [PATCH for-next 2/2] IB/mlx4_ib: " Amir Vadai
2015-09-02 14:32 ` [PATCH for-next 0/2] IB/{core,mlx4_ib}: RX/TX checksum offload Christoph Lameter
[not found] ` <alpine.DEB.2.11.1509020930430.12270-wcBtFHqTun5QOdAKl3ChDw@public.gmane.org>
2015-09-03 6:22 ` Or Gerlitz
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=55C3903F.40301@mellanox.com \
--to=haggaie-vpraknaxozvwk0htik3j/w@public.gmane.org \
--cc=amirv-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=bodong-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=edube-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=moshel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=yevgenyp-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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.