mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
Revert "bpf: Fix dev's rx stats for bpf_redirect_peer traffic"
This reverts commit 8e7b5300a0 which is
commit 024ee930cb3c9ae49e4266aee89cfde0ebb407e1 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I4993a92603f7ac82031f4ff23ab906419a613203
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -10011,14 +10011,6 @@ static int netdev_do_alloc_pcpu_stats(struct net_device *dev)
|
|||||||
{
|
{
|
||||||
void __percpu *v;
|
void __percpu *v;
|
||||||
|
|
||||||
/* Drivers implementing ndo_get_peer_dev must support tstat
|
|
||||||
* accounting, so that skb_do_redirect() can bump the dev's
|
|
||||||
* RX stats upon network namespace switch.
|
|
||||||
*/
|
|
||||||
if (dev->netdev_ops->ndo_get_peer_dev &&
|
|
||||||
dev->pcpu_stat_type != NETDEV_PCPU_STAT_TSTATS)
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
|
|
||||||
switch (dev->pcpu_stat_type) {
|
switch (dev->pcpu_stat_type) {
|
||||||
case NETDEV_PCPU_STAT_NONE:
|
case NETDEV_PCPU_STAT_NONE:
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -2491,7 +2491,6 @@ int skb_do_redirect(struct sk_buff *skb)
|
|||||||
net_eq(net, dev_net(dev))))
|
net_eq(net, dev_net(dev))))
|
||||||
goto out_drop;
|
goto out_drop;
|
||||||
skb->dev = dev;
|
skb->dev = dev;
|
||||||
dev_sw_netstats_rx_add(dev, skb->len);
|
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
return flags & BPF_F_NEIGH ?
|
return flags & BPF_F_NEIGH ?
|
||||||
|
|||||||
Reference in New Issue
Block a user