diff mbox

[net] fjes: Fix wrong netdevice feature flags

Message ID 1489553270-7754-1-git-send-email-izumi.taku@jp.fujitsu.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Taku Izumi March 15, 2017, 4:47 a.m. UTC
This patch fixes netdev->features for Extended Socket network device.

Currently Extended Socket network device's netdev->feature claims
NETIF_F_HW_CSUM, however this is completely wrong. There's no feature
of checksum offloading.
That causes invalid TCP/UDP checksum and packet rjection when IP
forwarding from Extended Socket network device to other network device.

NETIF_F_HW_CSUM should be omitted.

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
---
 drivers/net/fjes/fjes_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergei Shtylyov March 15, 2017, 10:41 a.m. UTC | #1
Hello!

On 3/15/2017 7:47 AM, Taku Izumi wrote:

> This patch fixes netdev->features for Extended Socket network device.
>
> Currently Extended Socket network device's netdev->feature claims
> NETIF_F_HW_CSUM, however this is completely wrong. There's no feature
> of checksum offloading.
> That causes invalid TCP/UDP checksum and packet rjection when IP

    Rejection.

> forwarding from Extended Socket network device to other network device.
>
> NETIF_F_HW_CSUM should be omitted.
>
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
[...]

MBR, Sergei
David Miller March 15, 2017, 7:43 p.m. UTC | #2
From: Taku Izumi <izumi.taku@jp.fujitsu.com>
Date: Wed, 15 Mar 2017 13:47:50 +0900

> This patch fixes netdev->features for Extended Socket network device.
> 
> Currently Extended Socket network device's netdev->feature claims
> NETIF_F_HW_CSUM, however this is completely wrong. There's no feature
> of checksum offloading.
> That causes invalid TCP/UDP checksum and packet rjection when IP
> forwarding from Extended Socket network device to other network device.
> 
> NETIF_F_HW_CSUM should be omitted.
> 
> Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index b75d9cd..c4b3c4b 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -1316,7 +1316,7 @@  static void fjes_netdev_setup(struct net_device *netdev)
 	netdev->min_mtu = fjes_support_mtu[0];
 	netdev->max_mtu = fjes_support_mtu[3];
 	netdev->flags |= IFF_BROADCAST;
-	netdev->features |= NETIF_F_HW_CSUM | NETIF_F_HW_VLAN_CTAG_FILTER;
+	netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
 }
 
 static void fjes_irq_watch_task(struct work_struct *work)