Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

openvswitch: Print error when ovs_execute_actions() fails

Currently in function ovs_dp_process_packet(), return values of
ovs_execute_actions() are silently discarded. This patch prints out
an debug message when error happens so as to provide helpful hints
for debugging.
Acked-by: Pravin B Shelar <pshelar@ovn.org>

Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yifeng Sun and committed by
David S. Miller
aa733660 ef68de56

+5 -2
+5 -2
net/openvswitch/datapath.c
··· 222 222 struct dp_stats_percpu *stats; 223 223 u64 *stats_counter; 224 224 u32 n_mask_hit; 225 + int error; 225 226 226 227 stats = this_cpu_ptr(dp->stats_percpu); 227 228 ··· 230 229 flow = ovs_flow_tbl_lookup_stats(&dp->table, key, &n_mask_hit); 231 230 if (unlikely(!flow)) { 232 231 struct dp_upcall_info upcall; 233 - int error; 234 232 235 233 memset(&upcall, 0, sizeof(upcall)); 236 234 upcall.cmd = OVS_PACKET_CMD_MISS; ··· 246 246 247 247 ovs_flow_stats_update(flow, key->tp.flags, skb); 248 248 sf_acts = rcu_dereference(flow->sf_acts); 249 - ovs_execute_actions(dp, skb, sf_acts, key); 249 + error = ovs_execute_actions(dp, skb, sf_acts, key); 250 + if (unlikely(error)) 251 + net_dbg_ratelimited("ovs: action execution error on datapath %s: %d\n", 252 + ovs_dp_name(dp), error); 250 253 251 254 stats_counter = &stats->n_hit; 252 255