Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp136498pxj; Thu, 3 Jun 2021 02:54:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzX46+CffeMQQ0e+AwCBP/fUmPqappPt0L4YV0ltmfhsAd0tzIdB2N6DzkZsH8lv9/pxlMY X-Received: by 2002:aa7:c349:: with SMTP id j9mr35062800edr.48.1622714072670; Thu, 03 Jun 2021 02:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622714072; cv=none; d=google.com; s=arc-20160816; b=b5pC+U3Jvv2ZaM6jvM4o/hHAHiqXjHAcAy8pcVZPkGRoAmndcPbmGh5Xuy6otLkBDu wRscDhUyCyKx7nP94gWpe6JGYlvsKJjgIHxbyeHHqeHVO10NYoryiI/CTPiKjDdiyMn1 1bBGXQZ5iqDM/6qEEfZHVUz32A2HGJCLI6/xr/+c8hnV9SoB3TMW7KLwJebu+ltLhAQI 1X+TpO9khywBXCDAQ3HYiKtuHgL1xaXYisjI+THr/eLE2D5pF2t6y698Rd7PJZ2ebszh XDd/9dk0mK2qNWaTMlQfviFufYHC4WWQPz7WD/3+EXkphNGOpaYI35PphEfQfX+bZuXn Bjww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dmarc-filter:sender:dkim-signature; bh=bxgawjv87QE59ZmPqEifJGZL7D4lbNfMfA4fiLSYN44=; b=qG4p27Ld91npYaL4cVtlz4KeML0xQE5A1BOZ0MHAtGBRzf+7Bvd3DP2ge/HsVDYYMw 8Ezk8y7+LEUcmbgmp6Nb2fbJmMqpz9CJgg9QVIhTrjXyhIEukOINJUsmMjcBWWyftRox LG6VFmi1TanHDX0gpRV+qe/dC8/vlAwujowlzibUi1SeN4ESq011NesjnkbxRdefg/UA AikuomwSLg97paRjtX7d95VcEttzVeTaeAf0nH+P2fqBfeLbs0tvj0QrEZlEIs2kTFAJ RpISoDKodfktnXAnO4WLuKwz4BkCiklDMNs7ycmyXyHCjoY+X/GVBv4ZrbeNsKZrQd4z UJ1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ak7L0pQR; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p20si1098935ejn.446.2021.06.03.02.54.09; Thu, 03 Jun 2021 02:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=ak7L0pQR; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbhFCJzp (ORCPT + 99 others); Thu, 3 Jun 2021 05:55:45 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:62990 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbhFCJzp (ORCPT ); Thu, 3 Jun 2021 05:55:45 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1622714041; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: In-Reply-To: Date: References: Subject: Cc: To: From: Sender; bh=bxgawjv87QE59ZmPqEifJGZL7D4lbNfMfA4fiLSYN44=; b=ak7L0pQRv9VxeJn4cpWZVXYfypJdvmGZSgSv9mfjkyALVuy4/eMx70ZF516P2NzL+7ZHxRu7 M33X51zoAE8aEVEWCkuqMPrwSeUvVk5h1Wfqs+QS0aHKL/5YiLH8SxfdOP0zY0geB0DSLVFB 2gnS+AFxwGF6+Mf1IjFugyvJm38= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 60b8a6b0f726fa4188bded5a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 03 Jun 2021 09:53:52 GMT Sender: kvalo=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 39F67C433F1; Thu, 3 Jun 2021 09:53:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL autolearn=no autolearn_force=no version=3.4.0 Received: from tykki (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 464BFC433D3; Thu, 3 Jun 2021 09:53:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 464BFC433D3 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: =?utf-8?B?w43DsWlnbw==?= Huguet Cc: Jes.Sorensen@gmail.com, davem@davemloft.net, kuba@kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH] rtl8xxxu: avoid parsing short RX packet References: <20210511071926.8951-1-ihuguet@redhat.com> Date: Thu, 03 Jun 2021 12:53:48 +0300 In-Reply-To: (=?utf-8?B?IsONw7FpZ28=?= Huguet"'s message of "Tue, 1 Jun 2021 10:57:41 +0200") Message-ID: <874kef1dg3.fsf@codeaurora.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org =C3=8D=C3=B1igo Huguet writes: > On Tue, May 11, 2021 at 9:19 AM =C3=8D=C3=B1igo Huguet wrote: >> >> One USB data buffer can contain multiple received network >> packets. If that's the case, they're processed this way: >> 1. Original buffer is cloned >> 2. Original buffer is trimmed to contain only the first >> network packet >> 3. This first network packet is passed to network stack >> 4. Cloned buffer is trimmed to eliminate the first network >> packet >> 5. Repeat with the cloned buffer until there are no more >> network packets inside >> >> However, if the space remaining in original buffer after >> the first network packet is not enough to contain at least >> another network packet descriptor, it is not cloned. >> >> The loop parsing this packets ended if remaining space =3D=3D 0. >> But if the remaining space was > 0 but < packet descriptor >> size, another iteration of the loop was done, processing again >> the previous packet because cloning didn't happen. Moreover, >> the ownership of this packet had been passed to network >> stack in the previous iteration. >> >> This patch ensures that no extra iteration is done if the >> remaining size is not enough for one packet, and also avoid >> the first iteration for the same reason. >> >> Probably this doesn't happen in practice, but can happen >> theoretically. >> >> Signed-off-by: =C3=8D=C3=B1igo Huguet > > About 3 weeks ago I sent this patch, but received no response. Any > feedback would be appreciated. Maintainers are sometimes so busy that review takes extra long, but you can always check the state in patchwork: https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc= hes#checking_state_of_patches_from_patchwork --=20 https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatc= hes