Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1516695
| From | Stuart Yoder <stuart.yoder@nxp.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs |
| Date | 2016-11-08 01:20 +0100 |
| Message-ID | <sB2iR-23v-3@gated-at.bofh.it> (permalink) |
| References | (1 earlier) <szMSW-2gE-7@gated-at.bofh.it> <szMSW-2gE-9@gated-at.bofh.it> <szMSW-2gE-5@gated-at.bofh.it> <szNYB-342-19@gated-at.bofh.it> <szRzc-5pA-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> -----Original Message-----
> From: Ruxandra Ioana Radulescu
> Sent: Friday, November 04, 2016 10:04 AM
> To: Stuart Yoder <stuart.yoder@nxp.com>; gregkh@linuxfoundation.org
> Cc: German Rivera <german.rivera@nxp.com>; devel@driverdev.osuosl.org; linux-kernel@vger.kernel.org;
> agraf@suse.de; arnd@arndb.de; Leo Li <leoyang.li@nxp.com>; Roy Pledge <roy.pledge@nxp.com>
> Subject: RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs
>
> > -----Original Message-----
> > From: Stuart Yoder
> > Sent: Friday, November 04, 2016 4:32 PM
> > To: Ruxandra Ioana Radulescu <ruxandra.radulescu@nxp.com>;
> > gregkh@linuxfoundation.org
> > Cc: German Rivera <german.rivera@nxp.com>; devel@driverdev.osuosl.org;
> > linux-kernel@vger.kernel.org; agraf@suse.de; arnd@arndb.de; Leo Li
> > <leoyang.li@nxp.com>; Roy Pledge <roy.pledge@nxp.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?
>
> Yes.
>
> >
> > > > +
> > > > +/**
> > > > + * 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?
>
> Actually, I stand corrected. Apparently WRIOP _always_ generates short
> len frames, it just happens that, for the current default settings, the rest
> of the bits in the 32bit word that contains the short length field are always
> zero.
Ok, so we were getting lucky. I'll fix that in the next respin.
Thanks,
Stuart
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Ruxandra Ioana Radulescu <ruxandra.radulescu@nxp.com> - 2016-11-04 14:40 +0100
RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Stuart Yoder <stuart.yoder@nxp.com> - 2016-11-04 15:50 +0100
RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Ruxandra Ioana Radulescu <ruxandra.radulescu@nxp.com> - 2016-11-04 19:40 +0100
RE: [PATCH 4/9] bus: fsl-mc: dpio: add frame descriptor and scatter/gather APIs Stuart Yoder <stuart.yoder@nxp.com> - 2016-11-08 01:20 +0100
csiph-web