net: rmnet: set NETIF_F_LLTX flag
Subsystems (3)
PATCH 1/1 net: rmnet: set NETIF_F_LLTX flag
The rmnet_vnd_setup(), which is the callback of ->ndo_start_xmit() is allowed to call concurrently because it uses RCU protected data. So, it doesn't need tx lock.
--- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +2 -0
@@ -212,6 +212,8 @@ void rmnet_vnd_setup(struct net_device *rmnet_dev) rmnet_dev->needs_free_netdev = true; rmnet_dev->ethtool_ops = &rmnet_ethtool_ops; + rmnet_dev->features |=NETIF_F_LLTX ; +/* This perm addr will be used as interface identifier by IPv6 */ rmnet_dev->addr_assign_type =NET_ADDR_RANDOM ;eth_random_addr (rmnet_dev->perm_addr);
Signature · 1 line
2.17.1
Quoted 15 lines · Taehee Yoo
The
rmnet_vnd_setup(), which is the callback of ->ndo_start_xmit() is allowed to call concurrently because it uses RCU protected data. So, it doesn't need tx lock.Signed-off-by Taehee Yoo <[email protected]>--- drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +0
-0
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c void rmnet_vnd_setup(struct net_device *rmnet_dev) · line 219
Quoted 8 lines
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +2
-0@@ -212,6 +212,8 @@ void rmnet_vnd_setup(struct net_device *rmnet_dev) rmnet_dev->needs_free_netdev = true; rmnet_dev->ethtool_ops = &rmnet_ethtool_ops; + rmnet_dev->features |=NETIF_F_LLTX ; +/* This perm addr will be used as interface identifier by IPv6 */ rmnet_dev->addr_assign_type =NET_ADDR_RANDOM ;eth_random_addr (rmnet_dev->perm_addr);
Hi Taehee
It seems the flag is deprecated per documentation.
Quoted 27 lines · On 3/8/20 5:28 PM, [email protected] wrote:
Quoted 15 lines · Taehee Yoo
The
rmnet_vnd_setup(), which is the callback of ->ndo_start_xmit() is allowed to call concurrently because it uses RCU protected data. So, it doesn't need tx lock.Signed-off-by Taehee Yoo <[email protected]>---
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c | 2 ++1 file changed, 2 insertions(+)drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +0
-0drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c void rmnet_vnd_setup(struct net_device *rmnet_dev) · line 219
Quoted 8 lines
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c +2
-0@@ -212,6 +212,8 @@ void rmnet_vnd_setup(struct net_device *rmnet_dev) rmnet_dev->needs_free_netdev = true; rmnet_dev->ethtool_ops = &rmnet_ethtool_ops; + rmnet_dev->features |= NETIF_F_LLTX; + /* This perm addr will be used as interface identifier by IPv6 */ rmnet_dev->addr_assign_type = NET_ADDR_RANDOM; eth_random_addr(rmnet_dev->perm_addr);Hi Taehee
Quoted 3 lines
It seems the flag is deprecated per documentation.
This does not count for virtual drivers, like macvlan, bonding, tunnels...
If your ndo_start_xmit() calls dev_queue_xmit() after switching skb->dev to another device, you do not need a lock.
From: Taehee Yoo <[email protected]>
Date: Sun, 8 Mar 2020 13:47:06 +0000
Quoted 5 lines
The
rmnet_vnd_setup(), which is the callback of ->ndo_start_xmit() is allowed to call concurrently because it uses RCU protected data. So, it doesn't need tx lock.Signed-off-by Taehee Yoo <[email protected]>
Applied, thanks.