bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sdf@google.com
To: "Björn Töpel" <bjorn.topel@gmail.com>
Cc: Netdev <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH bpf-next] libbpf: use AF_LOCAL instead of AF_INET in xsk.c
Date: Fri, 12 Feb 2021 08:15:34 -0800	[thread overview]
Message-ID: <YCappsaKUg6o1oSU@google.com> (raw)
In-Reply-To: <CAJ+HfNhtZvvqj0pvEu0bysrwAvxngtC3z-2RUpP1HY3iU7gg5w@mail.gmail.com>

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

  reply	other threads:[~2021-02-12 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 22:18 [PATCH bpf-next] libbpf: use AF_LOCAL instead of AF_INET in xsk.c Stanislav Fomichev
2021-02-12  6:59 ` Björn Töpel
2021-02-12 16:15   ` sdf [this message]
2021-02-12 19:40 ` patchwork-bot+netdevbpf

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=YCappsaKUg6o1oSU@google.com \
    --to=sdf@google.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@gmail.com \
    --cc=bpf@vger.kernel.org \
    --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).