diff --git a/networking/openvswitch/centos/meta_patches/0009-net-mlx5-fix-memory-region-cache-lookup.patch b/networking/openvswitch/centos/meta_patches/0009-net-mlx5-fix-memory-region-cache-lookup.patch new file mode 100644 index 000000000..38903a5be --- /dev/null +++ b/networking/openvswitch/centos/meta_patches/0009-net-mlx5-fix-memory-region-cache-lookup.patch @@ -0,0 +1,25 @@ +From 5cabd4876e772f59a18a71a15f8fdfac0b0cf0ea Mon Sep 17 00:00:00 2001 +From: Steven Webster +Date: Wed, 17 Oct 2018 09:54:53 -0400 +Subject: [PATCH] net-mlx5-fix-memory-region-cache-lookup + +--- + SPECS/openvswitch.spec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec +index f286a13..6d95f35 100644 +--- a/SPECS/openvswitch.spec ++++ b/SPECS/openvswitch.spec +@@ -127,7 +127,7 @@ Patch422: 0003-vhost-extract-virtqueue-cleaning-and-freeing-functio.patch + Patch423: 0004-vhost-destroy-unused-virtqueues-when-multiqueue-not-.patch + Patch424: 0005-vhost-add-flag-for-built-in-virtio-driver.patch + Patch425: 0006-vhost-drop-virtqueues-only-with-built-in-virtio-driv.patch +- ++Patch426: net-mlx5-fix-memory-region-cache-lookup.patch + + BuildRequires: gcc + BuildRequires: python2-sphinx +-- +1.8.3.1 + diff --git a/networking/openvswitch/centos/meta_patches/PATCH_ORDER b/networking/openvswitch/centos/meta_patches/PATCH_ORDER index f991a13e2..25e25de51 100644 --- a/networking/openvswitch/centos/meta_patches/PATCH_ORDER +++ b/networking/openvswitch/centos/meta_patches/PATCH_ORDER @@ -6,3 +6,4 @@ 0006-rpm-check-with-condition.patch 0007-enable-mlx-pmds.patch 0008-iommu-width-fix.patch +0009-net-mlx5-fix-memory-region-cache-lookup.patch diff --git a/networking/openvswitch/centos/patches/net-mlx5-fix-memory-region-cache-lookup.patch b/networking/openvswitch/centos/patches/net-mlx5-fix-memory-region-cache-lookup.patch new file mode 100644 index 000000000..8b7ac9461 --- /dev/null +++ b/networking/openvswitch/centos/patches/net-mlx5-fix-memory-region-cache-lookup.patch @@ -0,0 +1,31 @@ +From de2067b4419323eb9cefdb2faed3245b28e7d4b2 Mon Sep 17 00:00:00 2001 +From: Steven Webster +Date: Wed, 17 Oct 2018 09:50:07 -0400 +Subject: [PATCH] net-mlx5-fix-memory-region-cache-lookup + +--- + dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h b/dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h +index d34f3cc..70db913 100644 +--- a/dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h ++++ b/dpdk-17.11/drivers/net/mlx5/mlx5_rxtx.h +@@ -548,10 +548,12 @@ struct mlx5_mr *mlx5_txq_mp2mr_reg(struct mlx5_txq_data *, struct rte_mempool *, + struct mlx5_mr *mr; + + assert(i < RTE_DIM(txq->mp2mr)); +- if (likely(txq->mp2mr[i]->start <= addr && txq->mp2mr[i]->end >= addr)) ++ if (likely(txq->mp2mr[i] != NULL && ++ txq->mp2mr[i]->start <= addr && txq->mp2mr[i]->end >= addr)) + return txq->mp2mr[i]->lkey; + for (i = 0; (i != RTE_DIM(txq->mp2mr)); ++i) { +- if (unlikely(txq->mp2mr[i]->mr == NULL)) { ++ if (unlikely(txq->mp2mr[i] == NULL || ++ txq->mp2mr[i]->mr == NULL)) { + /* Unknown MP, add a new MR for it. */ + break; + } +-- +1.8.3.1 +