DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Pascal Mazon <pascal.mazon@6wind.com>,
	Ophir Munk <ophirmu@mellanox.com>,
	 dev@dpdk.org
Cc: Thomas Monjalon <thomas@monjalon.net>, Olga Shern <olgas@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH v2] net/tap: fix eBPF handling of non-RSS flows
Date: Mon, 5 Feb 2018 18:10:33 +0000	[thread overview]
Message-ID: <a59e487f-9715-c214-2ce1-71cf2f345750@intel.com> (raw)
In-Reply-To: <82465840-531b-8ce5-eb0d-a9fe4c962542@6wind.com>

On 2/5/2018 2:51 PM, Pascal Mazon wrote:

> On 05/02/2018 15:40, Ophir Munk wrote:
>> The eBPF classifier (section "cls_q" in tap_bpf_program.c) is tracing
>> marked packets in which skb->cb[1] contains an RSS queue number, and
>> redirects those packets to the matched queue.
>> It is expected that skb->cb[1] has been previously set with a valid RSS
>> queue number during an eBPF action (section "l3_l4" in tap_bpf_program.c).
>> However, for non-RSS flows, skb->cb[1] may contain a random unset value,
>> which could falsely be interpreted as a valid RSS queue.
>> To avoid this potential error, tap_bpf_program.c has been updated as
>> follows:
>> 1. After calculating the RSS queue number, it is added a unique offset in
>> order to uniquely identify it as a valid RSS queue number.
>> 2. After matching an RSS queue to a packet, skb->cb[1] is set to 0.
>>
>> Fixes: cdc07e83bb24 ("net/tap: add eBPF program file")
>> Fixes: aabe70df73a3 ("net/tap: add eBPF bytes code")
>>
>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

> The mitigation is good enough, random packets are more likely to have
> cb[1] == 0 than something above 7cafe800.
>
> Acked-by: Pascal Mazon <pascal.mazon@6wind.com>

Applied to dpdk-next-net/master, thanks.

      reply	other threads:[~2018-02-05 18:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-03 23:34 [dpdk-dev] [PATCH v1] " Ophir Munk
2018-02-05 14:40 ` [dpdk-dev] [PATCH v2] fix eBPF handling for non-RSS rules Ophir Munk
2018-02-05 14:40   ` [dpdk-dev] [PATCH v2] net/tap: fix eBPF handling of non-RSS flows Ophir Munk
2018-02-05 14:51     ` Pascal Mazon
2018-02-05 18:10       ` Ferruh Yigit [this message]

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=a59e487f-9715-c214-2ce1-71cf2f345750@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=olgas@mellanox.com \
    --cc=ophirmu@mellanox.com \
    --cc=pascal.mazon@6wind.com \
    --cc=thomas@monjalon.net \
    /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).