SEC("xdp_mark") int _xdp_mark(struct xdp_md *ctx)
{ struct meta_info *meta; void *data; int ret;
/* Reserve space in-front of data pointer for our meta info. *(Noticedriversnotsupportingdata_metawillfailhere!)
*/
ret = bpf_xdp_adjust_meta(ctx, -(int)sizeof(*meta)); if (ret < 0) return XDP_ABORTED;
/* Notice: Kernel-side verifier requires that loading of *ctx->dataMUSThappen_after_helperbpf_xdp_adjust_meta(), *aspkt-datapointersareinvalidated.Helpersthatrequire *thisaredetermined/markedbybpf_helper_changes_pkt_data()
*/
data = (void *)(unsignedlong)ctx->data;
/* Check data_meta have room for meta_info struct */
meta = (void *)(unsignedlong)ctx->data_meta; if (meta + 1 > data) return XDP_ABORTED;
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.