[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR0401MB2638DC01B8E4C4BDDB952EBE8DA20@VI1PR0401MB2638.eurprd04.prod.outlook.com>
Date: Fri, 4 Nov 2016 14:32:24 +0000
From: Stuart Yoder <stuart.yoder@....com>
To: Ruxandra Ioana Radulescu <ruxandra.radulescu@....com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: German Rivera <german.rivera@....com>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"agraf@...e.de" <agraf@...e.de>, "arnd@...db.de" <arnd@...db.de>,
Leo Li <leoyang.li@....com>, Roy Pledge <roy.pledge@....com>
Subject: RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and
scatter/gather APIs
> +/**
> > + * dpaa2_fd_set_bpid() - Set the bpid field of frame descriptor
> > + * @fd: the given frame descriptor
> > + * @bpid: buffer pool id to be set
> > + */
> > +static inline void dpaa2_fd_set_bpid(struct dpaa2_fd *fd, uint16_t bpid)
> > +{
> > + fd->simple.bpid = bpid;
> > +}
>
> The setter/getter functions for fd.ctrl are missing.
Ok, will add those. Does the ethernet driver use that field?
> > +
> > +/**
> > + * struct dpaa2_sg_entry - the scatter-gathering structure
> > + * @addr: address of the sg entry
> > + * @len: length in this sg entry
> > + * @bpid: buffer pool id
> > + * @format_offset: offset in the MS 16 bits, BPID in the LS 16 bits
>
> Description of the format_offset field is incorrect, it shouldn't
> contain the reference to BPID.
Thanks, will fix.
> > +/**
> > + * dpaa2_sg_get_len() - Get the length in SG entry
> > + * @sg: the given scatter-gathering object
> > + *
> > + * Return the length.
> > + */
> > +static inline u32 dpaa2_sg_get_len(const struct dpaa2_sg_entry *sg)
> > +{
> > + if (dpaa2_sg_short_len(sg))
> > + return le32_to_cpu(sg->len) & SG_SHORT_LEN_MASK;
> > +
> > + return le32_to_cpu(sg->len);
> > +}
>
> We should do this in dpaa2_fd_get_len() as well. Hardware is capable of
> generating FDs with SL bit set for single frame format too, although in
> practice I've never actually seen it.
Any suggestion on how to test this case?
Thanks,
Stuart
Powered by blists - more mailing lists