summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2019-12-24 20:02:20 +0800
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-12 15:59:46 +0000
commit4fbd85cd89b47ae9b83b912bdc13707066fd717d (patch)
tree86db7ceca6a5399c064ec668f5b9b0c34636f3be
parentdfa1eeb158a5e78c55d4366e7b1b6a49e46b5674 (diff)
tcp: fix tcp check tx offload issue
Type: fix Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> Change-Id: I3b8755831d762abf51e1cbe1b57024f9297de9a4 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com> (cherry picked from commit 79bfb9e09c7bf2072d34b2ed6159ba11815dab3a)
-rwxr-xr-xsrc/vnet/tcp/tcp_input.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c
index 160aac02f17..17af200f67c 100755
--- a/src/vnet/tcp/tcp_input.c
+++ b/src/vnet/tcp/tcp_input.c
@@ -2429,11 +2429,15 @@ tcp_check_tx_offload (tcp_connection_t * tc, int is_ipv4)
}
lb = load_balance_get (lb_idx);
+ if (PREDICT_FALSE (lb->lb_n_buckets > 1))
+ return;
dpo = load_balance_get_bucket_i (lb, 0);
- sw_if_idx = dpo->dpoi_index;
- hw_if = vnet_get_sup_hw_interface (vnm, sw_if_idx);
+ sw_if_idx = dpo_get_urpf (dpo);
+ if (PREDICT_FALSE (sw_if_idx == ~0))
+ return;
+ hw_if = vnet_get_sup_hw_interface (vnm, sw_if_idx);
if (hw_if->flags & VNET_HW_INTERFACE_FLAG_SUPPORTS_GSO)
tc->cfg_flags |= TCP_CFG_F_TSO;
}