linux-stable/net/openvswitch
Vlad Buslov 7cbdf36eab net/sched: act_ct: Always fill offloading tuple iifidx
commit 9bc64bd0cd upstream.

Referenced commit doesn't always set iifidx when offloading the flow to
hardware. Fix the following cases:

- nf_conn_act_ct_ext_fill() is called before extension is created with
nf_conn_act_ct_ext_add() in tcf_ct_act(). This can cause rule offload with
unspecified iifidx when connection is offloaded after only single
original-direction packet has been processed by tc data path. Always fill
the new nf_conn_act_ct_ext instance after creating it in
nf_conn_act_ct_ext_add().

- Offloading of unidirectional UDP NEW connections is now supported, but ct
flow iifidx field is not updated when connection is promoted to
bidirectional which can result reply-direction iifidx to be zero when
refreshing the connection. Fill in the extension and update flow iifidx
before calling flow_offload_refresh().

Fixes: 9795ded7f9 ("net/sched: act_ct: Fill offloading tuple iifidx")
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Fixes: 6a9bad0069 ("net/sched: act_ct: offload UDP NEW connections")
Link: https://lore.kernel.org/r/20231103151410.764271-1-vladbu@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-10 17:10:36 +01:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile openvswitch: add trace points 2021-06-22 10:47:32 -07:00
actions.c net: openvswitch: fix race on port output 2023-04-20 12:35:09 +02:00
conntrack.c net/sched: act_ct: Always fill offloading tuple iifidx 2024-01-10 17:10:36 +01:00
conntrack.h net/sched: act_api: fix miss set post_ct for ovs after do conntrack in act_ct 2021-03-16 15:22:18 -07:00
datapath.c net: openvswitch: reject negative ifindex 2023-08-23 17:52:35 +02:00
datapath.h net/sched: Enable tc skb ext allocation on chain miss only when needed 2022-02-05 10:12:53 +00:00
dp_notify.c
flow.c net: openvswitch: fix parsing of nw_proto for IPv6 fragments 2022-06-23 11:44:01 +02:00
flow.h net: openvswitch: IPv6: Add IPv6 extension header support 2022-02-25 10:32:55 +00:00
flow_netlink.c openvswitch: Use kmalloc_size_roundup() to match ksize() usage 2022-12-31 13:32:59 +01:00
flow_netlink.h
flow_table.c openvswitch: Optimize operation for key comparison 2021-07-01 11:13:10 -07:00
flow_table.h net: openvswitch: fix to make sure flow_lookup() is not preempted 2020-10-18 12:29:36 -07:00
meter.c net: openvswitch: fix possible memory leak in ovs_meter_cmd_set() 2023-02-22 12:59:52 +01:00
meter.h net: openvswitch: use u64 for meter bucket 2020-04-23 18:26:11 -07:00
openvswitch_trace.c openvswitch: add trace points 2021-06-22 10:47:32 -07:00
openvswitch_trace.h openvswitch: add trace points 2021-06-22 10:47:32 -07:00
vport-geneve.c
vport-gre.c
vport-internal_dev.c openvswitch: Change the return type for vport_ops.send function hook to int 2022-09-19 18:28:50 -07:00
vport-internal_dev.h
vport-netdev.c net: rename reference+tracking helpers 2022-06-09 21:52:55 -07:00
vport-netdev.h
vport-vxlan.c
vport.c net: Add skb_clear_tstamp() to keep the mono delivery_time 2022-03-03 14:38:48 +00:00
vport.h openvswitch: Change the return type for vport_ops.send function hook to int 2022-09-19 18:28:50 -07:00