From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93987C282CB for ; Tue, 5 Feb 2019 19:36:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 623FE217D6 for ; Tue, 5 Feb 2019 19:36:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="coG3WJrC" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728062AbfBETgJ (ORCPT ); Tue, 5 Feb 2019 14:36:09 -0500 Received: from mail-yw1-f66.google.com ([209.85.161.66]:41139 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726422AbfBETgJ (ORCPT ); Tue, 5 Feb 2019 14:36:09 -0500 Received: by mail-yw1-f66.google.com with SMTP id f65so2151376ywc.8 for ; Tue, 05 Feb 2019 11:36:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=86e6/ah3jc7QVLNXraMp57oB792vhTOsSn7hKxCVJ20=; b=coG3WJrCxhip4OAJO460UEzm+PPXsU4aF3J2DwRPC/mG0yCW4fWwKLd9CbVejNBWXR itQJA0KEqNrFo0aEMlQZCnFnF+D5X0ogrF+CwfkZlQlM4WDHnyFL0M9VWFgQV4na472U ZiRCUPv5i5YHqX8thW1IJpfH6Ssx3R1JKqZDg= 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:content-transfer-encoding; bh=86e6/ah3jc7QVLNXraMp57oB792vhTOsSn7hKxCVJ20=; b=nnI/6oT2sGZKih/8IPCEALSOW9aT1v/PpkA2ZDVP95cMGBp5GyLf4XypHww0wdD0HN PMxlX54vt73kX55UhCzvKIgAPll8DbWOqEHzr3uYJQ5wGolSv22BwuzWmk8OdinZxCWQ l6bUh1B2ZFnlQyL6OGKaRdV3YUmmV893Kri6Kp912p2cY6jFVR5h6TvZWaEQ12MGO1cM ygyTRWdWHR7ppmZUPEvyKdTOtUNuJxDS0LOd5YYCo9rYXMxePWKGb6E/EGB6YHUT8Ukq nrTVOa7GAyn24LxuZE74iOi23aNw/YcTM2gdeqg7fWRq1zTEr7Eef/BIZJxiTldgqoyC qRnA== X-Gm-Message-State: AHQUAubQ3TBaP+7Az92W0bRH/nTXFNxYbJv9upVUaRA++sW+K/upQ1o+ 24hm3jMLKbhBzewvne4gSpMnBU01DL2qPkUa1Wds2w== X-Google-Smtp-Source: AHgI3IYJ6KWr7W/kNCws/uu86Tuicp7nZ7kWO4gV3aLsA5aLhswRgmuayw4WUGy7L0ykRXp+PhxvTzWQgv+fbgei6/k= X-Received: by 2002:a81:70c1:: with SMTP id l184mr5388499ywc.306.1549395367780; Tue, 05 Feb 2019 11:36:07 -0800 (PST) MIME-Version: 1.0 References: <874la1r0io.fsf@linkitivity.dja.id.au> In-Reply-To: From: Michael Chan Date: Tue, 5 Feb 2019 11:35:56 -0800 Message-ID: Subject: Re: Stack sends oversize UDP packet to the driver To: =?UTF-8?B?TWFoZXNoIEJhbmRld2FyICjgpK7gpLngpYfgpLYg4KSs4KSC4KSh4KWH4KS14KS+4KSwKQ==?= Cc: Daniel Axtens , Netdev , David Miller , Eric Dumazet , Willem de Bruijn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, Jan 30, 2019 at 5:00 PM Mahesh Bandewar (=E0=A4=AE=E0=A4=B9=E0=A5= =87=E0=A4=B6 =E0=A4=AC=E0=A4=82=E0=A4=A1=E0=A5=87=E0=A4=B5=E0=A4=BE=E0=A4= =B0) wrote: > > On Wed, Jan 30, 2019 at 1:07 AM Michael Chan = wrote: > > > > On Tue, Jan 22, 2019 at 10:29 AM Mahesh Bandewar (=E0=A4=AE=E0=A4=B9=E0= =A5=87=E0=A4=B6 =E0=A4=AC=E0=A4=82=E0=A4=A1=E0=A5=87=E0=A4=B5=E0=A4=BE=E0= =A4=B0) > > wrote: > > > > > > > > The idea behind the fix is very simple and it is to create a dst-only > > > (unregistered) device with a very low MTU and use it instead of 'lo' > > > while invalidating the dst. This would make it *not* forward packets > > > to driver which might need fragmentation. > > > > > > > We tested the 2 patches many times and including an overnight test. I > > can confirm that the oversize UDP packets are no longer seen with the > > patches applied. However, I don't see the blackhole xmit function > > getting called to free the SKBs though. > > > Thanks for the confirmation Michael. The blackhole device mtu is > really small, so I would assume the fragmentation code dropped those > packets before calling the xmit function (in ip_fragment), you could > verify that with icmp counters. > I've looked at this a little more. The blackhole_dev is not IFF_UP | IFF_RUNNING, right? May be that's why the packets are never getting to the xmit function?