Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1727901pxj; Wed, 19 May 2021 12:27:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzReouaYt3x7GopLHWaf9ODI24V5M9BXAQ8auZH9MpL3PvyzEXr7zsVD4dc4w3lwq8BltUO X-Received: by 2002:a17:906:c14c:: with SMTP id dp12mr765696ejc.312.1621452459680; Wed, 19 May 2021 12:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621452459; cv=none; d=google.com; s=arc-20160816; b=C5gaI7e92TYV1X1yIChu8wgH7Q6eROXnNZTRB7gZmk1Nmcdz5zWvNuNBT8ovY48vlN kNKMDDMsPPWitA2FJMHwl3+PRIv2erDrPbzWESkAKa2OOv1Ea+GpzdOVLlkKplztsLJW gPy5NAhff0WRTj8UlPv2Q2opP1KhUmnYBSCjmrzSS8hJpLFeGv/Nj2cCuIZzcoLSqVCa wcUKLw0egKNttCdOxKIdItdGAXegMOwBHzlMxu6w1lV5fFng7GKRFI3J7Yafe5xLzfr0 xWQitzAepoOpSN24Do7+sZZ7tfgSap5QFItWv3kF3Uhvzai7404D/zYSPUlRlrNtCBFR McyA== 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:references:in-reply-to:date:cc:to:from:subject :message-id; bh=V4noiihsz3krLs23Jp+3n5SPWPx0y8laCsPJO2L7kpM=; b=Qhbmg/DqlLKBfOzZ75Hl1ipSEn7mDFH2vbnoi7vLGWWmWFUEtNPHmNmHhrtyCKwXKA a360RI8BkqgU4baoiENPtEI5RMNKxobTSzH2kFbU0M5vnmEo+nGISbv9IhNGMc5v3dSC IERy+pvtVSz0wLA0u4MpwQBCsiZsAUDpHF8ga+t450jTvAUEL5G8g/kd0xqkCOyd4tyZ IPPV2aqyHYSYAQTiqYfxn64Gh9F0Fr4sv8Hfb0t9ws4gA15LdfzMxV6G6Y50F5uyEJb3 45W1/39AyUGiI91nu5Ri4UkWpVjIjhK0kcNUp14JRCZerrlb0mMsyyaaICajq0ZD+z2a JmVg== ARC-Authentication-Results: i=1; mx.google.com; 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 jz15si456566ejc.316.2021.05.19.12.27.14; Wed, 19 May 2021 12:27:39 -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; 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 S238379AbhESKte (ORCPT + 99 others); Wed, 19 May 2021 06:49:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237658AbhESKte (ORCPT ); Wed, 19 May 2021 06:49:34 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB6C8C06175F for ; Wed, 19 May 2021 03:48:14 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1ljJkG-00BEFF-9r; Wed, 19 May 2021 12:48:08 +0200 Message-ID: <7e00e8dbf43f5bf19ddcaf037653e8a41c9d4fc3.camel@sipsolutions.net> Subject: Re: [PATCH 1/2] mac80211: do not use low data rates for data frames with no ack flag From: Johannes Berg To: Philipp Borgers Cc: Felix Fietkau , linux-wireless@vger.kernel.org Date: Wed, 19 May 2021 12:48:07 +0200 In-Reply-To: References: <20210518110755.43077-1-borgers@mi.fu-berlin.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 2021-05-19 at 12:47 +0200, Philipp Borgers wrote: > On Tue, May 18, 2021 at 01:19:46PM +0200, Johannes Berg wrote: > > On Tue, 2021-05-18 at 13:17 +0200, Felix Fietkau wrote: > > > > > > Frames with IEEE80211_TX_CTL_HW_80211_ENCAP set have no 802.11 header, > > > so please change the check something like this: > > > > > > if ((info->flags & IEEE80211_TX_CTL_NO_ACK) && > > > ((info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) || > > > ieee80211_is_data(hdr->frame_control))) > > > > Maybe we should consider some kind of inline helper? > > > > static inline bool ieee80211_is_tx_data(struct sk_buff *skb) > > { > > ... *info = ... > > ... *hdr = (void *)skb->data; > > > > return (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) || > >                ieee80211_is_data(hdr->frame_control); > > } > > A frame with IEEE80211_TX_CTL_HW_80211_ENCAP set is always a data frame? Yes, other frames can't be HW-encap'ed, nor would it make sense to offload that. > Should I put the definition of the function into include/net/mac80211.h? > Seems reasonable, yeah. johannes