hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/net/ifb.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /* drivers/net/ifb.c:
23
34 The purpose of this driver is to provide a device that allows
....@@ -17,10 +18,6 @@
1718 You need the tc action mirror or redirect to feed this device
1819 packets.
1920
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.
2421
2522 Authors: Jamal Hadi Salim (2005)
2623
....@@ -78,8 +75,10 @@
7875 }
7976
8077 while ((skb = __skb_dequeue(&txp->tq)) != NULL) {
81
- skb->tc_redirected = 0;
78
+ skb->redirected = 0;
79
+#ifdef CONFIG_NET_CLS_ACT
8280 skb->tc_skip_classify = 1;
81
+#endif
8382
8483 u64_stats_update_begin(&txp->tsync);
8584 txp->tx_packets++;
....@@ -99,7 +98,7 @@
9998 rcu_read_unlock();
10099 skb->skb_iif = txp->dev->ifindex;
101100
102
- if (!skb->tc_from_ingress) {
101
+ if (!skb->from_ingress) {
103102 dev_queue_xmit(skb);
104103 } else {
105104 skb_pull_rcsum(skb, skb->mac_len);
....@@ -246,7 +245,7 @@
246245 txp->rx_bytes += skb->len;
247246 u64_stats_update_end(&txp->rsync);
248247
249
- if (!skb->tc_redirected || !skb->skb_iif) {
248
+ if (!skb->redirected || !skb->skb_iif) {
250249 dev_kfree_skb(skb);
251250 dev->stats.rx_dropped++;
252251 return NETDEV_TX_OK;