diff options
author | Patrick McHardy <kaber@trash.net> | 2005-08-14 20:24:31 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:58:24 -0400 |
commit | a61bbcf28a8cb0ba56f8193d512f7222e711a294 (patch) | |
tree | 33ae1976ab3b08aac516debb2742d2c6696d5436 /drivers/atm | |
parent | 25ed891019b84498c83903ecf53df7ce35e9cff6 (diff) |
[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>
Diffstat (limited to 'drivers/atm')
-rw-r--r-- | drivers/atm/ambassador.c | 2 | ||||
-rw-r--r-- | drivers/atm/atmtcp.c | 2 | ||||
-rw-r--r-- | drivers/atm/eni.c | 2 | ||||
-rw-r--r-- | drivers/atm/firestream.c | 2 | ||||
-rw-r--r-- | drivers/atm/fore200e.c | 2 | ||||
-rw-r--r-- | drivers/atm/he.c | 2 | ||||
-rw-r--r-- | drivers/atm/horizon.c | 2 | ||||
-rw-r--r-- | drivers/atm/idt77252.c | 8 | ||||
-rw-r--r-- | drivers/atm/lanai.c | 2 | ||||
-rw-r--r-- | drivers/atm/nicstar.c | 10 | ||||
-rw-r--r-- | drivers/atm/zatm.c | 2 |
11 files changed, 18 insertions, 18 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 73c6b85299c1..d74a7c5e75dd 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -513,7 +513,7 @@ static void rx_complete (amb_dev * dev, rx_out * rx) { | |||
513 | 513 | ||
514 | // VC layer stats | 514 | // VC layer stats |
515 | atomic_inc(&atm_vcc->stats->rx); | 515 | atomic_inc(&atm_vcc->stats->rx); |
516 | do_gettimeofday(&skb->stamp); | 516 | __net_timestamp(skb); |
517 | // end of our responsability | 517 | // end of our responsability |
518 | atm_vcc->push (atm_vcc, skb); | 518 | atm_vcc->push (atm_vcc, skb); |
519 | return; | 519 | return; |
diff --git a/drivers/atm/atmtcp.c b/drivers/atm/atmtcp.c index f2f01cb82cb4..57f1810fdccd 100644 --- a/drivers/atm/atmtcp.c +++ b/drivers/atm/atmtcp.c | |||
@@ -325,7 +325,7 @@ static int atmtcp_c_send(struct atm_vcc *vcc,struct sk_buff *skb) | |||
325 | result = -ENOBUFS; | 325 | result = -ENOBUFS; |
326 | goto done; | 326 | goto done; |
327 | } | 327 | } |
328 | do_gettimeofday(&new_skb->stamp); | 328 | __net_timestamp(new_skb); |
329 | memcpy(skb_put(new_skb,skb->len),skb->data,skb->len); | 329 | memcpy(skb_put(new_skb,skb->len),skb->data,skb->len); |
330 | out_vcc->push(out_vcc,new_skb); | 330 | out_vcc->push(out_vcc,new_skb); |
331 | atomic_inc(&vcc->stats->tx); | 331 | atomic_inc(&vcc->stats->tx); |
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c index 10da36934769..c13c4d736ef5 100644 --- a/drivers/atm/eni.c +++ b/drivers/atm/eni.c | |||
@@ -537,7 +537,7 @@ static int rx_aal0(struct atm_vcc *vcc) | |||
537 | return 0; | 537 | return 0; |
538 | } | 538 | } |
539 | skb_put(skb,length); | 539 | skb_put(skb,length); |
540 | skb->stamp = eni_vcc->timestamp; | 540 | skb_set_timestamp(skb, &eni_vcc->timestamp); |
541 | DPRINTK("got len %ld\n",length); | 541 | DPRINTK("got len %ld\n",length); |
542 | if (do_rx_dma(vcc,skb,1,length >> 2,length >> 2)) return 1; | 542 | if (do_rx_dma(vcc,skb,1,length >> 2,length >> 2)) return 1; |
543 | eni_vcc->rxing++; | 543 | eni_vcc->rxing++; |
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index b078fa548ebf..58219744f5db 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -815,7 +815,7 @@ static void process_incoming (struct fs_dev *dev, struct queue *q) | |||
815 | skb_put (skb, qe->p1 & 0xffff); | 815 | skb_put (skb, qe->p1 & 0xffff); |
816 | ATM_SKB(skb)->vcc = atm_vcc; | 816 | ATM_SKB(skb)->vcc = atm_vcc; |
817 | atomic_inc(&atm_vcc->stats->rx); | 817 | atomic_inc(&atm_vcc->stats->rx); |
818 | do_gettimeofday(&skb->stamp); | 818 | __net_timestamp(skb); |
819 | fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p (pushed)\n", skb); | 819 | fs_dprintk (FS_DEBUG_ALLOC, "Free rec-skb: %p (pushed)\n", skb); |
820 | atm_vcc->push (atm_vcc, skb); | 820 | atm_vcc->push (atm_vcc, skb); |
821 | fs_dprintk (FS_DEBUG_ALLOC, "Free rec-d: %p\n", pe); | 821 | fs_dprintk (FS_DEBUG_ALLOC, "Free rec-d: %p\n", pe); |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 5f702199543a..2bf723a7b6e6 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -1176,7 +1176,7 @@ fore200e_push_rpd(struct fore200e* fore200e, struct atm_vcc* vcc, struct rpd* rp | |||
1176 | return -ENOMEM; | 1176 | return -ENOMEM; |
1177 | } | 1177 | } |
1178 | 1178 | ||
1179 | do_gettimeofday(&skb->stamp); | 1179 | __net_timestamp(skb); |
1180 | 1180 | ||
1181 | #ifdef FORE200E_52BYTE_AAL0_SDU | 1181 | #ifdef FORE200E_52BYTE_AAL0_SDU |
1182 | if (cell_header) { | 1182 | if (cell_header) { |
diff --git a/drivers/atm/he.c b/drivers/atm/he.c index 28250c9b32d6..fde9334059af 100644 --- a/drivers/atm/he.c +++ b/drivers/atm/he.c | |||
@@ -1886,7 +1886,7 @@ he_service_rbrq(struct he_dev *he_dev, int group) | |||
1886 | if (rx_skb_reserve > 0) | 1886 | if (rx_skb_reserve > 0) |
1887 | skb_reserve(skb, rx_skb_reserve); | 1887 | skb_reserve(skb, rx_skb_reserve); |
1888 | 1888 | ||
1889 | do_gettimeofday(&skb->stamp); | 1889 | __net_timestamp(skb); |
1890 | 1890 | ||
1891 | for (iov = he_vcc->iov_head; | 1891 | for (iov = he_vcc->iov_head; |
1892 | iov < he_vcc->iov_tail; ++iov) { | 1892 | iov < he_vcc->iov_tail; ++iov) { |
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 924a2c8988bd..0cded0468003 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -1034,7 +1034,7 @@ static void rx_schedule (hrz_dev * dev, int irq) { | |||
1034 | struct atm_vcc * vcc = ATM_SKB(skb)->vcc; | 1034 | struct atm_vcc * vcc = ATM_SKB(skb)->vcc; |
1035 | // VC layer stats | 1035 | // VC layer stats |
1036 | atomic_inc(&vcc->stats->rx); | 1036 | atomic_inc(&vcc->stats->rx); |
1037 | do_gettimeofday(&skb->stamp); | 1037 | __net_timestamp(skb); |
1038 | // end of our responsability | 1038 | // end of our responsability |
1039 | vcc->push (vcc, skb); | 1039 | vcc->push (vcc, skb); |
1040 | } | 1040 | } |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index 30b7e990ed0b..b4a76cade646 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -1101,7 +1101,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe) | |||
1101 | cell, ATM_CELL_PAYLOAD); | 1101 | cell, ATM_CELL_PAYLOAD); |
1102 | 1102 | ||
1103 | ATM_SKB(sb)->vcc = vcc; | 1103 | ATM_SKB(sb)->vcc = vcc; |
1104 | do_gettimeofday(&sb->stamp); | 1104 | __net_timestamp(sb); |
1105 | vcc->push(vcc, sb); | 1105 | vcc->push(vcc, sb); |
1106 | atomic_inc(&vcc->stats->rx); | 1106 | atomic_inc(&vcc->stats->rx); |
1107 | 1107 | ||
@@ -1179,7 +1179,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe) | |||
1179 | 1179 | ||
1180 | skb_trim(skb, len); | 1180 | skb_trim(skb, len); |
1181 | ATM_SKB(skb)->vcc = vcc; | 1181 | ATM_SKB(skb)->vcc = vcc; |
1182 | do_gettimeofday(&skb->stamp); | 1182 | __net_timestamp(skb); |
1183 | 1183 | ||
1184 | vcc->push(vcc, skb); | 1184 | vcc->push(vcc, skb); |
1185 | atomic_inc(&vcc->stats->rx); | 1185 | atomic_inc(&vcc->stats->rx); |
@@ -1201,7 +1201,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe) | |||
1201 | 1201 | ||
1202 | skb_trim(skb, len); | 1202 | skb_trim(skb, len); |
1203 | ATM_SKB(skb)->vcc = vcc; | 1203 | ATM_SKB(skb)->vcc = vcc; |
1204 | do_gettimeofday(&skb->stamp); | 1204 | __net_timestamp(skb); |
1205 | 1205 | ||
1206 | vcc->push(vcc, skb); | 1206 | vcc->push(vcc, skb); |
1207 | atomic_inc(&vcc->stats->rx); | 1207 | atomic_inc(&vcc->stats->rx); |
@@ -1340,7 +1340,7 @@ idt77252_rx_raw(struct idt77252_dev *card) | |||
1340 | ATM_CELL_PAYLOAD); | 1340 | ATM_CELL_PAYLOAD); |
1341 | 1341 | ||
1342 | ATM_SKB(sb)->vcc = vcc; | 1342 | ATM_SKB(sb)->vcc = vcc; |
1343 | do_gettimeofday(&sb->stamp); | 1343 | __net_timestamp(sb); |
1344 | vcc->push(vcc, sb); | 1344 | vcc->push(vcc, sb); |
1345 | atomic_inc(&vcc->stats->rx); | 1345 | atomic_inc(&vcc->stats->rx); |
1346 | 1346 | ||
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index ffe3afa723b8..51ec14787293 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -1427,7 +1427,7 @@ static void vcc_rx_aal5(struct lanai_vcc *lvcc, int endptr) | |||
1427 | skb_put(skb, size); | 1427 | skb_put(skb, size); |
1428 | vcc_rx_memcpy(skb->data, lvcc, size); | 1428 | vcc_rx_memcpy(skb->data, lvcc, size); |
1429 | ATM_SKB(skb)->vcc = lvcc->rx.atmvcc; | 1429 | ATM_SKB(skb)->vcc = lvcc->rx.atmvcc; |
1430 | do_gettimeofday(&skb->stamp); | 1430 | __net_timestamp(skb); |
1431 | lvcc->rx.atmvcc->push(lvcc->rx.atmvcc, skb); | 1431 | lvcc->rx.atmvcc->push(lvcc->rx.atmvcc, skb); |
1432 | atomic_inc(&lvcc->rx.atmvcc->stats->rx); | 1432 | atomic_inc(&lvcc->rx.atmvcc->stats->rx); |
1433 | out: | 1433 | out: |
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index a0e3bd861f1c..c57e20dcb0f8 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
@@ -2213,7 +2213,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2213 | memcpy(sb->tail, cell, ATM_CELL_PAYLOAD); | 2213 | memcpy(sb->tail, cell, ATM_CELL_PAYLOAD); |
2214 | skb_put(sb, ATM_CELL_PAYLOAD); | 2214 | skb_put(sb, ATM_CELL_PAYLOAD); |
2215 | ATM_SKB(sb)->vcc = vcc; | 2215 | ATM_SKB(sb)->vcc = vcc; |
2216 | do_gettimeofday(&sb->stamp); | 2216 | __net_timestamp(sb); |
2217 | vcc->push(vcc, sb); | 2217 | vcc->push(vcc, sb); |
2218 | atomic_inc(&vcc->stats->rx); | 2218 | atomic_inc(&vcc->stats->rx); |
2219 | cell += ATM_CELL_PAYLOAD; | 2219 | cell += ATM_CELL_PAYLOAD; |
@@ -2346,7 +2346,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2346 | skb->destructor = ns_sb_destructor; | 2346 | skb->destructor = ns_sb_destructor; |
2347 | #endif /* NS_USE_DESTRUCTORS */ | 2347 | #endif /* NS_USE_DESTRUCTORS */ |
2348 | ATM_SKB(skb)->vcc = vcc; | 2348 | ATM_SKB(skb)->vcc = vcc; |
2349 | do_gettimeofday(&skb->stamp); | 2349 | __net_timestamp(skb); |
2350 | vcc->push(vcc, skb); | 2350 | vcc->push(vcc, skb); |
2351 | atomic_inc(&vcc->stats->rx); | 2351 | atomic_inc(&vcc->stats->rx); |
2352 | } | 2352 | } |
@@ -2373,7 +2373,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2373 | sb->destructor = ns_sb_destructor; | 2373 | sb->destructor = ns_sb_destructor; |
2374 | #endif /* NS_USE_DESTRUCTORS */ | 2374 | #endif /* NS_USE_DESTRUCTORS */ |
2375 | ATM_SKB(sb)->vcc = vcc; | 2375 | ATM_SKB(sb)->vcc = vcc; |
2376 | do_gettimeofday(&sb->stamp); | 2376 | __net_timestamp(sb); |
2377 | vcc->push(vcc, sb); | 2377 | vcc->push(vcc, sb); |
2378 | atomic_inc(&vcc->stats->rx); | 2378 | atomic_inc(&vcc->stats->rx); |
2379 | } | 2379 | } |
@@ -2398,7 +2398,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2398 | memcpy(skb->data, sb->data, NS_SMBUFSIZE); | 2398 | memcpy(skb->data, sb->data, NS_SMBUFSIZE); |
2399 | skb_put(skb, len - NS_SMBUFSIZE); | 2399 | skb_put(skb, len - NS_SMBUFSIZE); |
2400 | ATM_SKB(skb)->vcc = vcc; | 2400 | ATM_SKB(skb)->vcc = vcc; |
2401 | do_gettimeofday(&skb->stamp); | 2401 | __net_timestamp(skb); |
2402 | vcc->push(vcc, skb); | 2402 | vcc->push(vcc, skb); |
2403 | atomic_inc(&vcc->stats->rx); | 2403 | atomic_inc(&vcc->stats->rx); |
2404 | } | 2404 | } |
@@ -2505,7 +2505,7 @@ static void dequeue_rx(ns_dev *card, ns_rsqe *rsqe) | |||
2505 | #ifdef NS_USE_DESTRUCTORS | 2505 | #ifdef NS_USE_DESTRUCTORS |
2506 | hb->destructor = ns_hb_destructor; | 2506 | hb->destructor = ns_hb_destructor; |
2507 | #endif /* NS_USE_DESTRUCTORS */ | 2507 | #endif /* NS_USE_DESTRUCTORS */ |
2508 | do_gettimeofday(&hb->stamp); | 2508 | __net_timestamp(hb); |
2509 | vcc->push(vcc, hb); | 2509 | vcc->push(vcc, hb); |
2510 | atomic_inc(&vcc->stats->rx); | 2510 | atomic_inc(&vcc->stats->rx); |
2511 | } | 2511 | } |
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index 85fee9530fa9..c4b75ecf9460 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
@@ -400,7 +400,7 @@ unsigned long *x; | |||
400 | EVENT("error code 0x%x/0x%x\n",(here[3] & uPD98401_AAL5_ES) >> | 400 | EVENT("error code 0x%x/0x%x\n",(here[3] & uPD98401_AAL5_ES) >> |
401 | uPD98401_AAL5_ES_SHIFT,error); | 401 | uPD98401_AAL5_ES_SHIFT,error); |
402 | skb = ((struct rx_buffer_head *) bus_to_virt(here[2]))->skb; | 402 | skb = ((struct rx_buffer_head *) bus_to_virt(here[2]))->skb; |
403 | do_gettimeofday(&skb->stamp); | 403 | __net_timestamp(skb); |
404 | #if 0 | 404 | #if 0 |
405 | printk("[-3..0] 0x%08lx 0x%08lx 0x%08lx 0x%08lx\n",((unsigned *) skb->data)[-3], | 405 | printk("[-3..0] 0x%08lx 0x%08lx 0x%08lx 0x%08lx\n",((unsigned *) skb->data)[-3], |
406 | ((unsigned *) skb->data)[-2],((unsigned *) skb->data)[-1], | 406 | ((unsigned *) skb->data)[-2],((unsigned *) skb->data)[-1], |