Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2263452ybx; Fri, 8 Nov 2019 02:03:03 -0800 (PST) X-Google-Smtp-Source: APXvYqyds5KEE7rM4wC/mpuMgMqWmZdLNWLRiFtFbc/sJWVX76PdicSHpbbgeQ6kqy+XeiN5xU88 X-Received: by 2002:a50:895c:: with SMTP id f28mr8764872edf.125.1573207383833; Fri, 08 Nov 2019 02:03:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573207383; cv=none; d=google.com; s=arc-20160816; b=ryAKddVfz7ICxLU40oUZ93ITxQLr6yxyCKcmOSMKivGhlJPwNT9eYMbYuLQlxqxqbF bOJp2umrj2zRlzFzbUGz9mjwTkJkttBASBw9PAQGtnWn23zsVUSFyA5kEtj3xPJ/dEib RJk1RMRXQgolnp3ce1fLKso9KOl6TdKh7fLXk4IzJyjFPNHBZdDROZFl5OG8dfsdGdao AZmo4bxxg6hOMUp1qTcRIkiwJzdfcKk1Phd7pN5XFXUXTDUWyAKLb0CItBxWpsxyn2B5 U0ybeI/YIRJzTPrF3Ey2I+P72eggQNFwFYR7lej26e/DiNPFbLcIovQNsGgjTQBmCaG9 wTwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=ncvWoIZnZqCSEFVa/F5axoZONiYxJs+zxdzw1PTd9V0=; b=JieqhmbsWwQ/p+eH8wOLOZ6nYGiUNB70aiRyRwnBDrseMpxyLHYDE37thAwjAkbcvV LCT1L3HKDFVvbsaBPeabVp2DSTkWoUL4ss19CjSzAirZUPNsb74UI/iYN421d1nXuTH7 4pW4p0rE4x8F7kxD2UwtEPuQ+ugZNHFuQRK4ulgWi3+UknvE2wPpsbD9zFYuCrFRLNw9 2XAFr7/C4PGxFbGYcqiAcHXodILmDh7rVKU11ibbj8jny3SdTQD3srAn3ZUy2en322+B dX/Hv23rqPzGbWRmQAI65QtDH0mZKJJV1qBcDOj2ikOjK5n5JlEEI8+4mMCJTuyUwR1g fZ7A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gw9si3488872ejb.284.2019.11.08.02.02.36; Fri, 08 Nov 2019 02:03:03 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731233AbfKHKAi (ORCPT + 99 others); Fri, 8 Nov 2019 05:00:38 -0500 Received: from s3.sipsolutions.net ([144.76.43.62]:53452 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730614AbfKHKAi (ORCPT ); Fri, 8 Nov 2019 05:00:38 -0500 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.3) (envelope-from ) id 1iT14G-0007Lv-CG; Fri, 08 Nov 2019 11:00:36 +0100 Message-ID: <03dc8fd244558b6c08875be0b497a6d3bdf595c8.camel@sipsolutions.net> Subject: Re: [PATCHv8 2/6] nl80211: Add new netlink attribute for TID speicific retry count From: Johannes Berg To: Tamizh chelvam Cc: linux-wireless@vger.kernel.org Date: Fri, 08 Nov 2019 11:00:35 +0100 In-Reply-To: <1572957714-16085-3-git-send-email-tamizhr@codeaurora.org> References: <1572957714-16085-1-git-send-email-tamizhr@codeaurora.org> <1572957714-16085-3-git-send-email-tamizhr@codeaurora.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > + * Station specific retry configuration is valid only for STA's > + * current connection. i.e. the configuration will be reset to default when > + * the station connects back after disconnection/roaming. > + * when user-space does not include %NL80211_ATTR_MAC, this configuration > + * should be treated as per-netdev configuration. This configuration will > + * be cleared when the interface goes down and on the disconnection from a > + * BSS. When retry count has never been configured using this command, the > + * other available radio level retry configuration > + * (%NL80211_ATTR_WIPHY_RETRY_SHORT and %NL80211_ATTR_WIPHY_RETRY_LONG) > + * should be used. Driver supporting this feature should advertise > + * NL80211_EXT_FEATURE_PER_TID_RETRY_CONFIG and supporting per station > + * retry count configuration should advertise > + * NL80211_EXT_FEATURE_PER_STA_RETRY_CONFIG. Here you pretty much copy-pasted all this text ... that's why I think it should be in some other section. We want *everything* to be like that, not have to check every single thing for different validity rules. > + * @NL80211_TID_CONFIG_ATTR_RETRY_SHORT: Number of retries used with data frame > + * transmission, user-space sets this configuration in > + * &NL80211_CMD_SET_TID_CONFIG. It is u8 type, min value is 1 and > + * the max value should be advertised by the driver through > + * max_data_retry_count. when this attribute is not present, the driver > + * would use the default configuration. > + * @NL80211_TID_CONFIG_ATTR_RETRY_LONG: Number of retries used with data frame > + * transmission, user-space sets this configuration in > + * &NL80211_CMD_SET_TID_CONFIG. Its type is u8, min value is 1 and > + * the max value should be advertised by the driver through > + * max_data_retry_count. when this attribute is not present, the driver > + * would use the default configuration. I'm almost thinking that these should be a struct with two u8 values instead of two separate attributes, and then renamed to NL80211_TID_CONFIG_ATTR_RETRY, to carry both and really ensure thaty they're always together as a single configuration. This only really works right if we go for the reset= approach I outlined in the previous patch though, since you otherwise need NL80211_TID_CONFIG_ATTR_RETRY for the reset ... but that's a pretty weird thing. (there are also some typos here like "notfiy") > --- a/net/wireless/nl80211.c > +++ b/net/wireless/nl80211.c > @@ -326,6 +326,9 @@ static int validate_ie_attr(const struct nlattr *attr, > [NL80211_TID_CONFIG_ATTR_TID] = { .type = NLA_U8 }, > [NL80211_TID_CONFIG_ATTR_NOACK] = > NLA_POLICY_MAX(NLA_U8, NL80211_TID_CONFIG_DISABLE), > + [NL80211_TID_CONFIG_ATTR_RETRY] = { .type = NLA_FLAG }, > + [NL80211_TID_CONFIG_ATTR_RETRY_SHORT] = { .type = NLA_U8}, > + [NL80211_TID_CONFIG_ATTR_RETRY_LONG] = { .type = NLA_U8}, The min value of 1 should be reflected in the policy. > + if (rdev->wiphy.max_data_retry_count) { > + if (nla_put_u8(msg, NL80211_ATTR_MAX_RETRY_COUNT, > + rdev->wiphy.max_data_retry_count)) bad indentation > + goto nla_put_failure; > + } > + > state->split_start++; > if (state->split) > break; Also not sure which section you put this in, but it looks almost like it's under "case 1:" where it really shouldn't be ... move it to the end please. johannes