Re: Strange latency spikes/TX network stalls on Sun Fire X4150(x86) and e1000e
From: Eric Dumazet <hidden>
Date: 2012-05-30 11:59:17
From: Eric Dumazet <hidden>
Date: 2012-05-30 11:59:17
On Wed, 2012-05-30 at 04:20 -0700, Joe Perches wrote:
On Wed, 2012-05-30 at 13:08 +0200, Eric Dumazet wrote:quoted
Maybe we should change all POSDIFF(), not selected ones. #define POSDIFF(A, B) ((int)((A) - (B)) > 0 ? (A) - (B) : 0)maybe use an eval once statement expression macro ({ typeof (A) _a = (A); typeof (B) _b = (B); ((int)(_a - _b) > 0 ? _a - _b : 0; })
Well, many choices are possible, including #define POSDIFF(A, B) max_t(int, (A) - (B), 0);