Message ID | 1487896109-23851-6-git-send-email-greearb@candelatech.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Johannes Berg |
Headers | show |
> + static unsigned int cnt = 0; > + /* This is fairly common, and usually not a > bug. So, print errors > + rarely. */ > + if (((cnt++ & 0x3FF) == 0x3FF) && net_ratelimit()) > + printk(KERN_DEBUG " hwsim rx-nl: radio %pM > idle: %d or not started: %d cnt: %d\n", > + dst, data2->idle, !data2->started, > cnt); > goto out; > } You just added that in the previous patch... Please take a bit more care, or I'll eventually stop looking at your patches since things like that seem to happen over and over again. I don't get a feeling that you actually care about getting things upstream much anyway. johannes
On 02/23/2017 10:42 PM, Johannes Berg wrote: > >> + static unsigned int cnt = 0; >> + /* This is fairly common, and usually not a >> bug. So, print errors >> + rarely. */ >> + if (((cnt++ & 0x3FF) == 0x3FF) && net_ratelimit()) >> + printk(KERN_DEBUG " hwsim rx-nl: radio %pM >> idle: %d or not started: %d cnt: %d\n", >> + dst, data2->idle, !data2->started, >> cnt); >> goto out; >> } > > You just added that in the previous patch... > > Please take a bit more care, or I'll eventually stop looking at your > patches since things like that seem to happen over and over again. I > don't get a feeling that you actually care about getting things > upstream much anyway. I wrote these patches over a long period of time. Some, like the binary API things I already knew you did not want, but I posted them since it seems several people are looking at this sort of thing and maybe they will have a good idea how to add similar behaviour in an efficient manner. I think your previous suggestion was that I should map each flag in some translate code and/or bloat up netlink API, and neither of those options seemed like an efficient use of CPU time. I'll work to fix the cosmetic problems and squash these logging patches and re-submit those. Thanks, Ben
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index aaba126..48ddf5d 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -1643,7 +1643,7 @@ static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed) if (conf->chandef.chan) wiphy_debug(hw->wiphy, - "%s (freq=%d(%d - %d)/%s idle=%d ps=%d smps=%s)\n", + "%s (chandef-chan freq=%d(%d - %d)/%s idle=%d ps=%d smps=%s)\n", __func__, conf->chandef.chan->center_freq, conf->chandef.center_freq1, @@ -1654,7 +1654,7 @@ static int mac80211_hwsim_config(struct ieee80211_hw *hw, u32 changed) smps_modes[conf->smps_mode]); else wiphy_debug(hw->wiphy, - "%s (freq=0 idle=%d ps=%d smps=%s)\n", + "%s (no-chandef-chan freq=0 idle=%d ps=%d smps=%s)\n", __func__, !!(conf->flags & IEEE80211_CONF_IDLE), !!(conf->flags & IEEE80211_CONF_PS), @@ -3061,9 +3061,12 @@ static int hwsim_cloned_frame_received_nl(struct sk_buff *skb_2, /* check if radio is configured properly */ if (data2->idle || !data2->started) { - if (net_ratelimit()) - printk(KERN_DEBUG " hwsim rx-nl: radio %pM idle: %d or not started: %d\n", - dst, data2->idle, !data2->started); + static unsigned int cnt = 0; + /* This is fairly common, and usually not a bug. So, print errors + rarely. */ + if (((cnt++ & 0x3FF) == 0x3FF) && net_ratelimit()) + printk(KERN_DEBUG " hwsim rx-nl: radio %pM idle: %d or not started: %d cnt: %d\n", + dst, data2->idle, !data2->started, cnt); goto out; }