Thread (40 messages) 40 messages, 9 authors, 2014-02-28

Re: [PATCH v6 net-next 1/2] net: add skb_mstamp infrastructure

From: David Miller <davem@davemloft.net>
Date: 2014-02-26 20:02:49

From: Eric Dumazet <redacted>
Date: Mon, 24 Feb 2014 22:22:04 -0800
Instead of :

	u64 t0, t1;

	t0 = ktime_get();
	// stuff
	t1 = ktime_get();
	delta_us = ktime_us_delta(t1, t0);

use :
	struct skb_mstamp t0, t1;

	skb_mstamp_get(&t0);
	// stuff
	skb_mstamp_get(&t1);
	delta_us = skb_mstamp_us_delta(&t1, &t0);
 ...
+/**
+ * skb_mstamp_delta - compute the difference in usec between two skb_mstamp
+ * @t1: pointer to oldest sample
+ * @t0: pointer to newest sample
+ */
+static inline u32 skb_mstamp_us_delta(const struct skb_mstamp *t1,
+				      const struct skb_mstamp *t0)
Maybe your definition of "newest" is different from mine, to me it
means most recently sampled.  And if so, your t1 and t0 descriptions
seem reversed.

Please fix this and resubmit with Neal's ACK etc.

Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help