net/enic: fix flow action reordering
authorHyong Youb Kim <hyonkim@cisco.com>
Wed, 15 Apr 2020 01:06:37 +0000 (18:06 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:08 +0000 (13:57 +0200)
commit4bcbbb430fc999c3980f07d4490b2a0dfabb059c
treeb590ece145352b287b397a7aa546200c5a03fcbe
parentb8dc6b0e29d86bfda4b635aa6e12469728c46e63
net/enic: fix flow action reordering

The current implementation produces wrong ordering for several cases
like these:

1. mark, decap, steer
Current: steer, mark, decap
Correct: mark, steer, decap

2. decap, steer, steer
Current: steer, steer, decap
Correct: steer, decap, steer

Simplify the logic and swap 1st steer and decap.
Also, allow just one decap action per flow.

Fixes: ea7768b5bba8 ("net/enic: add flow implementation based on Flow Manager API")
Cc: stable@dpdk.org
Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
drivers/net/enic/enic_fm_flow.c