@@ -174,13 +174,13 @@ int egress_host(struct __sk_buff *skb)
174
174
return TC_ACT_OK ;
175
175
176
176
if (skb_proto (skb_type ) == IPPROTO_TCP ) {
177
- if (skb -> delivery_time_type == BPF_SKB_DELIVERY_TIME_MONO &&
177
+ if (skb -> tstamp_type == BPF_SKB_TSTAMP_DELIVERY_MONO &&
178
178
skb -> tstamp )
179
179
inc_dtimes (EGRESS_ENDHOST );
180
180
else
181
181
inc_errs (EGRESS_ENDHOST );
182
182
} else {
183
- if (skb -> delivery_time_type == BPF_SKB_DELIVERY_TIME_UNSPEC &&
183
+ if (skb -> tstamp_type == BPF_SKB_TSTAMP_UNSPEC &&
184
184
skb -> tstamp )
185
185
inc_dtimes (EGRESS_ENDHOST );
186
186
else
@@ -204,7 +204,7 @@ int ingress_host(struct __sk_buff *skb)
204
204
if (!skb_type )
205
205
return TC_ACT_OK ;
206
206
207
- if (skb -> delivery_time_type == BPF_SKB_DELIVERY_TIME_MONO &&
207
+ if (skb -> tstamp_type == BPF_SKB_TSTAMP_DELIVERY_MONO &&
208
208
skb -> tstamp == EGRESS_FWDNS_MAGIC )
209
209
inc_dtimes (INGRESS_ENDHOST );
210
210
else
@@ -226,7 +226,7 @@ int ingress_fwdns_prio100(struct __sk_buff *skb)
226
226
return TC_ACT_OK ;
227
227
228
228
/* delivery_time is only available to the ingress
229
- * if the tc-bpf checks the skb->delivery_time_type .
229
+ * if the tc-bpf checks the skb->tstamp_type .
230
230
*/
231
231
if (skb -> tstamp == EGRESS_ENDHOST_MAGIC )
232
232
inc_errs (INGRESS_FWDNS_P100 );
@@ -250,7 +250,7 @@ int egress_fwdns_prio100(struct __sk_buff *skb)
250
250
return TC_ACT_OK ;
251
251
252
252
/* delivery_time is always available to egress even
253
- * the tc-bpf did not use the delivery_time_type .
253
+ * the tc-bpf did not use the tstamp_type .
254
254
*/
255
255
if (skb -> tstamp == INGRESS_FWDNS_MAGIC )
256
256
inc_dtimes (EGRESS_FWDNS_P100 );
@@ -278,9 +278,9 @@ int ingress_fwdns_prio101(struct __sk_buff *skb)
278
278
if (skb_proto (skb_type ) == IPPROTO_UDP )
279
279
expected_dtime = 0 ;
280
280
281
- if (skb -> delivery_time_type ) {
281
+ if (skb -> tstamp_type ) {
282
282
if (fwdns_clear_dtime () ||
283
- skb -> delivery_time_type != BPF_SKB_DELIVERY_TIME_MONO ||
283
+ skb -> tstamp_type != BPF_SKB_TSTAMP_DELIVERY_MONO ||
284
284
skb -> tstamp != expected_dtime )
285
285
inc_errs (INGRESS_FWDNS_P101 );
286
286
else
@@ -290,14 +290,14 @@ int ingress_fwdns_prio101(struct __sk_buff *skb)
290
290
inc_errs (INGRESS_FWDNS_P101 );
291
291
}
292
292
293
- if (skb -> delivery_time_type == BPF_SKB_DELIVERY_TIME_MONO ) {
293
+ if (skb -> tstamp_type == BPF_SKB_TSTAMP_DELIVERY_MONO ) {
294
294
skb -> tstamp = INGRESS_FWDNS_MAGIC ;
295
295
} else {
296
- if (bpf_skb_set_delivery_time (skb , INGRESS_FWDNS_MAGIC ,
297
- BPF_SKB_DELIVERY_TIME_MONO ))
296
+ if (bpf_skb_set_tstamp (skb , INGRESS_FWDNS_MAGIC ,
297
+ BPF_SKB_TSTAMP_DELIVERY_MONO ))
298
298
inc_errs (SET_DTIME );
299
- if (!bpf_skb_set_delivery_time (skb , INGRESS_FWDNS_MAGIC ,
300
- BPF_SKB_DELIVERY_TIME_UNSPEC ))
299
+ if (!bpf_skb_set_tstamp (skb , INGRESS_FWDNS_MAGIC ,
300
+ BPF_SKB_TSTAMP_UNSPEC ))
301
301
inc_errs (SET_DTIME );
302
302
}
303
303
@@ -320,9 +320,9 @@ int egress_fwdns_prio101(struct __sk_buff *skb)
320
320
/* Should have handled in prio100 */
321
321
return TC_ACT_SHOT ;
322
322
323
- if (skb -> delivery_time_type ) {
323
+ if (skb -> tstamp_type ) {
324
324
if (fwdns_clear_dtime () ||
325
- skb -> delivery_time_type != BPF_SKB_DELIVERY_TIME_MONO ||
325
+ skb -> tstamp_type != BPF_SKB_TSTAMP_DELIVERY_MONO ||
326
326
skb -> tstamp != INGRESS_FWDNS_MAGIC )
327
327
inc_errs (EGRESS_FWDNS_P101 );
328
328
else
@@ -332,14 +332,14 @@ int egress_fwdns_prio101(struct __sk_buff *skb)
332
332
inc_errs (EGRESS_FWDNS_P101 );
333
333
}
334
334
335
- if (skb -> delivery_time_type == BPF_SKB_DELIVERY_TIME_MONO ) {
335
+ if (skb -> tstamp_type == BPF_SKB_TSTAMP_DELIVERY_MONO ) {
336
336
skb -> tstamp = EGRESS_FWDNS_MAGIC ;
337
337
} else {
338
- if (bpf_skb_set_delivery_time (skb , EGRESS_FWDNS_MAGIC ,
339
- BPF_SKB_DELIVERY_TIME_MONO ))
338
+ if (bpf_skb_set_tstamp (skb , EGRESS_FWDNS_MAGIC ,
339
+ BPF_SKB_TSTAMP_DELIVERY_MONO ))
340
340
inc_errs (SET_DTIME );
341
- if (!bpf_skb_set_delivery_time (skb , EGRESS_FWDNS_MAGIC ,
342
- BPF_SKB_DELIVERY_TIME_UNSPEC ))
341
+ if (!bpf_skb_set_tstamp (skb , INGRESS_FWDNS_MAGIC ,
342
+ BPF_SKB_TSTAMP_UNSPEC ))
343
343
inc_errs (SET_DTIME );
344
344
}
345
345
0 commit comments