linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pedersen, Thomas" <c_tpeder@qca.qualcomm.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>, <kvalo@qca.qualcomm.com>
Subject: Re: [PATCH] cfg80211: support TX error rate CQM
Date: Wed, 11 Jul 2012 20:05:03 -0700	[thread overview]
Message-ID: <20120712030502.GA7153@pista> (raw)
In-Reply-To: <1342037610.4464.9.camel@jlt3.sipsolutions.net>

On Wed, Jul 11, 2012 at 10:13:30PM +0200, Johannes Berg wrote:
> On Wed, 2012-07-11 at 12:20 -0700, Thomas Pedersen wrote:
> > Let the user configure serveral TX error conection quality monitoring
> > parameters: % error rate, survey interval, and # of attempted packets.
> > 
> > On exceeding the TX failure rate over the given interval, the driver
> > will send a CQM notify event with the actual TX failure rate and
> > packets attempted.
> 
> It seems useful to me to also send the interval, in case somebody else
> is listening to the events or in case the interval was changed, etc.?

The fw API does not support this, but I can track the interval in the
driver.

> > + * @NL80211_ATTR_CQM_TXE_RATE: TX error rate in %. Minimum % of TX failures
> > + *	during the given %NL80211_ATTR_CQM_TXE_INTVL before an
> > + *	%NL80211_CMD_NOTIFY_CQM with reported %NL80211_ATTR_CQM_TXE_RATE and
> > + *	%NL80211_ATTR_CQM_TXE_PKTS is generated.
> 
> Is percentage fine-grained enough? I guess it is?
> 
> > + * @NL80211_ATTR_CQM_TXE_PKTS: number of TX attempts in a given
> > + *	%NL80211_ATTR_CQM_TXE_INTVL before %NL80211_ATTR_CQM_TXE_RATE is
> > + *	checked.
> 
> I'm not sure I'd say "TX attempts", that gets confusing, do you count
> retries? I guess not. Maybe say "attempted packets" or something else
> that includes TX too?

"packets attempted" seems clear?

> > + * @NL80211_ATTR_CQM_TXE_INTVL: interval in seconds. Specifies the periodic
> > + *	interval in which %NL80211_ATTR_CQM_TXE_PKTS and
> > + *	%NL80211_ATTR_CQM_TXE_RATE must be satisfied before generating an
> > + *	%NL80211_CMD_NOTIFY_CQM.
> 
> Should there be some ... sanity checking? Like ... can't set it to more
> than, say, half an hour?

OK, I'll specify a max interval then.

> > +	} else if (attrs[NL80211_ATTR_CQM_TXE_RATE] &&
> > +		   attrs[NL80211_ATTR_CQM_TXE_PKTS] &&
> > +		   attrs[NL80211_ATTR_CQM_TXE_INTVL]) {
> > +		u32 rate, pkts, intvl;
> > +		rate = nla_get_u32(attrs[NL80211_ATTR_CQM_TXE_RATE]);
> > +		pkts = nla_get_u32(attrs[NL80211_ATTR_CQM_TXE_PKTS]);
> > +		intvl = nla_get_u32(attrs[NL80211_ATTR_CQM_TXE_INTVL]);
> > +		err = nl80211_set_cqm_txe(info, rate, pkts, intvl);
> 
> You should probably check things here ... e.g. the percentage can't be
> >100? :-)

see nl80211_set_cqm_txe() :)

> Also it seems like there should be some way to *disable* it again that
> you should document?

Configure an interval of 0 should be sufficient? all 0s?

Thanks,
Thomas

      reply	other threads:[~2012-07-12  3:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 19:20 [PATCH] cfg80211: support TX error rate CQM Thomas Pedersen
2012-07-11 20:13 ` Johannes Berg
2012-07-12  3:05   ` Pedersen, Thomas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120712030502.GA7153@pista \
    --to=c_tpeder@qca.qualcomm.com \
    --cc=johannes@sipsolutions.net \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).