[NET]: Store skb->timestamp as offset to a base timestamp

Reduces skb size by 8 bytes on 64-bit.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Patrick McHardy
2005-08-14 17:24:31 -07:00
committed by David S. Miller
parent 25ed891019
commit a61bbcf28a
39 changed files with 172 additions and 88 deletions

View File

@@ -491,11 +491,11 @@ __build_packet_message(struct nfulnl_instance *inst,
NFA_PUT(inst->skb, NFULA_HWADDR, sizeof(phw), &phw);
}
if (skb->stamp.tv_sec) {
if (skb->tstamp.off_sec) {
struct nfulnl_msg_packet_timestamp ts;
ts.sec = cpu_to_be64(skb->stamp.tv_sec);
ts.usec = cpu_to_be64(skb->stamp.tv_usec);
ts.sec = cpu_to_be64(skb_tv_base.tv_sec + skb->tstamp.off_sec);
ts.usec = cpu_to_be64(skb_tv_base.tv_usec + skb->tstamp.off_usec);
NFA_PUT(inst->skb, NFULA_TIMESTAMP, sizeof(ts), &ts);
}

View File

@@ -494,11 +494,11 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
NFA_PUT(skb, NFQA_HWADDR, sizeof(phw), &phw);
}
if (entry->skb->stamp.tv_sec) {
if (entry->skb->tstamp.off_sec) {
struct nfqnl_msg_packet_timestamp ts;
ts.sec = htonll(entry->skb->stamp.tv_sec);
ts.usec = htonll(entry->skb->stamp.tv_usec);
ts.sec = htonll(skb_tv_base.tv_sec + entry->skb->tstamp.off_sec);
ts.usec = htonll(skb_tv_base.tv_usec + entry->skb->tstamp.off_usec);
NFA_PUT(skb, NFQA_TIMESTAMP, sizeof(ts), &ts);
}