veth: backup classid befor switch net_ns
Subsystems (3)
RFC PATCH 3/4 veth: backup classid befor switch net_ns
dev_forward_skb will clear skb->sk, so we need save classid before that, otherwise the skb can not be under control by net_cls.
--- drivers/net/veth.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/veth.c +7 -0
@@ -18,6 +18,7 @@#include <net/xfrm.h> #include <linux/veth.h> #include <linux/module.h> +#include <net/cls_cgroup.h> #define DRV_NAME "veth"#define DRV_VERSION "1.0"
@@ -123,6 +124,12 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) rcv->features & NETIF_F_RXCSUM) skb->ip_summed =CHECKSUM_UNNECESSARY ; +/** +* dev_forward_sbk will clear skb->sk, so save +* skb->sk->sk_classid for Qos +*/ +bk_cls_classid (skb); +if (likely (dev_forward_skb (rcv, skb) ==NET_RX_SUCCESS )) {struct pcpu_vstats *stats =this_cpu_ptr (dev->vstats);
Signature · 1 line
1.8.2.2
Hello.
Quoted 13 lines · Libo Chen
dev_forward_skbwill clearskb->sk, so we need save classid before that, otherwise the skb can not be under control bynet_cls.Signed-off-by Libo Chen <[email protected]>--- drivers/net/veth.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/veth.c +0
-0
[...]
drivers/net/veth.c static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · line 127
Quoted 5 lines
drivers/net/veth.c +1
-0@@ -123,6 +124,12 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) rcv->features & NETIF_F_RXCSUM) skb->ip_summed =CHECKSUM_UNNECESSARY ; +/**
Why you're using kernel-doc style comments out of place? The format of
multi-line comments in the networking code is this:
/* bla
* bla
*/
drivers/net/veth.c static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · line 132
Quoted 5 lines
drivers/net/veth.c +5
-0+* dev_forward_sbk will clear skb->sk, so save +* skb->sk->sk_classid for Qos +*/ +bk_cls_classid (skb); +
WBR, Sergei
Quoted 22 lines · Sergei Shtylyov
Hello.
Quoted 13 lines · Libo Chen
dev_forward_skbwill clearskb->sk, so we need save classid before that, otherwise the skb can not be under control bynet_cls.Signed-off-by Libo Chen <[email protected]>--- drivers/net/veth.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/veth.c +0
-0[...]
Quoted 4 lines
drivers/net/veth.c +0
-0@@ -123,6 +124,12 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) rcv->features & NETIF_F_RXCSUM) skb->ip_summed =CHECKSUM_UNNECESSARY ;
Quoted 7 lines
drivers/net/veth.c static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · line 127
Quoted 1 line
drivers/net/veth.c +1
-0+/** Why you're using kernel-doc style comments out of place? The format of multi-line comments in the networking code is this:
/* bla
* bla
*/
thank you
Libo
Quoted 13 lines
drivers/net/veth.c static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · line 132
Quoted 6 lines
drivers/net/veth.c +5
-0+* dev_forward_sbk will clear skb->sk, so save +* skb->sk->sk_classid for Qos +*/ +bk_cls_classid (skb); +WBR, Sergei
.
A message that is not in the archive (sent off-list or not yet received): 52C694BF.3020903-M4DtvfQ/[email protected]
Quoted 22 lines · Sergei Shtylyov
Hello.
Quoted 13 lines · Libo Chen
dev_forward_skbwill clearskb->sk, so we need save classid before that, otherwise the skb can not be under control bynet_cls.Signed-off-by Libo Chen <[email protected]>--- drivers/net/veth.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/veth.c +0
-0[...]
Quoted 4 lines
drivers/net/veth.c +0
-0@@ -123,6 +124,12 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) rcv->features & NETIF_F_RXCSUM) skb->ip_summed =CHECKSUM_UNNECESSARY ;
Quoted 7 lines
drivers/net/veth.c static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · line 127
Quoted 1 line
drivers/net/veth.c +1
-0+/** Why you're using kernel-doc style comments out of place? The format of multi-line comments in the networking code is this:
/* bla
* bla
*/
thank you
Libo
Quoted 13 lines
drivers/net/veth.c static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · line 132
Quoted 6 lines
drivers/net/veth.c +5
-0+* dev_forward_sbk will clear skb->sk, so save +* skb->sk->sk_classid for Qos +*/ +bk_cls_classid (skb); +WBR, Sergei
.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hello.
Quoted 13 lines · Libo Chen
dev_forward_skbwill clearskb->sk, so we need save classid before that, otherwise the skb can not be under control bynet_cls.Signed-off-by Libo Chen <[email protected]>--- drivers/net/veth.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/net/veth.c +0
-0
[...]
drivers/net/veth.c static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · line 127
Quoted 5 lines
drivers/net/veth.c +1
-0@@ -123,6 +124,12 @@ static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) rcv->features & NETIF_F_RXCSUM) skb->ip_summed =CHECKSUM_UNNECESSARY ; +/**
Why you're using kernel-doc style comments out of place? The format of
multi-line comments in the networking code is this:
/* bla
* bla
*/
drivers/net/veth.c static netdev_tx_t veth_xmit(struct sk_buff *skb, struct net_device *dev) · line 132
Quoted 5 lines
drivers/net/veth.c +5
-0+* dev_forward_sbk will clear skb->sk, so save +* skb->sk->sk_classid for Qos +*/ +bk_cls_classid (skb); +
WBR, Sergei