From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E061CA00C2 for ; Tue, 8 Nov 2022 20:51:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B5E52400D7; Tue, 8 Nov 2022 20:51:28 +0100 (CET) Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178]) by mails.dpdk.org (Postfix) with ESMTP id 5AE3D400D4 for ; Tue, 8 Nov 2022 20:51:27 +0100 (CET) Received: by mail-pl1-f178.google.com with SMTP id c2so15079981plz.11 for ; Tue, 08 Nov 2022 11:51:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=qDwoOFhbNV4CrQlgabBWAVtiXhXOH/a57w2ysQUVnsA=; b=mJ+/dHJKjaoc3pcM2r5KiLrTxNiVf+xjzOSeZZSFTyUi9Sqp6Mmo+Yq7rn/Wyl9aLn rBPxAnf/jjlZHaCuRtL3lr7W+i9OqDXOwkeVeKbzf6694lFQcg89lf+k0389QMAHp5s2 Ip8pKEkdk+uLITFumS/Jq6usFM2/raDk9NSW2HlXvRF04KqaN8+Kug+e8rrpOkFxWEDl yRpXelSDtv0apbHNFfB83VAcirVye9p+Gy3dm2Q1v69ULWvxzfTJuoNdDSlgaJ0URS8Z 6FHhTmlVUi0d/T2O+mv73Va6pcxVlkCZx74dE3+QwXoFYbN0RmK/BJCplgSfO/Sr7xUQ 4Geg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=qDwoOFhbNV4CrQlgabBWAVtiXhXOH/a57w2ysQUVnsA=; b=q2G45U0FQUJqwL2Aj9E8/pqzGL3veCm2SmXw+3kS/zZ1yRSb3vRq5JcvcuCecWa8Ys 9hRoIzyQeTpcnub9A1oaYdXT6SYC7iL6x8lXIYnieTgft7es2MvEbzq1s9MWkhMez4jx Q/L4lwqTtJYVcf0qRLbMICBovPwbpPvaHf9nxKeflumikQzdqSiWoICpTDOqYF3+b72W sIeQSRts+GSvIAh5I4qZc1K6VSAmg2LzRqkyDr+btTiviyRCKTkWl4MA8Q2EpUQvZi2K 1jx+CQHn14d53N78vnlHLPda1hm+5fR4IpgPUjIVy6lRlR47SLDUsBmR7SlPI84fYPhu IVTQ== X-Gm-Message-State: ACrzQf3Y8w6W4witZNWdNmrd+wF6SAAhqn5tjmoCNDIovXHKRgWAUr6N ciTeOKSOsKnO/J0fWmYwEkZqd/Ea3UScTa2Q6Yai/rL3Uok= X-Google-Smtp-Source: AMsMyM7gWBw3VM9hFdK+H32Owfd7CskVngO0IjjQqKc8GaUOmxs/Qp68w30p6t4e5G5fEVxbgg3FYywfeDXtWqwlA+4= X-Received: by 2002:a17:903:50e:b0:182:631b:df6f with SMTP id jn14-20020a170903050e00b00182631bdf6fmr57260388plb.66.1667937086223; Tue, 08 Nov 2022 11:51:26 -0800 (PST) MIME-Version: 1.0 From: Boris Ouretskey Date: Tue, 8 Nov 2022 21:51:15 +0200 Message-ID: Subject: DPDK server packets with AF_PACKET driver are not received by the client connected to the same virtual bridge. To: users@dpdk.org Content-Type: multipart/alternative; boundary="00000000000088391405ecfadd0b" X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org --00000000000088391405ecfadd0b Content-Type: text/plain; charset="UTF-8" Hi I am trying to run a docker based system in one VM, with some servers using the DPDK and facing a very strange issue. The relevant part of the system is the echo server which is built with DPDK library and runs in docker, connected to the virtual bridge (with AF_PACKET driver), and echo client built with regular sockets (java application). See the drawing below for visual details. The strange thing is that echo replies sent from DPDK echo server docker (Docker2), can be seen in tcpdump in the docker of echo client (Docker1) however the application (java client) does not receive it on socket level. When the echo server runs as a socket application everything works. Seams like OS (linux) decide not to route the packet to the application for some reason. Some quick important notes. - DPDK layer starts ok and no EAL errors are reported. Its echo replies as mentioned before can clearly be seen when capturing traffic on eth0 in client docker. - It is not the issue of parsing the echo replies on application level. I checked the strace logs and cannot see any traffic delivered to the application - I have compared the captures from working socket based echo server and MACs seam to be ok, also the packets sent from DPDK server are formed well. - No logs for martian packets when enabled. I would like to focus the attention of dear DPDK experts on the following question: is it possible that DPDK AF_PACKET driver intercepts both packets destined to the virtual nic eth0 of Docker1 AND eth0 of Docker2, preventing it from being received by application? DPDK Version 18 VIRTUAL BOX VM (Alma Linux) Docker1 Docker2 +---------------+ +------------+ | | Request | | | | --------------> | DPDK | | Socket Echo | | Echo Server | Client | Reply | Server | | | <------------- | | --vdev=eth_af_packet0,iface=eth0,qdisc_bypass=1 | | | | | tcpdump -i eth0 +------+-----+ +-------+-------+ eth0 | | eth0 | | No IP | +------v--------------------------------------v-----+ | Virtual Docker Bridge | +---------------------------------------------------+ Thanks --00000000000088391405ecfadd0b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


<= /span>
Hi

I am try= ing to run a docker based system in one VM, with some servers using the DPD= K and facing a very strange issue.

The relevant part of the system i= s the echo server which is built with DPDK library and runs in docker, conn= ected to the virtual bridge (with AF_PACKET driver), and echo client built = with regular sockets (java application). See the drawing below for visual d= etails.

The strange thing is that echo replies sent from DPDK echo s= erver docker (Docker2), can be seen in tcpdump in the docker of echo client= (Docker1) however the application (java client) does not receive it on soc= ket level. When the echo server runs as a socket application everything wor= ks. Seams like OS (linux) decide not to route the packet to the application= for some=C2=A0reason.

Some quick important notes.

- DPDK la= yer starts ok and no EAL errors are reported. Its echo=C2=A0replies as ment= ioned before can clearly be seen when capturing traffic on eth0 in client d= ocker.
- It is not the issue of parsing= the echo replies on application level. I checked the strace logs and canno= t see any traffic delivered to the application
- I have compared the cap= tures from working socket based echo server and MACs seam to be ok, also th= e packets sent from DPDK server are formed well.
- No logs for martian p= ackets when enabled.

I would like to focus the attention of dear DPD= K experts on the following question: is it possible that DPDK AF_PACKET dri= ver intercepts both packets destined to =C2=A0the virtual nic eth0 of Docke= r1 AND eth0 of Docker2, preventing it from being received by application?
DPDK Version 18

VIRTUAL BOX VM (Alma Linux)

=C2=A0 =C2= =A0 Docker1 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Docker2
+-------------= --+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 +------------+
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= | =C2=A0 =C2=A0Request =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 | =C2=A0 -------------->=C2=A0 =C2=A0 =C2=A0| =C2=A0DPDK = =C2=A0 =C2=A0 =C2=A0|
| Socket Echo =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0Echo Server
| = =C2=A0 Client =C2=A0 =C2=A0 =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 Reply =C2= =A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0Server =C2=A0 =C2=A0|
| =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 <------------- =C2=A0 =C2=A0= =C2=A0| =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| --vdev=3Deth_af_packet0= ,iface=3Deth0,qdisc_bypass=3D1
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0|
| =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0tcpdump -i eth0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0+------+-----+
+-------+-------+ =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 eth0 =C2=A0 |
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 | eth0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |
= =C2=A0 =C2=A0 =C2=A0 =C2=A0 | =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 No IP =C2=A0|=C2=A0+------v--------------------------------------v-----+
=C2=A0| = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Virtual Docker Bridge =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |
=C2=A0+-----------------= ----------------------------------+
=C2=A0

Thanks
--00000000000088391405ecfadd0b--