diff mbox series

[ovs-dev,V2,1/2] dpif-netdev: Do not execute packet recovery without experimental support

Message ID 20210714130055.7030-1-elibr@nvidia.com
State Accepted
Headers show
Series [ovs-dev,V2,1/2] dpif-netdev: Do not execute packet recovery without experimental support | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot success github build: passed

Commit Message

Eli Britstein July 14, 2021, 1 p.m. UTC
rte_flow_get_restore_info() API is under experimental attribute. Using it
has a performance impact that can be avoided for non-experimental compilation.

Do not call it without experimental support.

Reported-by: Cian Ferriter <cian.ferriter@intel.com>
Signed-off-by: Eli Britstein <elibr@nvidia.com>
Reviewed-by: Gaetan Rivet <gaetanr@nvidia.com>
---
 lib/dpif-netdev.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Ilya Maximets July 16, 2021, 1:13 p.m. UTC | #1
On 7/14/21 3:00 PM, Eli Britstein wrote:
> rte_flow_get_restore_info() API is under experimental attribute. Using it
> has a performance impact that can be avoided for non-experimental compilation.
> 
> Do not call it without experimental support.
> 
> Reported-by: Cian Ferriter <cian.ferriter@intel.com>
> Signed-off-by: Eli Britstein <elibr@nvidia.com>
> Reviewed-by: Gaetan Rivet <gaetanr@nvidia.com>
> ---

Thanks!  I applied this one patch to master.

Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 610949f36..1823bf565 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -114,7 +114,9 @@  COVERAGE_DEFINE(datapath_drop_invalid_port);
 COVERAGE_DEFINE(datapath_drop_invalid_bond);
 COVERAGE_DEFINE(datapath_drop_invalid_tnl_port);
 COVERAGE_DEFINE(datapath_drop_rx_invalid_packet);
+#ifdef ALLOW_EXPERIMENTAL_API /* Packet restoration API required. */
 COVERAGE_DEFINE(datapath_drop_hw_miss_recover);
+#endif
 
 /* Protects against changes to 'dp_netdevs'. */
 static struct ovs_mutex dp_netdev_mutex = OVS_MUTEX_INITIALIZER;
@@ -6754,13 +6756,14 @@  static struct tx_port * pmd_send_port_cache_lookup(
 
 inline int
 dp_netdev_hw_flow(const struct dp_netdev_pmd_thread *pmd,
-                  odp_port_t port_no,
+                  odp_port_t port_no OVS_UNUSED,
                   struct dp_packet *packet,
                   struct dp_netdev_flow **flow)
 {
-    struct tx_port *p;
+    struct tx_port *p OVS_UNUSED;
     uint32_t mark;
 
+#ifdef ALLOW_EXPERIMENTAL_API /* Packet restoration API required. */
     /* Restore the packet if HW processing was terminated before completion. */
     p = pmd_send_port_cache_lookup(pmd, port_no);
     if (OVS_LIKELY(p)) {
@@ -6771,6 +6774,7 @@  dp_netdev_hw_flow(const struct dp_netdev_pmd_thread *pmd,
             return -1;
         }
     }
+#endif
 
     /* If no mark, no flow to find. */
     if (!dp_packet_has_flow_mark(packet, &mark)) {