Re: [PATCH rdma-core] verbs: Fix UD pingpong buffer validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 23, 2019 at 09:26:45AM +0200, Gal Pressman wrote:
> On 13-Jan-19 12:04, Gal Pressman wrote:
> > Account for UD's 40 bytes offset when doing buffer validation.
> >
> > Fixes: 099c5aa50bc8 ("libibverb/examples: Add command line option to enable buffer validation")
> > Cc: Yuval Shaia <yuval.shaia@xxxxxxxxxx>
> > Signed-off-by: Gal Pressman <galpress@xxxxxxxxxx>
> > ---
> >  libibverbs/examples/ud_pingpong.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/libibverbs/examples/ud_pingpong.c b/libibverbs/examples/ud_pingpong.c
> > index a89fbe3148ad..fa1e59ab2cc9 100644
> > --- a/libibverbs/examples/ud_pingpong.c
> > +++ b/libibverbs/examples/ud_pingpong.c
> > @@ -747,7 +747,7 @@ int main(int argc, char *argv[])
> >  	if (servername) {
> >  		if (validate_buf)
> >  			for (int i = 0; i < size; i += page_size)
> > -				ctx->buf[i] = i / page_size % sizeof(char);
> > +				ctx->buf[i + 40] = i / page_size % sizeof(char);
> >
> >  		if (pp_post_send(ctx, rem_dest->qpn)) {
> >  			fprintf(stderr, "Couldn't post send\n");
> > @@ -860,7 +860,8 @@ int main(int argc, char *argv[])
> >
> >  		if ((!servername) && (validate_buf)) {
> >  			for (int i = 0; i < size; i += page_size)
> > -				if (ctx->buf[i] != i / page_size % sizeof(char))
> > +				if (ctx->buf[i + 40] !=
> > +				    i / page_size % sizeof(char))
> >  					printf("invalid data in page %d\n",
> >  					       i / page_size);
> >  		}
> >
>
> Hi,
> Can someone please review this patch? Should I submit it through github instead?

No, there is no need, I'll collect it from patchworks.

Regarding review, I waited too/

Thanks

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux