On Thu, 2016-09-08 at 09:02 -0700, Eric Dumazet wrote:
On Thu, 2016-09-08 at 06:38 -0400, Jamal Hadi Salim wrote:
quoted
On 16-09-06 10:25 AM, Eric Dumazet wrote:
quoted
Just use u16 in the array ?
u16 tmpaddr[ETH_ALEN / 2]; /* ether_addr_copy() requirement */
ether_addr_copy((u8 *)tmpaddr, eth_hdr(skb)->h_dest);
...
Ok - thanks Eric. BTW:
Nobody has answered my other question:
I can get stats to increment with:
bstats_update(&d->tcf_bstats, skb);
but not:
bstats_cpu_update(this_cpu_ptr(d->common.cpu_bstats), skb);
This simply works for me.
But maybe you read the stats at the wrong place ?
Pleas give us more details, thanks !
And double check the tcf_hash_create() call :
Last parameter is a boolean, and you must set it to true if you want per
cpu stats !