]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: hns3: pad the short frame before sending to the hardware
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 15 Jan 2020 02:46:45 +0000 (10:46 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 06:00:53 +0000 (01:00 -0500)
commit39d592aa888b3cfe3bca86b524775e4d5b8c96fc
tree6f8455a979e626b742f1da3e4a1e7f061be034b3
parentc3a933287f9a7b8476db051af6f79573364928df
net: hns3: pad the short frame before sending to the hardware

BugLink: https://bugs.launchpad.net/bugs/1862429
[ Upstream commit 36c67349a1a1c88b9cf11d7ca7762ababdb38867 ]

The hardware can not handle short frames below or equal to 32
bytes according to the hardware user manual, and it will trigger
a RAS error when the frame's length is below 33 bytes.

This patch pads the SKB when skb->len is below 33 bytes before
sending it to hardware.

Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c