Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp401994rwi; Mon, 10 Oct 2022 01:57:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4UyUXalBHUhm16AldAyEtrx0TIN/uNoDqRSyni/bo1YakFXjUgIisY1fy8I5Mwo5SOA43G X-Received: by 2002:a63:698a:0:b0:41c:8dfb:29cb with SMTP id e132-20020a63698a000000b0041c8dfb29cbmr15670591pgc.170.1665392268295; Mon, 10 Oct 2022 01:57:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665392268; cv=none; d=google.com; s=arc-20160816; b=RQu3fmV0dpFJqfyEPIiL1KvL9FvB43exzJNgMG8VYzwfYTQDTF09EuYM+gKwJ5oqIj GdTaJpcTb7Ci4ifq7FrXrvaA89g5YRrjCPVM3W03WFnCD+6zW6eUnNH3d3nCxIuoHt+V E+aiJzHB0g7qQ01egsn7eAcsRWrwOHc5KsBJpA2IG/jrQBLPhfLMoSPFkXWI9Y66cxpA r/GTYdGj5fOuDU/GL1bNYR8TIdOmxBjBxGqCa5FCpIJKp14x2KUPTljgtOX/YnlFXef3 r3MurLMQ0B30PWR2yYnqnO4aTaLF8T0kaDeqRQqa20OSAITl0C/4reN/j8Jtl9v+RPCU k9hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:dkim-signature; bh=dy469BlGQA1tYXFTLw6nEZ/Ym3SPe9yZQqI9TUb2boc=; b=DMiVI5bD0eEBgfOkM0f4uxNAuq1VSbT2y9mS919TKSBfFBCWTlrKIML5hIneW/a30c UR3gNxBo32EzuK/pdzJclX/QTOmcn67rnKPl+Vwt9bcutFwFCdAP834svCigtIutu1HN q/BSnRax/rN6yJkl1v75eLYf3EbN0zoA0P2JQKD8cvP2YUtzeMtv2OhcAOHSIEEjTDQf QUcQluSMktlx6NBUdc3cN1u6uAsQbwwBLTIgMBBa1raelcR8QfiXa20z7rMbSjt4QmXL wbZD1Sv/4e2uQ/tq8mTRSUkQQ+yL+3UEzHTVjOUAKiyoYTOtd9SlPZTwGyo60BHC0mwe tDMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=PDCP8oTU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ot16-20020a17090b3b5000b001fdd4a9fd3fsi1040004pjb.146.2022.10.10.01.57.35; Mon, 10 Oct 2022 01:57:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=PDCP8oTU; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231147AbiJJIiu (ORCPT + 61 others); Mon, 10 Oct 2022 04:38:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231475AbiJJIij (ORCPT ); Mon, 10 Oct 2022 04:38:39 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 267FA6581B for ; Mon, 10 Oct 2022 01:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=dy469BlGQA1tYXFTLw6nEZ/Ym3SPe9yZQqI9TUb2boc=; t=1665391118; x=1666600718; b=PDCP8oTUWCfU+pLya6aC+um/0A+4Hbh4JqMDz9e0xm8rDw/ rQypdyznKp92v1DZfO4pC1bKnVfJF6UI76W7ezZwElfLqHZN/A7Wi+WUjZDb5FuYyRYFasFWOHXsh rlB5rGzVNG42VYKjc8q4v2c5rY2GO48VFmNljeXoaxvHnouhaPo/uZwxPW7vRlqJd29uShtMxc6Qy Z4nFg2t+SpIA8KLxPIoRtcWL9OjJm5VDWc2/NJBAfBqpc4uEKrSOnfbZWdpbqnH+MQgMpzvDH0tan 81BpPjn/Vx2NuRoP7pyBlyOF/wHPr09CuAMtwMvqNFtoq7+ZK7Peb3wagiqZz1Sg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1ohoJ2-002xTk-0E; Mon, 10 Oct 2022 10:38:36 +0200 Message-ID: Subject: Re: [PATCH] mac80211: add support for restricting netdev features per vif From: Johannes Berg To: Felix Fietkau , linux-wireless@vger.kernel.org Date: Mon, 10 Oct 2022 10:38:35 +0200 In-Reply-To: <20221009183334.35841-1-nbd@nbd.name> References: <20221009183334.35841-1-nbd@nbd.name> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sun, 2022-10-09 at 20:33 +0200, Felix Fietkau wrote: >=20 > +static void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, > + struct sta_info *sta, > + struct ieee80211_fast_tx *fast_tx, > + struct sk_buff *skb, u8 tid, bool ampdu) > +{ > + struct ieee80211_local *local =3D sdata->local; > + struct ieee80211_hdr *hdr =3D (void *)fast_tx->hdr; > + struct ieee80211_tx_info *info; > + struct ieee80211_tx_data tx; > + ieee80211_tx_result r; > + int hw_headroom =3D sdata->local->hw.extra_tx_headroom; > + int extra_head =3D fast_tx->hdr_len - (ETH_HLEN - 2); > + struct ethhdr eth; > + > /* after this point (skb is modified) we cannot return false */ That's now void so the comment is a bit misleading ... move it somewhere else? > +static bool ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata, > + struct sta_info *sta, > + struct ieee80211_fast_tx *fast_tx, > + struct sk_buff *skb) > +{ > + u16 ethertype =3D (skb->data[12] << 8) | skb->data[13]; > + struct ieee80211_hdr *hdr =3D (void *)fast_tx->hdr; > + struct tid_ampdu_tx *tid_tx =3D NULL; > + struct sk_buff *next; > + u8 tid =3D IEEE80211_NUM_TIDS; > + > + /* control port protocol needs a lot of special handling */ > + if (cpu_to_be16(ethertype) =3D=3D sdata->control_port_protocol) > + return false; > + > + /* only RFC 1042 SNAP */ > + if (ethertype < ETH_P_802_3_MIN) > + return false; > + > + /* don't handle TX status request here either */ > + if (skb->sk && skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS) > + return false; > + > + if (hdr->frame_control & cpu_to_le16(IEEE80211_STYPE_QOS_DATA)) { > + tid =3D skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; > + tid_tx =3D rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); > + if (tid_tx) { > + if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) > + return false; > + if (tid_tx->timeout) > + tid_tx->last_tx =3D jiffies; > + } > + } >=20 Here, I guess, or so? Another advantage _might_ be that you can create A-MSDUs now with frames that don't just belong to a single stream, unlike driver-created A-MSDUs from GSO? But then again I'm not really sure anymore how the A-MSDU creation works in the first place. johannes