Skip to content

Commit aa73366

Browse files
yifsundavem330
authored andcommitted
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>
1 parent ef68de5 commit aa73366

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎net/openvswitch/datapath.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,14 +222,14 @@ void ovs_dp_process_packet(struct sk_buff *skb, struct sw_flow_key *key)
222222
struct dp_stats_percpu *stats;
223223
u64 *stats_counter;
224224
u32 n_mask_hit;
225+
int error;
225226

226227
stats = this_cpu_ptr(dp->stats_percpu);
227228

228229
/* Look up flow. */
229230
flow = ovs_flow_tbl_lookup_stats(&dp->table, key, &n_mask_hit);
230231
if (unlikely(!flow)) {
231232
struct dp_upcall_info upcall;
232-
int error;
233233

234234
memset(&upcall, 0, sizeof(upcall));
235235
upcall.cmd = OVS_PACKET_CMD_MISS;
@@ -246,7 +246,10 @@ void ovs_dp_process_packet(struct sk_buff *skb, struct sw_flow_key *key)
246246

247247
ovs_flow_stats_update(flow, key->tp.flags, skb);
248248
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);
250253

251254
stats_counter = &stats->n_hit;
252255

0 commit comments

Comments
 (0)