From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f49.google.com (mail-oi0-f49.google.com [209.85.218.49]) by dpdk.org (Postfix) with ESMTP id 0E04B98 for ; Fri, 17 Aug 2018 23:15:14 +0200 (CEST) Received: by mail-oi0-f49.google.com with SMTP id m11-v6so16364706oic.2 for ; Fri, 17 Aug 2018 14:15:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k+YQK0BzFWsKFobG/FDDQ1/L63LihpPA/HouSYcrVi8=; b=bLI/lfGkKnvpbWojfe7QrUC+RxA1Ep3WGOEYQ/ClBugAx/CjwjxxNTcaegAKIoongv ysqBxl3wpQFN+6kk7v0ia2qZwZ8ze0VySU4QKyUepFc25vpH/VmQsXlGmfCp6fCGy7U+ F3Ok6Wp7mW3iRl+hqZNQ7I8hj7debttFMdar8EHIOfg3Qh3gslznav37+inNwGILeG0r hh9qN99y1X2aVz/8OSYmZs+FotlHDXb6mVpkbNBmMY60rw+k+IzjtsylYYTF8KaGdEZP YiPXvuemCOGDIQd1nj3bBcOjaA5z8zBku9oave6/7zinEfwMx2dVRYEquh0/cZc5NTNS 5AcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k+YQK0BzFWsKFobG/FDDQ1/L63LihpPA/HouSYcrVi8=; b=EgVw20q2X58HVn1RpmBWUHbhCcKHDWdqo2WcFPwVcxQIvdBPyArwJZUFWlX+bEXCk3 9YZCwo6hZGd+O4gcXuR4SXjuuM7KY/bmv0/pyNrTRfkMo3EZjDpdJeKKsBo4FP4A69zv wLW7BveCVjuBpzzpQAChjL9onTgX+oL/oOTWEspaNFRHI3dsuAFRieLQHLpQHwvXyDxU 1VX+yGUGrp3EfiXQkkNRw+DRL8xSnSHWhiLan0HjNkKdZTuqh2T/Ed7jDMZQobiygaPL 1h/CtF5BSWa76U5jDABzDMHV70jLlbBt5CE6/Zr4BH8EIyA0c5zLHFHGwl223YgthhrL xjgw== X-Gm-Message-State: AOUpUlGII+X6PZCkBg+bSg/c3PXvVOSDFKFGAC9a4B1xygD3GsWco61G CrsInr0xSIhpUssvyEeu7SamnZxdpvaplZUVAeo= X-Google-Smtp-Source: AA+uWPx055vQ3oleTPmKJ20XSjxQKLDNRpABiNLnKVnhcc6wvoxRU3A49y2qJroh/gQntYBTuyOkiLq33UcdTBWQ43g= X-Received: by 2002:aca:bd8b:: with SMTP id n133-v6mr4460100oif.108.1534540513340; Fri, 17 Aug 2018 14:15:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rami Rosen Date: Sat, 18 Aug 2018 00:15:05 +0300 Message-ID: To: Andrew Wang Cc: users@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] AF_PACKET pmd and linux networking stack X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 21:15:14 -0000 Hi Andrew, I am not sure at all that there is a way of achieving it, because of the way AF_PACKET works. But couldn't you achieve your goal with running DPDK L2FWD or DPDK L3FWD application ? In such a case, when not working in promiscuous mode, it seems that this will avoid processing of the packets by the kernel. See the l2fwd and l3fwd sections in DPDK samples guide. Regards, Rami Rosen =D7=91=D7=AA=D7=90=D7=A8=D7=99=D7=9A =D7=99=D7=95=D7=9D =D7=93=D7=B3, 8 =D7= =91=D7=90=D7=95=D7=92=D7=B3 2018, 19:57, =D7=9E=D7=90=D7=AA Andrew Wang =E2= =80=8F: > Hi > > Is there a way of preventing the linux kernel networking stack from > handling packets when using the AF_PACKET pmd? > > Our DPDK app is running on a node that is attracting traffic for a VIP an= d > for which it has a blackhole routing rule (to drop all the incoming packe= ts > for that VIP). > > The intention was to have our DPDK app (running on AF_PACKET pmd for now = - > we're still developing the app) grab those packets, process and send them > out (with a different address). > > Right now we can actually see those packets in our dpdk app, we process > them, give them a different address, but it seems that the linux kernel > networking stack is still dropping them. > > When the blackhole rule is removed we see the outgoing packet with correc= t > header, but also a destination unreachable message is sent out, suggestin= g > the kernel is also handling the packet. We see the same behavior when usi= ng > iptables to drop packets (instead of blackhole route). > > Any suggestions appreciated. > > Thanks > Andrew >