diff options
author | Huazhong Tan <tanhuazhong@huawei.com> | 2018-08-23 06:10:12 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-23 07:47:36 +0300 |
commit | b1ccd4c0ab6ef499f47dd84ed4920502a7147bba (patch) | |
tree | b752241754f95ae42e84511b4cebd3c140a72cdf /drivers/net/sungem_phy.c | |
parent | ac4a5b52f5970479f4b2d94a7f98dbf9eaf675ab (diff) | |
download | linux-b1ccd4c0ab6ef499f47dd84ed4920502a7147bba.tar.xz |
net: hns: fix skb->truesize underestimation
skb->truesize is not meant to be tracking amount of used bytes in a skb,
but amount of reserved/consumed bytes in memory.
For instance, if we use a single byte in last page fragment, we have to
account the full size of the fragment.
So skb_add_rx_frag needs to calculate the length of the entire buffer into
turesize.
Fixes: 9cbe9fd5214e ("net: hns: optimize XGE capability by reducing cpu usage")
Signed-off-by: Huazhong tan <tanhuazhong@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sungem_phy.c')
0 files changed, 0 insertions, 0 deletions