Skip to content

Commit db5271d

Browse files
Asbjørn Sloth Tønnesenkuba-moo
authored andcommitted
flow_dissector: cleanup FLOW_DISSECTOR_KEY_ENC_FLAGS
Now that TCA_FLOWER_KEY_ENC_FLAGS is unused, as it's former data is stored behind TCA_FLOWER_KEY_ENC_CONTROL, then remove the last bits of FLOW_DISSECTOR_KEY_ENC_FLAGS. FLOW_DISSECTOR_KEY_ENC_FLAGS is unreleased, and have been in net-next since 2024-06-04. Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]> Tested-by: Davide Caratti <[email protected]> Reviewed-by: Davide Caratti <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 880a51a commit db5271d

File tree

4 files changed

+1
-39
lines changed

4 files changed

+1
-39
lines changed

include/net/flow_dissector.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -342,14 +342,6 @@ struct flow_dissector_key_cfm {
342342
#define FLOW_DIS_CFM_MDL_MASK GENMASK(7, 5)
343343
#define FLOW_DIS_CFM_MDL_MAX 7
344344

345-
/**
346-
* struct flow_dissector_key_enc_flags: tunnel metadata control flags
347-
* @flags: tunnel control flags
348-
*/
349-
struct flow_dissector_key_enc_flags {
350-
u32 flags;
351-
};
352-
353345
enum flow_dissector_key_id {
354346
FLOW_DISSECTOR_KEY_CONTROL, /* struct flow_dissector_key_control */
355347
FLOW_DISSECTOR_KEY_BASIC, /* struct flow_dissector_key_basic */
@@ -384,7 +376,6 @@ enum flow_dissector_key_id {
384376
FLOW_DISSECTOR_KEY_L2TPV3, /* struct flow_dissector_key_l2tpv3 */
385377
FLOW_DISSECTOR_KEY_CFM, /* struct flow_dissector_key_cfm */
386378
FLOW_DISSECTOR_KEY_IPSEC, /* struct flow_dissector_key_ipsec */
387-
FLOW_DISSECTOR_KEY_ENC_FLAGS, /* struct flow_dissector_key_enc_flags */
388379

389380
FLOW_DISSECTOR_KEY_MAX,
390381
};

include/net/ip_tunnels.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -247,18 +247,6 @@ static inline bool ip_tunnel_is_options_present(const unsigned long *flags)
247247
return ip_tunnel_flags_intersect(flags, present);
248248
}
249249

250-
static inline void ip_tunnel_set_encflags_present(unsigned long *flags)
251-
{
252-
IP_TUNNEL_DECLARE_FLAGS(present) = { };
253-
254-
__set_bit(IP_TUNNEL_CSUM_BIT, present);
255-
__set_bit(IP_TUNNEL_DONT_FRAGMENT_BIT, present);
256-
__set_bit(IP_TUNNEL_OAM_BIT, present);
257-
__set_bit(IP_TUNNEL_CRIT_OPT_BIT, present);
258-
259-
ip_tunnel_flags_or(flags, flags, present);
260-
}
261-
262250
static inline bool ip_tunnel_flags_is_be16_compat(const unsigned long *flags)
263251
{
264252
IP_TUNNEL_DECLARE_FLAGS(supp) = { };

net/core/flow_dissector.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,7 @@ skb_flow_dissect_tunnel_info(const struct sk_buff *skb,
385385
!dissector_uses_key(flow_dissector,
386386
FLOW_DISSECTOR_KEY_ENC_IP) &&
387387
!dissector_uses_key(flow_dissector,
388-
FLOW_DISSECTOR_KEY_ENC_OPTS) &&
389-
!dissector_uses_key(flow_dissector,
390-
FLOW_DISSECTOR_KEY_ENC_FLAGS))
388+
FLOW_DISSECTOR_KEY_ENC_OPTS))
391389
return;
392390

393391
info = skb_tunnel_info(skb);
@@ -489,18 +487,6 @@ skb_flow_dissect_tunnel_info(const struct sk_buff *skb,
489487
IP_TUNNEL_GENEVE_OPT_BIT);
490488
enc_opt->dst_opt_type = val < __IP_TUNNEL_FLAG_NUM ? val : 0;
491489
}
492-
493-
if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_ENC_FLAGS)) {
494-
struct flow_dissector_key_enc_flags *enc_flags;
495-
IP_TUNNEL_DECLARE_FLAGS(flags) = {};
496-
497-
enc_flags = skb_flow_dissector_target(flow_dissector,
498-
FLOW_DISSECTOR_KEY_ENC_FLAGS,
499-
target_container);
500-
ip_tunnel_set_encflags_present(flags);
501-
ip_tunnel_flags_and(flags, flags, info->key.tun_flags);
502-
enc_flags->flags = bitmap_read(flags, IP_TUNNEL_CSUM_BIT, 32);
503-
}
504490
}
505491
EXPORT_SYMBOL(skb_flow_dissect_tunnel_info);
506492

net/sched/cls_flower.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ struct fl_flow_key {
8585
struct flow_dissector_key_l2tpv3 l2tpv3;
8686
struct flow_dissector_key_ipsec ipsec;
8787
struct flow_dissector_key_cfm cfm;
88-
struct flow_dissector_key_enc_flags enc_flags;
8988
} __aligned(BITS_PER_LONG / 8); /* Ensure that we can do comparisons as longs. */
9089

9190
struct fl_flow_mask_range {
@@ -2223,8 +2222,6 @@ static void fl_init_dissector(struct flow_dissector *dissector,
22232222
FLOW_DISSECTOR_KEY_IPSEC, ipsec);
22242223
FL_KEY_SET_IF_MASKED(mask, keys, cnt,
22252224
FLOW_DISSECTOR_KEY_CFM, cfm);
2226-
FL_KEY_SET_IF_MASKED(mask, keys, cnt,
2227-
FLOW_DISSECTOR_KEY_ENC_FLAGS, enc_flags);
22282225

22292226
skb_flow_dissector_init(dissector, keys, cnt);
22302227
}

0 commit comments

Comments
 (0)