• Home
  • Raw
  • Download

Lines Matching refs:user_ctx

857 	struct bpf_flow_keys *user_ctx;  in bpf_prog_test_run_flow_dissector()  local
883 user_ctx = bpf_ctx_init(kattr, sizeof(struct bpf_flow_keys)); in bpf_prog_test_run_flow_dissector()
884 if (IS_ERR(user_ctx)) { in bpf_prog_test_run_flow_dissector()
886 return PTR_ERR(user_ctx); in bpf_prog_test_run_flow_dissector()
888 if (user_ctx) { in bpf_prog_test_run_flow_dissector()
889 ret = verify_user_bpf_flow_keys(user_ctx); in bpf_prog_test_run_flow_dissector()
892 flags = user_ctx->flags; in bpf_prog_test_run_flow_dissector()
912 ret = bpf_ctx_finish(kattr, uattr, user_ctx, in bpf_prog_test_run_flow_dissector()
916 kfree(user_ctx); in bpf_prog_test_run_flow_dissector()
928 struct bpf_sk_lookup *user_ctx; in bpf_prog_test_run_sk_lookup() local
945 user_ctx = bpf_ctx_init(kattr, sizeof(*user_ctx)); in bpf_prog_test_run_sk_lookup()
946 if (IS_ERR(user_ctx)) in bpf_prog_test_run_sk_lookup()
947 return PTR_ERR(user_ctx); in bpf_prog_test_run_sk_lookup()
949 if (!user_ctx) in bpf_prog_test_run_sk_lookup()
952 if (user_ctx->sk) in bpf_prog_test_run_sk_lookup()
955 if (!range_is_zero(user_ctx, offsetofend(typeof(*user_ctx), local_port), sizeof(*user_ctx))) in bpf_prog_test_run_sk_lookup()
958 if (user_ctx->local_port > U16_MAX) { in bpf_prog_test_run_sk_lookup()
963 ctx.family = (u16)user_ctx->family; in bpf_prog_test_run_sk_lookup()
964 ctx.protocol = (u16)user_ctx->protocol; in bpf_prog_test_run_sk_lookup()
965 ctx.dport = (u16)user_ctx->local_port; in bpf_prog_test_run_sk_lookup()
966 ctx.sport = user_ctx->remote_port; in bpf_prog_test_run_sk_lookup()
970 ctx.v4.daddr = (__force __be32)user_ctx->local_ip4; in bpf_prog_test_run_sk_lookup()
971 ctx.v4.saddr = (__force __be32)user_ctx->remote_ip4; in bpf_prog_test_run_sk_lookup()
976 ctx.v6.daddr = (struct in6_addr *)user_ctx->local_ip6; in bpf_prog_test_run_sk_lookup()
977 ctx.v6.saddr = (struct in6_addr *)user_ctx->remote_ip6; in bpf_prog_test_run_sk_lookup()
1004 user_ctx->cookie = 0; in bpf_prog_test_run_sk_lookup()
1011 user_ctx->cookie = sock_gen_cookie(ctx.selected_sk); in bpf_prog_test_run_sk_lookup()
1016 ret = bpf_ctx_finish(kattr, uattr, user_ctx, sizeof(*user_ctx)); in bpf_prog_test_run_sk_lookup()
1020 kfree(user_ctx); in bpf_prog_test_run_sk_lookup()