]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - include/linux/skbuff.h
tcp: switch TCP TS option (RFC 7323) to 1ms clock
[mirror_ubuntu-artful-kernel.git] / include / linux / skbuff.h
index a098d95b3d84d0246adc88651af9978d6810fb01..7c0cb2ce8b01a9be366d8cdb7e3661f65ebff3c9 100644 (file)
@@ -506,66 +506,6 @@ typedef unsigned int sk_buff_data_t;
 typedef unsigned char *sk_buff_data_t;
 #endif
 
-/**
- * struct skb_mstamp - multi resolution time stamps
- * @stamp_us: timestamp in us resolution
- * @stamp_jiffies: timestamp in jiffies
- */
-struct skb_mstamp {
-       union {
-               u64             v64;
-               struct {
-                       u32     stamp_us;
-                       u32     stamp_jiffies;
-               };
-       };
-};
-
-/**
- * skb_mstamp_get - get current timestamp
- * @cl: place to store timestamps
- */
-static inline void skb_mstamp_get(struct skb_mstamp *cl)
-{
-       u64 val = local_clock();
-
-       do_div(val, NSEC_PER_USEC);
-       cl->stamp_us = (u32)val;
-       cl->stamp_jiffies = (u32)jiffies;
-}
-
-/**
- * skb_mstamp_delta - compute the difference in usec between two skb_mstamp
- * @t1: pointer to newest sample
- * @t0: pointer to oldest sample
- */
-static inline u32 skb_mstamp_us_delta(const struct skb_mstamp *t1,
-                                     const struct skb_mstamp *t0)
-{
-       s32 delta_us = t1->stamp_us - t0->stamp_us;
-       u32 delta_jiffies = t1->stamp_jiffies - t0->stamp_jiffies;
-
-       /* If delta_us is negative, this might be because interval is too big,
-        * or local_clock() drift is too big : fallback using jiffies.
-        */
-       if (delta_us <= 0 ||
-           delta_jiffies >= (INT_MAX / (USEC_PER_SEC / HZ)))
-
-               delta_us = jiffies_to_usecs(delta_jiffies);
-
-       return delta_us;
-}
-
-static inline bool skb_mstamp_after(const struct skb_mstamp *t1,
-                                   const struct skb_mstamp *t0)
-{
-       s32 diff = t1->stamp_jiffies - t0->stamp_jiffies;
-
-       if (!diff)
-               diff = t1->stamp_us - t0->stamp_us;
-       return diff > 0;
-}
-
 /** 
  *     struct sk_buff - socket buffer
  *     @next: Next buffer in list
@@ -646,7 +586,7 @@ struct sk_buff {
 
                        union {
                                ktime_t         tstamp;
-                               struct skb_mstamp skb_mstamp;
+                               u64             skb_mstamp;
                        };
                };
                struct rb_node  rbnode; /* used in netem & tcp stack */
@@ -3056,6 +2996,13 @@ static inline void skb_frag_list_init(struct sk_buff *skb)
 
 int __skb_wait_for_more_packets(struct sock *sk, int *err, long *timeo_p,
                                const struct sk_buff *skb);
+struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
+                                         struct sk_buff_head *queue,
+                                         unsigned int flags,
+                                         void (*destructor)(struct sock *sk,
+                                                          struct sk_buff *skb),
+                                         int *peeked, int *off, int *err,
+                                         struct sk_buff **last);
 struct sk_buff *__skb_try_recv_datagram(struct sock *sk, unsigned flags,
                                        void (*destructor)(struct sock *sk,
                                                           struct sk_buff *skb),