Hi

I really don't know where to report this issue,
it's about scatter-gather, which usually be used in network,
so I forward the mail from mentor's mail list to here.

I am sorry if I send to the wrong mail list, and I am very
appreciate if someone can tell me where to report it.

Best regards,
Michael Wang


-------- Original Message --------
Subject:        Re: May be a bug in scatterlist.c
Date:   Mon, 07 Nov 2011 14:45:45 +0800
From:   Michael Wang <wang...@linux.vnet.ibm.com>
To:     kernel-ment...@selenic.com



On 11/07/2011 12:01 PM, Michael Wang wrote:
 Hi, Experts

 I found there are may be a bug in

 file: lib/scatterlist.c
 func: __sg_alloc_table
 line: 248

 left -= sg_size;

 if the max_ents is 1 and nents is 3 and sg chain enabled,
 the sg_size will be 0, and it will always while because the
 left will not go less.

Well, looks like the max_ents is 4096/24 = 170, far more than
1, but still, I am confused about this function.
For example, if I want to alloc 340 entries, this function looks
will set the table finally like below:

table chained by 3 scatterlist block,

1
nents = 169,
orig_nents = 169,
real size = 170 * scatterlist size

2
nents = 169,
orig_nents = 169,
real size = 170 * scatterlist size

3
nents = 2,
orig_nents = 2,
real size = 2 * scatterlist size

Still looks strange, the block3 looks like a waste of memory,
I think I really need some expert's help to understand it.

Thanks,
Michael Wang

 I think here should use

 left -= alloc_size;

 I will be very happy if anyone can help me to see whether
 this is really a bug, and tell me where should I report it,
 and I will be very glad to provide a patch if it is a bug.

 Best regards,
 Michael Wang

 _______________________________________________
 Kernel-mentors mailing list
 kernel-ment...@selenic.com
 http://selenic.com/mailman/listinfo/kernel-mentors


_______________________________________________
Kernel-mentors mailing list
kernel-ment...@selenic.com
http://selenic.com/mailman/listinfo/kernel-mentors


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to