On Wed, May 20, 2015 at 12:27:35PM -0600, Jason Gunthorpe wrote:
> On Wed, May 20, 2015 at 04:13:23AM -0400, [email protected] wrote:
> > -struct ib_rmpp_mad {
> > +struct ib_rmpp_base {
> >     struct ib_mad_hdr       mad_hdr;
> >     struct ib_rmpp_hdr      rmpp_hdr;
> > +} __packed;
> > +
> > +struct ib_rmpp_mad {
> > +   struct ib_rmpp_base     base;
> >     u8                      data[IB_MGMT_RMPP_DATA];
> >  };
> 
> Why can't we just use:
> 
>  u8 data[];
> 
> And replace various sizeof(ib_rmpp_mad) with a rmpp_payload_size()
> call?

I don't think it makes much difference.  I think there is just 1 place we use
that.

> 
> That would make patch 12 alot cleaner

How would this make patch 12 cleaner?

I do see 1 remaining place where the sizeof is used in patch 12 which I can
probably remove.


The other purpose of this patch is to make those functions which used to
process ib_rmpp_mad's generic for both IB and OPA, I'll make that clear
directly in this patches comment.

Ira

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to