Lines Matching defs:flags
41 __u32 flags;
49 __u64 flags;
106 static int netlink_recvmsg(int sock, struct msghdr *mhdr, int flags)
111 len = recvmsg(sock, mhdr, flags);
287 __u32 flags)
306 if (flags) {
307 ret = nlattr_add(&req, IFLA_XDP_FLAGS, &flags, sizeof(flags));
311 if (flags & XDP_FLAGS_REPLACE) {
322 int bpf_xdp_attach(int ifindex, int prog_fd, __u32 flags, const struct bpf_xdp_attach_opts *opts)
331 flags |= XDP_FLAGS_REPLACE;
335 err = __bpf_set_link_xdp_fd_replace(ifindex, prog_fd, old_prog_fd, flags);
339 int bpf_xdp_detach(int ifindex, __u32 flags, const struct bpf_xdp_attach_opts *opts)
341 return bpf_xdp_attach(ifindex, -1, flags, opts);
424 md->flags = libbpf_nla_getattr_u64(tb[NETDEV_A_DEV_XDP_FEATURES]);
458 xdp_id.flags = xdp_flags;
499 opts->feature_flags = md.flags;
506 int bpf_xdp_query_id(int ifindex, int flags, __u32 *prog_id)
511 ret = bpf_xdp_query(ifindex, flags, &opts);
515 flags &= XDP_FLAGS_MODES;
517 if (opts.attach_mode != XDP_ATTACHED_MULTI && !flags)
519 else if (flags & XDP_FLAGS_DRV_MODE)
521 else if (flags & XDP_FLAGS_HW_MODE)
523 else if (flags & XDP_FLAGS_SKB_MODE)
582 static int tc_qdisc_modify(struct bpf_tc_hook *hook, int cmd, int flags)
594 req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | flags;
720 __u32 protocol, bpf_flags, handle, priority, parent, prog_id, flags;
739 flags = OPTS_GET(opts, flags, 0);
745 if (flags & ~BPF_TC_F_REPLACE)
748 flags = (flags & BPF_TC_F_REPLACE) ? NLM_F_REPLACE : NLM_F_EXCL;
754 NLM_F_ECHO | flags;
796 __u32 protocol = 0, handle, priority, parent, prog_id, flags;
813 flags = OPTS_GET(opts, flags, 0);
815 if (ifindex <= 0 || flags || prog_fd || prog_id)
867 __u32 protocol, handle, priority, parent, prog_id, flags;
885 flags = OPTS_GET(opts, flags, 0);
887 if (ifindex <= 0 || flags || prog_fd || prog_id ||