.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* drivers/net/ifb.c: |
---|
2 | 3 | |
---|
3 | 4 | The purpose of this driver is to provide a device that allows |
---|
.. | .. |
---|
17 | 18 | You need the tc action mirror or redirect to feed this device |
---|
18 | 19 | packets. |
---|
19 | 20 | |
---|
20 | | - This program is free software; you can redistribute it and/or |
---|
21 | | - modify it under the terms of the GNU General Public License |
---|
22 | | - as published by the Free Software Foundation; either version |
---|
23 | | - 2 of the License, or (at your option) any later version. |
---|
24 | 21 | |
---|
25 | 22 | Authors: Jamal Hadi Salim (2005) |
---|
26 | 23 | |
---|
.. | .. |
---|
78 | 75 | } |
---|
79 | 76 | |
---|
80 | 77 | while ((skb = __skb_dequeue(&txp->tq)) != NULL) { |
---|
81 | | - skb->tc_redirected = 0; |
---|
| 78 | + skb->redirected = 0; |
---|
| 79 | +#ifdef CONFIG_NET_CLS_ACT |
---|
82 | 80 | skb->tc_skip_classify = 1; |
---|
| 81 | +#endif |
---|
83 | 82 | |
---|
84 | 83 | u64_stats_update_begin(&txp->tsync); |
---|
85 | 84 | txp->tx_packets++; |
---|
.. | .. |
---|
99 | 98 | rcu_read_unlock(); |
---|
100 | 99 | skb->skb_iif = txp->dev->ifindex; |
---|
101 | 100 | |
---|
102 | | - if (!skb->tc_from_ingress) { |
---|
| 101 | + if (!skb->from_ingress) { |
---|
103 | 102 | dev_queue_xmit(skb); |
---|
104 | 103 | } else { |
---|
105 | 104 | skb_pull_rcsum(skb, skb->mac_len); |
---|
.. | .. |
---|
246 | 245 | txp->rx_bytes += skb->len; |
---|
247 | 246 | u64_stats_update_end(&txp->rsync); |
---|
248 | 247 | |
---|
249 | | - if (!skb->tc_redirected || !skb->skb_iif) { |
---|
| 248 | + if (!skb->redirected || !skb->skb_iif) { |
---|
250 | 249 | dev_kfree_skb(skb); |
---|
251 | 250 | dev->stats.rx_dropped++; |
---|
252 | 251 | return NETDEV_TX_OK; |
---|