Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp780999pxj; Thu, 17 Jun 2021 13:48:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQEPnj8Jgyyn5N3RcnUvgwFpiB67lTrhQMsNWAcINExoPOmudZcYPHRz8m65vYKn+Wes3K X-Received: by 2002:a05:6402:1458:: with SMTP id d24mr239757edx.85.1623962898908; Thu, 17 Jun 2021 13:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623962898; cv=none; d=google.com; s=arc-20160816; b=oL8hT7fUCdbon4qLv/ROy910eGaxTmQV5EMb708cWLZ/zpNg6Xhr56aC3NISh7k0+n bXoXSqL5yZ0wf5VDRx0zsKM+HT0eME3A2feHU8dwAGb1SmO9SPW40YV1/hKwMS2iCGpj P21o/gjI+H9s4EDL+NUjYGL7zMh4pjDP7nptXitGUWNwiPzz6m8OMu1HKk+AmS/jkQ4/ ahPQipHCjgQ3MH66GPNSjm4M1PRPYnd0p2CPYYMxu3IKOYc4JvNoiwCjFHJSOMnqyBEE 0lScdjgg/Yz0WDnj756rQ05XwL3IV+ikDwM+cnj0IvnBGgbqFyGfQoZcmuP5jjaJAgSr ZKuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=BzMbr1VGLhl2EWCSEqSY1+QNCfXNTbceWdDzZ9hAMEI=; b=mb29UVFec/WSjSQclOLPk28rIsZ9cH6FM2jMiglk+TOcEuXamGCCP7CVA6+7xTSssF dCE0TU/RisiXRGbUDzCfCqoK6+aNtf269bT+LMdrcyTUEaigmrzhsEyBoiLhx3r3dFe4 HnnoNzQfORYMrPe3G3/L9Lc4Ap6sjiFLzFvmYfPzCWyjc3kr6+7aXjog4UiTLcYBE01a ZeSM9W8hs5lz6yCtvAmOBFZzM0pR2rcwZzvyWOZ3sR0t+RIhBoXQd74kngMj+RbGZTiz gJS2h4iQvDXy5WRzKuXtvmJB7quhSzu3d9o5eE9hTnSfXpRjSyp6uCbkKgszogfYcjfe NGBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=G+wRYn8i; 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 f3si90029ejl.557.2021.06.17.13.47.53; Thu, 17 Jun 2021 13:48:18 -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=fail header.i=@nbd.name header.s=20160729 header.b=G+wRYn8i; 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 S232173AbhFQTKp (ORCPT + 99 others); Thu, 17 Jun 2021 15:10:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbhFQTKp (ORCPT ); Thu, 17 Jun 2021 15:10:45 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45172C061574 for ; Thu, 17 Jun 2021 12:08:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BzMbr1VGLhl2EWCSEqSY1+QNCfXNTbceWdDzZ9hAMEI=; b=G+wRYn8igscVmTsNdzVTTTjvC4 ZOa20uLsxJB30mzuQ7UEnwbSpjsIQqHO7uatW7ly63gW/mk9qMvwaWdM/oa0ebGCI+02c7Vg6zy+v RTajdiMBrueQj6Qg1xGSn2M1Fn0INW/D8gio+QPP2UokWQhqh+5ShRFn1WF0IYL/jIUg=; Received: from p54ae9ff2.dip0.t-ipconnect.de ([84.174.159.242] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1ltxNR-0004Az-VW; Thu, 17 Jun 2021 21:08:34 +0200 Subject: Re: [PATCH 1/4] mac80211: check per vif offload_flags in Tx path To: Ryder Lee Cc: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org References: <4718d8041f908cb3249ec68c59a6854919f00752.1623955182.git.ryder.lee@mediatek.com> From: Felix Fietkau Message-ID: <18027bdb-19d7-f342-af35-ed304f730678@nbd.name> Date: Thu, 17 Jun 2021 21:08:33 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <4718d8041f908cb3249ec68c59a6854919f00752.1623955182.git.ryder.lee@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-06-17 20:53, Ryder Lee wrote: > offload_flags has been introduced to indicate encap status of each interface. > An interface can encap offload at runtime, or if it has some extra limitations > it can simply override the flags, so it's more flexible to check offload_flags > in Tx path. > > Signed-off-by: Ryder Lee > --- > net/mac80211/tx.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c > index 0a4bc9e08637..8cb1289c704a 100644 > --- a/net/mac80211/tx.c > +++ b/net/mac80211/tx.c > @@ -3695,7 +3698,8 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw, > } > > if (skb_has_frag_list(skb) && > - !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) { > + (!ieee80211_hw_check(&local->hw, TX_FRAG_LIST) || > + vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)) { > if (skb_linearize(skb)) { > ieee80211_free_txskb(&local->hw, skb); > goto begin; I think this chunk should be dropped. - Felix