Return-path: Received: from www.linutronix.de ([62.245.132.108]:34537 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752831AbaFTXP4 (ORCPT ); Fri, 20 Jun 2014 19:15:56 -0400 Date: Sat, 21 Jun 2014 01:15:47 +0200 (CEST) From: Thomas Gleixner To: Bing Zhao cc: linux-wireless@vger.kernel.org, "John W. Linville" , Johannes Berg , Amitkumar Karwar , Avinash Patil , Maithili Hinge , Chin-Ran Lo , Xinming Hu Subject: Re: [PATCH v3] mwifiex: Use the proper interfaces In-Reply-To: <1403239692-3352-1-git-send-email-bzhao@marvell.com> Message-ID: (sfid-20140621_011559_323296_DBA59A75) References: <1403239692-3352-1-git-send-email-bzhao@marvell.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-wireless-owner@vger.kernel.org List-ID: On Thu, 19 Jun 2014, Bing Zhao wrote: > @@ -143,8 +142,7 @@ mwifiex_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len) > len - sizeof(struct ieee80211_hdr_3addr)); > > skb->priority = LOW_PRIO_TID; > - do_gettimeofday(&tv); > - skb->tstamp = timeval_to_ktime(tv); > + __net_timestamp(skb); and __net_timestamp(skb) does skb->tstamp = ktime_get_real(); ... > mwifiex_wmm_compute_drv_pkt_delay(struct mwifiex_private *priv, > const struct sk_buff *skb) > { > + u32 queue_delay = ktime_to_ms(ktime_sub(ktime_get(), skb->tstamp)); So now you do: delay = now(CLOCK_MONOTONIC) - tstamp(CLOCK_REALTIME); Brilliant brainfart! My original patch merily converted open coded crap to a consistent one. And all of this was using the same time base: CLOCK_REALTIME. Johannes rightfully started a discussion about CLOCK_REALTIME vs. CLOCk_MONOTONIC suitability for certain use cases and then you send a patch which subtracts different time bases and assign the responsibility for that to Johannes: > v3: don't use net_timedelta() (Johannes Berg) Did you ever test that patch? Clearly not. Simply because on every machine where now(CLOCK_MONOTONIC) != now(CLOCK_REALTIME) this falls apart in bits and pieces. And that's the sane case, not the stupid eval board without a RTC driver which defaults to 1970:00:00:00:00 and happens to have CLOCK_MONOTONIC and CLOCK_REALTIME in sync. So aside of not testing it proper, you clearly have no clue what you are doing and then you have the chuzpe to claim that Johannes asked you to do so. Nice try. Thanks, tglx