2 // Replace explicit packet offset computations with rte_pktmbuf_mtod_offset().
9 - rte_pktmbuf_mtod(M, char *) + O
10 + rte_pktmbuf_mtod_offset(M, char *, O)
12 - rte_pktmbuf_mtod(M, char *) - O
13 + rte_pktmbuf_mtod_offset(M, char *, -O)
15 - rte_pktmbuf_mtod(M, unsigned char *) + O
16 + rte_pktmbuf_mtod_offset(M, unsigned char *, O)
18 - rte_pktmbuf_mtod(M, unsigned char *) - O
19 + rte_pktmbuf_mtod_offset(M, unsigned char *, -O)
21 - rte_pktmbuf_mtod(M, uint8_t *) + O
22 + rte_pktmbuf_mtod_offset(M, uint8_t *, O)
24 - rte_pktmbuf_mtod(M, uint8_t *) - O
25 + rte_pktmbuf_mtod_offset(M, uint8_t *, -O)
30 // Fold subsequent offset terms into pre-existing offset used in
31 // rte_pktmbuf_mtod_offset().
37 - rte_pktmbuf_mtod_offset(M, char *, O1) + O2
38 + rte_pktmbuf_mtod_offset(M, char *, O1 + O2)
40 - rte_pktmbuf_mtod_offset(M, char *, O1) - O2
41 + rte_pktmbuf_mtod_offset(M, char *, O1 - O2)
43 - rte_pktmbuf_mtod_offset(M, unsigned char *, O1) + O2
44 + rte_pktmbuf_mtod_offset(M, unsigned char *, O1 + O2)
46 - rte_pktmbuf_mtod_offset(M, unsigned char *, O1) - O2
47 + rte_pktmbuf_mtod_offset(M, unsigned char *, O1 - O2)
49 - rte_pktmbuf_mtod_offset(M, uint8_t *, O1) + O2
50 + rte_pktmbuf_mtod_offset(M, uint8_t *, O1 + O2)
52 - rte_pktmbuf_mtod_offset(M, uint8_t *, O1) - O2
53 + rte_pktmbuf_mtod_offset(M, uint8_t *, O1 - O2)
58 // Cleanup rules. Fold in double casts, remove unnecessary paranthesis, etc.
65 - (C)rte_pktmbuf_mtod_offset(M, T, O)
66 + rte_pktmbuf_mtod_offset(M, C, O)
68 - (rte_pktmbuf_mtod_offset(M, T, O))
69 + rte_pktmbuf_mtod_offset(M, T, O)
71 - (C)rte_pktmbuf_mtod(M, T)
72 + rte_pktmbuf_mtod(M, C)
74 - (rte_pktmbuf_mtod(M, T))
75 + rte_pktmbuf_mtod(M, T)