Packets sent by the IFB device skip subsequent tc classification. A single bit governs this state. Move it out of tc_verd in anticipation of removing that __u16 completely. The new bitfield tc_skip_classify temporarily uses one bit of a hole, until tc_verd is removed completely in a follow-up patch. Remove the bit hole comment. It could be 2, 3, 4 or 5 bits long. With that many options, little value in documenting it. Introduce a helper function to deduplicate the logic in the two sites that check this bit. The field tc_skip_classify is set only in IFB on skbs cloned in act_mirred, so original packet sources do not have to clear the bit when reusing packets (notably, pktgen and octeon).
Showing the changes to include/uapi/linux (1 of 6 files). Show all
Unified · Split
| @@ -22,8 +22,6 @@ bit 6,7: Where this packet was last seen · 21 unmodified lines | ||
| 22 | 22 | 1: on the Ingress |
| 23 | 23 | 2: on the Egress |
| 24 | 24 | |
| 25 | −bit 8: when set --> Request not to classify on ingress. | |
| 26 | − | |
| 27 | 25 | * |
| 28 | 26 | * */ |
| 29 | 27 | |
| @@ -36,10 +34,6 @@ bit 8: when set --> Request not to classify on ingress. · 6 unmodified lines | ||
| 36 | 34 | #define AT_INGRESS 0x1 |
| 37 | 35 | #define AT_EGRESS 0x2 |
| 38 | 36 | |
| 39 | −#define TC_NCLS _TC_MAKEMASK1(8) | |
| 40 | −#define SET_TC_NCLS(v) ( TC_NCLS | (v & ~TC_NCLS)) | |
| 41 | −#define CLR_TC_NCLS(v) ( v & ~TC_NCLS) | |
| 42 | − | |
| 43 | 37 | #define S_TC_AT _TC_MAKE32(12) |
| 44 | 38 | #define M_TC_AT _TC_MAKEMASK(2,S_TC_AT) |
| 45 | 39 | #define G_TC_AT(x) _TC_GETVALUE(x,S_TC_AT,M_TC_AT) |