Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>,
	bpf@vger.kernel.org, netdev@vger.kernel.org, ast@kernel.org,
	davem@davemloft.net, kuba@kernel.org
Cc: dsahern@gmail.com, alexander.h.duyck@intel.com, tom.herbert@intel.com
Subject: Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function
Date: Mon, 31 Aug 2020 22:33:10 +0200	[thread overview]
Message-ID: <0333522d-7b65-e665-f19e-d36d11bd7846@iogearbox.net> (raw)
In-Reply-To: <20200831192506.28896-1-harshitha.ramamurthy@intel.com>

On 8/31/20 9:25 PM, Harshitha Ramamurthy wrote:
> This patch adds a helper function called bpf_get_xdp_hash to calculate
> the hash for a packet at the XDP layer. In the helper function, we call
> the kernel flow dissector in non-skb mode by passing the net pointer
> to calculate the hash.

So this commit msg says 'what' the patch does, but says nothing about 'why' it is
needed especially given there's the 1 mio insn limit in place where it should be
easy to write that up in BPF anyway. The commit msg needs to have a clear rationale
which describes the motivation behind this helper.. why it cannot be done in BPF
itself?

> Changes since RFC:
> - accounted for vlans(David Ahern)
> - return the correct hash by not using skb_get_hash(David Ahern)
> - call __skb_flow_dissect in non-skb mode
> 

  parent reply	other threads:[~2020-08-31 20:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-31 19:25 Harshitha Ramamurthy
2020-08-31 19:54 ` David Ahern
2020-09-02  0:52   ` Ramamurthy, Harshitha
2020-09-02  2:09     ` David Ahern
2020-08-31 20:33 ` Daniel Borkmann [this message]
2020-09-02  0:54   ` Ramamurthy, Harshitha
2020-09-02 15:56   ` Tom Herbert

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=0333522d-7b65-e665-f19e-d36d11bd7846@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=alexander.h.duyck@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=harshitha.ramamurthy@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tom.herbert@intel.com \
    --subject='Re: [PATCH bpf-next] bpf: add bpf_get_xdp_hash helper function' \
    /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

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).