if (last_tstamp)
next_tstamp = *last_tstamp + delay_ns;
tstamp = skb->tstamp; if (tstamp < now)
tstamp = now;
/* should we throttle? */ if (next_tstamp <= tstamp) { if (bpf_map_update_elem(&flow_map, &key, &tstamp, BPF_ANY)) return TC_ACT_SHOT; return TC_ACT_OK;
}
/* do not queue past the time horizon */ if (next_tstamp - now >= TIME_HORIZON_NS) return TC_ACT_SHOT;
/* set ecn bit, if needed */ if (next_tstamp - now >= ECN_HORIZON_NS)
bpf_skb_ecn_set_ce(skb);
if (bpf_map_update_elem(&flow_map, &key, &next_tstamp, BPF_EXIST)) return TC_ACT_SHOT;
skb->tstamp = next_tstamp;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.