@@ -581,7 +581,8 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
581581 BIT (FLOW_DISSECTOR_KEY_ENC_IPV4_ADDRS ) |
582582 BIT (FLOW_DISSECTOR_KEY_ENC_IPV6_ADDRS ) |
583583 BIT (FLOW_DISSECTOR_KEY_ENC_PORTS ) |
584- BIT (FLOW_DISSECTOR_KEY_ENC_CONTROL ))) {
584+ BIT (FLOW_DISSECTOR_KEY_ENC_CONTROL ) |
585+ BIT (FLOW_DISSECTOR_KEY_TCP ))) {
585586 netdev_warn (priv -> netdev , "Unsupported key used: 0x%x\n" ,
586587 f -> dissector -> used_keys );
587588 return - EOPNOTSUPP ;
@@ -808,6 +809,25 @@ static int __parse_cls_flower(struct mlx5e_priv *priv,
808809 * min_inline = MLX5_INLINE_MODE_TCP_UDP ;
809810 }
810811
812+ if (dissector_uses_key (f -> dissector , FLOW_DISSECTOR_KEY_TCP )) {
813+ struct flow_dissector_key_tcp * key =
814+ skb_flow_dissector_target (f -> dissector ,
815+ FLOW_DISSECTOR_KEY_TCP ,
816+ f -> key );
817+ struct flow_dissector_key_tcp * mask =
818+ skb_flow_dissector_target (f -> dissector ,
819+ FLOW_DISSECTOR_KEY_TCP ,
820+ f -> mask );
821+
822+ MLX5_SET (fte_match_set_lyr_2_4 , headers_c , tcp_flags ,
823+ ntohs (mask -> flags ));
824+ MLX5_SET (fte_match_set_lyr_2_4 , headers_v , tcp_flags ,
825+ ntohs (key -> flags ));
826+
827+ if (mask -> flags )
828+ * min_inline = MLX5_INLINE_MODE_TCP_UDP ;
829+ }
830+
811831 return 0 ;
812832}
813833
0 commit comments