All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Timo Lindhorst <tlnd@online.de>,
	linux-wireless@vger.kernel.org, Jouni Malinen <j@w1.fi>,
	Javier Cardona <javier@cozybit.com>
Subject: Re: [PATCH] mac80211_hwsim: Report rate info in tx status
Date: Thu, 03 May 2012 21:33:49 +0200	[thread overview]
Message-ID: <1336073629.5167.13.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20120430183454.GE2560@tuxdriver.com>

On Mon, 2012-04-30 at 14:34 -0400, John W. Linville wrote:
> On Wed, Mar 28, 2012 at 03:47:21PM +0200, Timo Lindhorst wrote:
> > > > > +     if (!ack)
> > > > > +             for (i = 0; i < IEEE80211_TX_MAX_RATES; i++)
> > > > > +                     tx_count[i] = txi->control.rates[i].count;
> > > > > +
> > > > > 
> > > > >       ieee80211_tx_info_clear_status(txi);
> > > > >       if (!(txi->flags & IEEE80211_TX_CTL_NO_ACK) && ack)
> > > > >       
> > > > >               txi->flags |= IEEE80211_TX_STAT_ACK;
> > > > > 
> > > > > +
> > > > > +     if (ack) {
> > > > > +             txi->status.rates[0].count = 1;
> > > > > +             txi->status.rates[1].idx = -1;
> > > > > +     } else {
> > > > > +             for (i = 0; i < IEEE80211_TX_MAX_RATES; i++)
> > > > > +                     txi->control.rates[i].count = tx_count[i];
> > > > > +     }
> > > > > +
> > > > > 
> > > > >       ieee80211_tx_status_irqsafe(hw, skb);
> > > > >  
> > > > >  }
> > > > 
> > > > I know: backing up the count values, clearing the status, and restoring
> > > > the values if necessary is kind of ugly. Would it be better to partly
> > > > clear the status manually instead of using
> > > > ieee80211_tx_info_clear_status() ?
> > > 
> > > Yeah just noticed the ieee80211_tx_info_clear_status() in there too...
> > > 
> > > OTOH, what are you using this for?
> > While working on some modifications to the rate control code, I thought it 
> > would be handy to use mac80211_hwsim for debugging and testing. Thereby I 
> > noticed that the tx status does not report any tx attempts, thus the rate 
> > control could not work at all.
> > 
> > > It seems almost like we should always
> > > just set
> > > 	txi->status.rates[0].count = 1;
> > 
> > At least,
> > 	txi->status.rates[1].idx = -1;
> > has to be set too, to indicate that only the first rate was used.
> > 
> > 
> > > since we never attempted multiple transmits? I'm not really sure though,
> > > it's a corner case ... 
> > We would only attempt multiple transmits if the receiver is not responding to 
> > unicast frames -- maybe because it has failed or switched the channel. 
> > Probably not a common use case, but that was what I was testing...
> > 
> > 
> > > I could also imagine this being populated by
> > > userspace (wmediumd) but I guess that isn't there now ...
> > Right, but if you are not using wmediumd but the bare mac80211_hwsim ideal 
> > channel, there would be no rate information and thus no rate adaption through 
> > the rate control algorithm.
> > 
> > Regards
> > Timo
> 
> Johannes, does this satisfy your concerns?

Yeah, it seems that this is all needs to be extended to actually be
useful, but we can leave that for later.

I'm a little confused about this discussion & Javier's patch though --
are they related?

johannes


  reply	other threads:[~2012-05-03 19:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28  9:17 [PATCH] mac80211_hwsim: Report rate info in tx status Timo Lindhorst
2012-03-28  9:28 ` Johannes Berg
2012-03-28  9:28 ` Timo Lindhorst
2012-03-28  9:32   ` Johannes Berg
2012-03-28 13:47     ` Timo Lindhorst
2012-04-30 18:34       ` John W. Linville
2012-05-03 19:33         ` Johannes Berg [this message]
2012-05-03 21:34           ` Javier Cardona
2012-05-07 23:17 ` Javier Cardona

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=1336073629.5167.13.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=j@w1.fi \
    --cc=javier@cozybit.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=tlnd@online.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.