public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: ast@kernel.org, daniel@iogearbox.net, kafai@fb.com
Cc: netdev@vger.kernel.org
Subject: [bpf PATCH v5 4/4] bpf: sockhash, add release routine
Date: Sat, 30 Jun 2018 06:17:52 -0700	[thread overview]
Message-ID: <20180630131752.17344.75229.stgit@john-Precision-Tower-5810> (raw)
In-Reply-To: <20180630131506.17344.7833.stgit@john-Precision-Tower-5810>

Add map_release_uref pointer to hashmap ops. This was dropped when
original sockhash code was ported into bpf-next before initial
commit.

Fixes: 81110384441a ("bpf: sockmap, add hash map support")
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
---
 kernel/bpf/sockmap.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 60b6e8b..4fc2cb1 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -2478,6 +2478,7 @@ struct sock  *__sock_hash_lookup_elem(struct bpf_map *map, void *key)
 	.map_get_next_key = sock_hash_get_next_key,
 	.map_update_elem = sock_hash_update_elem,
 	.map_delete_elem = sock_hash_delete_elem,
+	.map_release_uref = sock_map_release,
 };
 
 BPF_CALL_4(bpf_sock_map_update, struct bpf_sock_ops_kern *, bpf_sock,

  parent reply	other threads:[~2018-06-30 13:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-30 13:17 [bpf PATCH v5 0/4] BPF fixes for sockhash John Fastabend
2018-06-30 13:17 ` [bpf PATCH v5 1/4] bpf: sockmap, fix crash when ipv6 sock is added John Fastabend
2018-06-30 13:17 ` [bpf PATCH v5 2/4] bpf: sockmap, fix smap_list_map_remove when psock is in many maps John Fastabend
2018-06-30 13:17 ` [bpf PATCH v5 3/4] bpf: sockhash fix omitted bucket lock in sock_close John Fastabend
2018-06-30 13:17 ` John Fastabend [this message]
2018-06-30 23:58 ` [bpf PATCH v5 0/4] BPF fixes for sockhash 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=20180630131752.17344.75229.stgit@john-Precision-Tower-5810 \
    --to=john.fastabend@gmail.com \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --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