*/
struct rps_dev_flow_table {
u8 log;
- struct rcu_head rcu;
struct rps_dev_flow flows[];
};
#define RPS_DEV_FLOW_TABLE_SIZE(_num) (sizeof(struct rps_dev_flow_table) + \
return sysfs_emit(buf, "%lu\n", val);
}
-static void rps_dev_flow_table_release(struct rcu_head *rcu)
-{
- struct rps_dev_flow_table *table = container_of(rcu,
- struct rps_dev_flow_table, rcu);
- vfree(table);
-}
-
static ssize_t store_rps_dev_flow_table_cnt(struct netdev_rx_queue *queue,
const char *buf, size_t len)
{
RCU_INITIALIZER(table)));
if (old_table)
- call_rcu(&old_table->rcu, rps_dev_flow_table_release);
+ kvfree_rcu_mightsleep(old_table);
return len;
}
old_table = unrcu_pointer(xchg(&queue->rps_flow_table, NULL));
if (old_table)
- call_rcu(&old_table->rcu, rps_dev_flow_table_release);
+ kvfree_rcu_mightsleep(old_table);
#endif
memset(kobj, 0, sizeof(*kobj));