From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: netdev@vger.kernel.org, Daniel Borkmann <borkmann@iogearbox.net>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
brouer@redhat.com
Subject: Re: [PATCH bpf-next] bpf: add skb->queue_mapping write access from tc clsact
Date: Tue, 19 Feb 2019 20:36:50 +0100 [thread overview]
Message-ID: <20190219203650.489b19f5@carbon> (raw)
In-Reply-To: <df9f511a-6b91-2808-4f71-5342918afa33@iogearbox.net>
On Tue, 19 Feb 2019 17:18:30 +0100
Daniel Borkmann <daniel@iogearbox.net> wrote:
> Untested / uncompiled, but should be:
>
> case offsetof(struct __sk_buff, queue_mapping):
> if (type == BPF_WRITE) {
> *insn++ = BPF_JMP_IMM(BPF_JGE, si->src_reg, NO_QUEUE_MAPPING, 1);
> *insn++ = BPF_STX_MEM(BPF_H, si->dst_reg, si->src_reg,
> bpf_target_off(struct sk_buff, queue_mapping, 2,
> target_size));
> } else {
> *insn++ = BPF_LDX_MEM(BPF_H, si->dst_reg, si->src_reg,
> bpf_target_off(struct sk_buff, queue_mapping, 2,
> target_size));
> }
> break;
In-cooperated in V2 and tested.
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2019-02-19 19:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 10:24 [PATCH bpf-next] bpf: add skb->queue_mapping write access from tc clsact Jesper Dangaard Brouer
2019-02-19 11:46 ` Daniel Borkmann
2019-02-19 14:52 ` Jesper Dangaard Brouer
2019-02-19 16:18 ` Daniel Borkmann
2019-02-19 19:36 ` Jesper Dangaard Brouer [this message]
2019-02-19 15:57 ` Jesper Dangaard Brouer
2019-02-19 16:08 ` Daniel Borkmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190219203650.489b19f5@carbon \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=borkmann@iogearbox.net \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).