Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp852004ybi; Fri, 14 Jun 2019 04:32:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzayp9gkeTBx8kfth1ou8+sGUxGgPXFM2T+JBm2yS1Kb1iuDq/UXm+4RV5fA1e37M4TVUnh X-Received: by 2002:a17:90a:bf08:: with SMTP id c8mr10661189pjs.75.1560511919963; Fri, 14 Jun 2019 04:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560511919; cv=none; d=google.com; s=arc-20160816; b=rr+nkBUc+cK0DLLqmJtGDqtmeSV3YjbJBAgKi8zvsLByY2F+5uv+uk0ZfxY6Mc3cAr 1cz2e2j2GP19LRVH1qgQFUQwfDnACGUKrvIdBlNur0l6lMbCcPJ0tkUA21VbBxdavU3m nQoozG16Q4lmClff9NVYtH+PS8AsF3ovZ1/EOxtqJOLKWqA78/8sk6800x2TzPCzMXE1 +QxdH3sF/62hg8ymHZR13ycoTsxZE9qjbuNwWKN6fj34qu3QyXlJG0ApYu+o6aT2Cdya PeGxUmax4M+HaY9+YoXOF3Zt6UY5fje0Kfu5oolxeNV9HxAs2eN2lvCRqOT7rq6O5CCd omLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fzcEkENuJO3YpCY/voJITOImopZx6VO9edLVCNFPQIQ=; b=FO+6BxBZLmeHoMh6lquqyXCL5guxQt8+qlYD0RQR0+jNgclUpfFVyePEYDkbQ0FaZ8 8yz+AokgoQSeI3ngMQbRRtXwm3UMntSOq87YBBfwtBojSqa7iYosbD/fOe3MXsOEOB4A PCcRXcn6R3J0vBOksZxMSmwcfHej8OepMaacMLVr4XYVss66yVUUhHel0dUquATsYYmN CN6rAx3QztK+et2XY79UKiDYDwAXQbk5YYfrqSuRH2KTBgBDW28OAUdnrOqZ2cvU3pMQ t6SAvBOFGjQ3QoHww115F44oLnypjmzgtuWckv5U4H555KfvvVkVNzH5hTMWN7zjjlZp SXWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si1948545pll.64.2019.06.14.04.31.37; Fri, 14 Jun 2019 04:31:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727307AbfFNLb3 (ORCPT + 99 others); Fri, 14 Jun 2019 07:31:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37852 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727231AbfFNLb3 (ORCPT ); Fri, 14 Jun 2019 07:31:29 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD4B530B97AA; Fri, 14 Jun 2019 11:31:28 +0000 (UTC) Received: from localhost (ovpn-204-80.brq.redhat.com [10.40.204.80]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24C8054696; Fri, 14 Jun 2019 11:31:25 +0000 (UTC) Date: Fri, 14 Jun 2019 13:31:25 +0200 From: Stanislaw Gruszka To: Johannes Berg Cc: Lorenzo Bianconi , Lorenzo Bianconi , kvalo@codeaurora.org, linux-wireless@vger.kernel.org, nbd@nbd.name Subject: Re: [PATCH v3 wireless-drivers 1/3] mt76: usb: fix rx A-MSDU support Message-ID: <20190614113120.GC17298@redhat.com> References: <66fc02e45fb5ce0d6176395b5ac43acbd53b3e66.1560461404.git.lorenzo@kernel.org> <20190614072449.GA3395@redhat.com> <20190614101115.GA2669@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Fri, 14 Jun 2019 11:31:28 +0000 (UTC) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Fri, Jun 14, 2019 at 12:20:59PM +0200, Johannes Berg wrote: > On Fri, 2019-06-14 at 12:11 +0200, Lorenzo Bianconi wrote: > > > Looking at __ieee80211_amsdu_copy() now I got why other drivers copy hdrlen + > > 8, thx :) > > In our case reuse_frag is true in __ieee80211_amsdu_copy, so we will end up > > copying 32B + ether_len. Anyway I think 32 is a little bit too low and we could get > > better performances increasing it a little bit. > > A typical use case (e.g IPv6 + TCP): > > > > IPv6 = 40B, TCP = 32B --> so 72B..I guess 128B is a good value :) > > @Felix, Johannes: what do you think? > > I think while we might *allocate* more, I don't think we should *copy* > more, since then the TCP payload will no longer be in pages. > > It'd probably be better to implement leaving enough tailroom (allocate > 128), but copying nothing, unless the *entire* packet fits. iwl4965 put entire packet in fragment in il4965_pass_packet_to_mac80211() . Initially I thought this is a bug, since mac80211 require header be in the linear area, but looks like ieee80211_rx_monitor() copy header before rest of mac80211 check it, so 4965 is fine. Anyway I think the driver should put ieee80211 header in linear area and iwlwifi & mt7601u implementation is somewhat optimal. Stanislaw