mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00

Also storing tcf_action into struct tcf_csum_params makes sure there is no discrepancy in tcf_csum_act(). Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20250709090204.797558-4-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
34 lines
643 B
C
34 lines
643 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __NET_TC_CSUM_H
|
|
#define __NET_TC_CSUM_H
|
|
|
|
#include <linux/types.h>
|
|
#include <net/act_api.h>
|
|
#include <linux/tc_act/tc_csum.h>
|
|
|
|
struct tcf_csum_params {
|
|
u32 update_flags;
|
|
int action;
|
|
struct rcu_head rcu;
|
|
};
|
|
|
|
struct tcf_csum {
|
|
struct tc_action common;
|
|
|
|
struct tcf_csum_params __rcu *params;
|
|
};
|
|
#define to_tcf_csum(a) ((struct tcf_csum *)a)
|
|
|
|
static inline u32 tcf_csum_update_flags(const struct tc_action *a)
|
|
{
|
|
u32 update_flags;
|
|
|
|
rcu_read_lock();
|
|
update_flags = rcu_dereference(to_tcf_csum(a)->params)->update_flags;
|
|
rcu_read_unlock();
|
|
|
|
return update_flags;
|
|
}
|
|
|
|
#endif /* __NET_TC_CSUM_H */
|