On Thu, 29 Jun 2023, Simon Horman wrote:

On Tue, Jun 06, 2023 at 03:35:32PM +0400, Ivan Malov via dev wrote:
This may be required by some PMDs in offload scenarios.

Signed-off-by: Ivan Malov <ivan.ma...@arknetworks.am>
---
 lib/netdev-dpdk.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 8cb1a7703..98765fe6e 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -542,6 +542,9 @@ struct netdev_dpdk {
         int rte_xstats_names_size;
         int rte_xstats_ids_size;
         uint64_t *rte_xstats_ids;
+
+        /* Ensures that Rx metadata delivery is configured only once */
+        bool rx_metadata_delivery_configured;
     );
 };

@@ -1140,6 +1143,41 @@ dpdk_eth_flow_ctrl_setup(struct netdev_dpdk *dev) 
OVS_REQUIRES(dev->mutex)
     }
 }

+static void
+dpdk_eth_dev_init_rx_metadata(struct netdev_dpdk *dev)
+{
+    uint64_t rx_metadata = 0;
+    int ret;
+
+    if (dev->rx_metadata_delivery_configured)
+        return;

Hi Ivan,

IIRC, the OVS coding style calls for the use of { } for all conditional blocks.
So please update this to:

   if (dev->rx_metadata_delivery_configured) {
       return;
   }

Likewise, a similar update is needed for patch 2/2.

Thanks!

Hi Simon,

Very valuable information indeed. Now I understand
the true reason behind the check-bot warning.

Thank you.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to