Thanks, this makes a lot of sense, I squashed this in v2


On 02/12/2016 06:48, "Ilya Maximets" <[email protected]> wrote:

>Signed-off-by: Ilya Maximets <[email protected]>
>---
> lib/dpif-netdev.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
>diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
>index 8e9a623..8af2811 100644
>--- a/lib/dpif-netdev.c
>+++ b/lib/dpif-netdev.c
>@@ -3317,13 +3317,15 @@ reconfigure_datapath(struct dp_netdev *dp)
>     }
> 
>     /* Add every port to the tx cache of every pmd thread, if it's not
>-     * there already. */
>-    HMAP_FOR_EACH(port, node, &dp->ports) {
>-        CMAP_FOR_EACH(pmd, node, &dp->poll_threads) {
>-            ovs_mutex_lock(&pmd->port_mutex);
>-            dp_netdev_add_port_tx_to_pmd(pmd, port);
>-            ovs_mutex_unlock(&pmd->port_mutex);
>+     * there already and if this pmd has at least one rxq to poll. */
>+    CMAP_FOR_EACH(pmd, node, &dp->poll_threads) {
>+        ovs_mutex_lock(&pmd->port_mutex);
>+        if (hmap_count(&pmd->poll_list) || pmd->core_id == NON_PMD_CORE_ID) {
>+            HMAP_FOR_EACH(port, node, &dp->ports) {
>+                dp_netdev_add_port_tx_to_pmd(pmd, port);
>+            }
>         }
>+        ovs_mutex_unlock(&pmd->port_mutex);
>     }
> 
>     /* Reload affected pmd threads. */
>-- 
>2.7.4
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to