Message ID | 20210209221826.922940-1-sdf@google.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 1e0aa3fb05f8be0201e05a3f4e6c8910b9071e96 |
Delegated to: | BPF |
Headers | show |
Series | [bpf-next] libbpf: use AF_LOCAL instead of AF_INET in xsk.c | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for bpf-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 9 maintainers not CCed: yhs@fb.com jonathan.lemon@gmail.com magnus.karlsson@intel.com kafai@fb.com songliubraving@fb.com kpsingh@kernel.org john.fastabend@gmail.com bjorn@kernel.org andrii@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
netdev/stable | success | Stable not CCed |
On Tue, 9 Feb 2021 at 23:50, Stanislav Fomichev <sdf@google.com> wrote: > > We have the environments where usage of AF_INET is prohibited > (cgroup/sock_create returns EPERM for AF_INET). Let's use > AF_LOCAL instead of AF_INET, it should perfectly work with SIOCETHTOOL. > > Signed-off-by: Stanislav Fomichev <sdf@google.com> Stanislav, apologies for the delay! Tested-by: Björn Töpel <bjorn.topel@intel.com> Acked-by: Björn Töpel <bjorn.topel@intel.com> Björn > --- > tools/lib/bpf/xsk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c > index 20500fb1f17e..ffbb588724d8 100644 > --- a/tools/lib/bpf/xsk.c > +++ b/tools/lib/bpf/xsk.c > @@ -517,7 +517,7 @@ static int xsk_get_max_queues(struct xsk_socket *xsk) > struct ifreq ifr = {}; > int fd, err, ret; > > - fd = socket(AF_INET, SOCK_DGRAM, 0); > + fd = socket(AF_LOCAL, SOCK_DGRAM, 0); > if (fd < 0) > return -errno; > > -- > 2.30.0.478.g8a0d178c01-goog >
On 02/12, Bj�rn T�pel wrote: > On Tue, 9 Feb 2021 at 23:50, Stanislav Fomichev <sdf@google.com> wrote: > > > > We have the environments where usage of AF_INET is prohibited > > (cgroup/sock_create returns EPERM for AF_INET). Let's use > > AF_LOCAL instead of AF_INET, it should perfectly work with SIOCETHTOOL. > > > > Signed-off-by: Stanislav Fomichev <sdf@google.com> > Stanislav, apologies for the delay! No worries, thank you for the review and testing! > Tested-by: Bj�rn T�pel <bjorn.topel@intel.com> > Acked-by: Bj�rn T�pel <bjorn.topel@intel.com> > Bj�rn > > --- > > tools/lib/bpf/xsk.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c > > index 20500fb1f17e..ffbb588724d8 100644 > > --- a/tools/lib/bpf/xsk.c > > +++ b/tools/lib/bpf/xsk.c > > @@ -517,7 +517,7 @@ static int xsk_get_max_queues(struct xsk_socket > *xsk) > > struct ifreq ifr = {}; > > int fd, err, ret; > > > > - fd = socket(AF_INET, SOCK_DGRAM, 0); > > + fd = socket(AF_LOCAL, SOCK_DGRAM, 0); > > if (fd < 0) > > return -errno; > > > > -- > > 2.30.0.478.g8a0d178c01-goog > >
Hello: This patch was applied to bpf/bpf-next.git (refs/heads/master): On Tue, 9 Feb 2021 14:18:26 -0800 you wrote: > We have the environments where usage of AF_INET is prohibited > (cgroup/sock_create returns EPERM for AF_INET). Let's use > AF_LOCAL instead of AF_INET, it should perfectly work with SIOCETHTOOL. > > Signed-off-by: Stanislav Fomichev <sdf@google.com> > --- > tools/lib/bpf/xsk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - [bpf-next] libbpf: use AF_LOCAL instead of AF_INET in xsk.c https://git.kernel.org/bpf/bpf-next/c/1e0aa3fb05f8 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c index 20500fb1f17e..ffbb588724d8 100644 --- a/tools/lib/bpf/xsk.c +++ b/tools/lib/bpf/xsk.c @@ -517,7 +517,7 @@ static int xsk_get_max_queues(struct xsk_socket *xsk) struct ifreq ifr = {}; int fd, err, ret; - fd = socket(AF_INET, SOCK_DGRAM, 0); + fd = socket(AF_LOCAL, SOCK_DGRAM, 0); if (fd < 0) return -errno;
We have the environments where usage of AF_INET is prohibited (cgroup/sock_create returns EPERM for AF_INET). Let's use AF_LOCAL instead of AF_INET, it should perfectly work with SIOCETHTOOL. Signed-off-by: Stanislav Fomichev <sdf@google.com> --- tools/lib/bpf/xsk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)