From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: "Sebastião Santos Boavida Amaro"
<sebastiao.amaro@tecnico.ulisboa.pt>,
xdp-newbies@vger.kernel.org
Subject: Re: Using XDP in docker swarm to track outgoing traffic
Date: Tue, 06 Jul 2021 17:53:56 +0200 [thread overview]
Message-ID: <878s2jxwtn.fsf@toke.dk> (raw)
In-Reply-To: <36491a913ed7da582ef3d264de1a8046@tecnico.ulisboa.pt>
Sebastião Santos Boavida Amaro
<sebastiao.amaro@tecnico.ulisboa.pt> writes:
> Hi everyone,
> I am trying to use XDP to track outgoing traffic from docker containers
> deployed using docker swarm and running in a network using the driver
> overlay. I am using a simple xdp program based on [1], and I run this
> program on the network namespace of the container using nsenter and
> attach it to its eth0.
> However, I am only able to detect the incoming packets and not the
> outgoing ones. When running tcpdump on the container network namespace I
> can see both incoming and outgoing packets. So I am a bit confused as to
> why XDP would not detect the outgoing ones.
> Does anyone know why the reason for this or a general idea as to why
> this might happen?
Yeah, XDP only works on ingress - you'll need to use the TC hook if you
want to look at egress traffic (or attach to the veth peer outside the
container) :)
-Toke
prev parent reply other threads:[~2021-07-06 15:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-06 15:41 Using XDP in docker swarm to track outgoing traffic Sebastião Santos Boavida Amaro
2021-07-06 15:53 ` Toke Høiland-Jørgensen [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=878s2jxwtn.fsf@toke.dk \
--to=toke@redhat.com \
--cc=sebastiao.amaro@tecnico.ulisboa.pt \
--cc=xdp-newbies@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 read-only IMAP folder(s) and NNTP newsgroup(s).