bpf: clear skb->tstamp in bpf_redirect when necessary
Subsystems (4)
PATCH 1/1 bpf: clear skb->tstamp in bpf_redirect when necessary
Redirecting a packet from ingress to egress by using bpf_redirect breaks if the egress interface has an fq qdisc installed. This is the same problem as fixed in 8203e2d8 ("net: clear skb->tstamp in forwarding paths").
Clear skb->tstamp when redirecting into the egress path.
--- net/core/filter.c | 1 + 1 file changed, 1 insertion(+)
net/core/filter.c +1 -0
@@ -2055,6 +2055,7 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb) } skb->dev = dev; + skb->tstamp =0 ;dev_xmit_recursion_inc (); ret =dev_queue_xmit (skb);
Signature · 1 line
2.20.1
Quoted 7 lines · Lorenz Bauer
Redirecting a packet from ingress to egress by using
bpf_redirectbreaks if the egress interface has an fq qdisc installed. This is the same problem as fixed in8203e2d8("net: clearskb->tstampin forwarding paths").Clear
skb->tstampwhen redirecting into the egress path.Fixes 80b14de ("net: Add a new socket option for a future transmit time.")
Please use 12 digits sha1
Quoted 2 lines
Fixes fb420d5 ("tcp/fq: move back to CLOCK_MONOTONIC")Signed-off-by Lorenz Bauer <[email protected]>
Thanks for fixing this !
PATCH v2 1/1 bpf: clear skb->tstamp in bpf_redirect when necessary
In reply to Lorenz BauerRedirecting a packet from ingress to egress by using bpf_redirect
breaks if the egress interface has an fq qdisc installed. This is the same problem as fixed in 'commit 8203e2d844d3 ("net: clear skb->tstamp in forwarding paths")
Clear skb->tstamp when redirecting into the egress path.
--- net/core/filter.c | 1 + 1 file changed, 1 insertion(+)
net/core/filter.c +1 -0
@@ -2055,6 +2055,7 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb) } skb->dev = dev; + skb->tstamp =0 ;dev_xmit_recursion_inc (); ret =dev_queue_xmit (skb);
Signature · 1 line
2.20.1
Quoted 19 lines · Lorenz Bauer
Redirecting a packet from ingress to egress by using
bpf_redirect
breaks if the egress interface has an fq qdisc installed. This is the same problem as fixed in 'commit8203e2d844d3("net: clearskb->tstampin forwarding paths")Clear
skb->tstampwhen redirecting into the egress path.Fixes 80b14dee2bea ("net: Add a new socket option for a future transmit time.")Fixes fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC")Signed-off-by Lorenz Bauer <[email protected]>--- net/core/filter.c | 1 + 1 file changed, 1 insertion(+)net/core/filter.c +0
-0
net/core/filter.c static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb) · line 2061
Quoted 7 lines
net/core/filter.c +1
-0@@ -2055,6 +2055,7 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb) } skb->dev = dev; + skb->tstamp =0 ;dev_xmit_recursion_inc (); ret =dev_queue_xmit (skb);
Thanks !
Alexei Starovoitov
AppliedQuoted 27 lines · Eric Dumazet
Quoted 23 lines · Lorenz Bauer
Redirecting a packet from ingress to egress by using
bpf_redirect
breaks if the egress interface has an fq qdisc installed. This is the same problem as fixed in 'commit8203e2d844d3("net: clearskb->tstampin forwarding paths")Clear
skb->tstampwhen redirecting into the egress path.Fixes 80b14dee2bea ("net: Add a new socket option for a future transmit time.")Fixes fb420d5d91c1 ("tcp/fq: move back to CLOCK_MONOTONIC")Signed-off-by Lorenz Bauer <[email protected]>--- net/core/filter.c | 1 + 1 file changed, 1 insertion(+)net/core/filter.c +1
-0@@ -2055,6 +2055,7 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb) } skb->dev = dev; + skb->tstamp =0 ;
Quoted 7 lines
net/core/filter.c static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb) · line 2061
Quoted 3 lines
net/core/filter.c +0
-0dev_xmit_recursion_inc (); ret =dev_queue_xmit (skb);Thanks !
Reviewed-by Eric Dumazet <[email protected]>
Applied. Thanks