Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: NTop: Misc

PF_RING 5.4.0 on kernel < 2.6.35

 

 

NTop misc RSS feed   Index | Next | Previous | View Threaded


c.d.wakelin at reading

May 14, 2012, 7:00 AM

Post #1 of 1 (173 views)
Permalink
PF_RING 5.4.0 on kernel < 2.6.35

Hi,

I just tried compiling the newly-released PF_RING 5.4.0 on Ubuntu 10.04
LTS 64-bit (Kernel 2.6.32).

The pf_ring kernel module fails to build due to lacking
atomic_dec_if_postive() in kernels < 2.6.35.

Moving the "#endif" before the atomic_dec_if_positive() block in
pf_ring.c fixes it but will presumably break with newer kernels:

+#endif

static inline int atomic_dec_if_positive(atomic_t *v)
{
int c, old, dec;
c = atomic_read(v);
for (;;) {
dec = c - 1;
if (unlikely(dec < 0))
break;
old = atomic_cmpxchg((v), c, dec);
if (likely(old == c))
break;
c = old;
}
return dec;
}
-#endif

Best Wishes,
Chris

--
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
Christopher Wakelin, c.d.wakelin [at] reading
IT Services Centre, The University of Reading, Tel: +44 (0)118 378 2908
Whiteknights, Reading, RG6 6AF, UK Fax: +44 (0)118 975 3094
_______________________________________________
Ntop-misc mailing list
Ntop-misc [at] listgateway
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

NTop misc RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.