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=-3.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS autolearn=no 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 B27B4C10F27 for ; Mon, 9 Mar 2020 15:51:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CD5020578 for ; Mon, 9 Mar 2020 15:51:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q2U/9ZPt" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbgCIPvD (ORCPT ); Mon, 9 Mar 2020 11:51:03 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:37089 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgCIPvD (ORCPT ); Mon, 9 Mar 2020 11:51:03 -0400 Received: by mail-yw1-f65.google.com with SMTP id i1so6329666ywf.4 for ; Mon, 09 Mar 2020 08:51:02 -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=J5H4Mtth232NqBlIZT4m6T+vzyRxMtyCSk83lnva1Ls=; b=q2U/9ZPtgkWrIiN4DbWxmzjMtGsunPEb1o/plq/47o+NC9msRctwgw3sNT6sGuXAvs SQxwCJ5ZtZwhNAHSeAO7X5Di2dfiOAxLUeEs9+YWphnz21dF1RmBodcr2Ooi/jDjFRBC R8/bQa2bkG0FLQMV6fy0ro1NuVZxkugRrKVAkU5gysemc8YJtPXRpddbBNsRb+Au2o94 87JOnmaPJtlplm7IQB+zNXXRgzE05Vu48xTrZko71zSScazT/WZY0tWZrtBdxdEfr7DY tnLcw7pLZaOTxhfGTXO9FjcuymyB6q3T8A7+oXVycHcvXdR4hxUazfNPPRlWpxL8EQUo IwqQ== 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=J5H4Mtth232NqBlIZT4m6T+vzyRxMtyCSk83lnva1Ls=; b=fDRwE1wIAGeVPV+bL49ncBmxTsFmM4s8TM+x4RcQjcxNq8Yy516BZhafI1YPwb2edI Baz26yo9Po5/lOjWbVHVY0S7xrCycfqHQwU1jNTKgwW/xnLeAh7aau5yJxowqevNXyVT ywdaDVsbiWObYiUuW542enjwjxWjvP/fL3uhMADVJcN/eRNUdbiaUJt0NoFJtz3xkO8w UWxf0ltNJxvxVVj8yMkScJWENmkfV+Jl+ckItahs+ETTkt+zUaP00r5XJYuTy3PNE3+0 3j3jJQOI1bAR9QuRVlkK4nxA/Ekjm1Aw2G/3n43/IP9d3DcaYqsFT56tvFfK1Jgd5/K/ 1P0w== X-Gm-Message-State: ANhLgQ1i2pvLLFKSO+EmGbBSFkhUOl0Yi1BcuoMPfMyiLTHjhC33sSrC vfUo2F854oBkCLUkK/s849Z7T3L2 X-Google-Smtp-Source: ADFU+vufWQARFscCixteF71bfgPjNup+0JSMF6zhQ8+FFneGL+xcAEKDJXtR42ZjQ9567O3cFHhgsw== X-Received: by 2002:a5b:50d:: with SMTP id o13mr16583573ybp.366.1583769062031; Mon, 09 Mar 2020 08:51:02 -0700 (PDT) Received: from mail-yw1-f49.google.com (mail-yw1-f49.google.com. [209.85.161.49]) by smtp.gmail.com with ESMTPSA id l68sm2100198ywg.23.2020.03.09.08.51.00 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Mar 2020 08:51:01 -0700 (PDT) Received: by mail-yw1-f49.google.com with SMTP id c15so5973250ywn.7 for ; Mon, 09 Mar 2020 08:51:00 -0700 (PDT) X-Received: by 2002:a81:f10a:: with SMTP id h10mr17393255ywm.109.1583769060462; Mon, 09 Mar 2020 08:51:00 -0700 (PDT) MIME-Version: 1.0 References: <20200309153435.32109-1-willemdebruijn.kernel@gmail.com> In-Reply-To: From: Willem de Bruijn Date: Mon, 9 Mar 2020 11:50:23 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH net] net/packet: tpacket_rcv: do not increment ring index on drop To: Willem de Bruijn Cc: Network Development , David Miller , "Michael S. Tsirkin" Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Mar 9, 2020 at 11:42 AM Willem de Bruijn wrote: > > On Mon, Mar 9, 2020 at 11:34 AM Willem de Bruijn > wrote: > > > > From: Willem de Bruijn > > > > In one error case, tpacket_rcv drops packets after incrementing the > > ring producer index. > > > > If this happens, it does not update tp_status to TP_STATUS_USER and > > thus the reader is stalled for an iteration of the ring, causing out > > of order arrival. > > > > The only such error path is when virtio_net_hdr_from_skb fails due > > to encountering an unknown GSO type. > > > > Signed-off-by: Willem de Bruijn > > > Fixes: bfd5f4a3d605 ("packet: Add GSO/csum offload support.") > > I forgot to add the Fixes tag, sorry. This goes back to the > introduction of GSO support for virtio_net. The problem of blinding receivers to certain packet types goes back to that commit. But the specific issue of ring out of order arrival is added later, when vnet_hdr support is extended to tpacket_rcv: Fixes: 58d19b19cd99 ("packet: vnet_hdr support for tpacket_rcv")