summaryrefslogtreecommitdiff
path: root/drivers/net/i40e/rte_pmd_i40e.c
diff options
context:
space:
mode:
authorBeilei Xing <beilei.xing@intel.com>2018-02-07 16:40:59 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-04-14 00:43:30 +0200
commit0585f5c3d2643e49c0d2629e4937fb0bf010afbd (patch)
tree524a6118b135656dad83b5487667cbefe66a909a /drivers/net/i40e/rte_pmd_i40e.c
parente3075e969eff1d4746b58172a188a4dc12194ef6 (diff)
downloaddpdk-0585f5c3d2643e49c0d2629e4937fb0bf010afbd.zip
dpdk-0585f5c3d2643e49c0d2629e4937fb0bf010afbd.tar.gz
dpdk-0585f5c3d2643e49c0d2629e4937fb0bf010afbd.tar.xz
net/i40e: fix DDP profile DEL operation
Customized info will be updated when processing DDP package, including PCYPE/PTYPE/protocol. Previously, the customized info is updated without any check for package operation - ADD or DEL, but only covers ADD operation. In this situation, even if a package is being removed, new PCTYPE/PTYPE/protocol will still be created, it will cause wrong parsing for SW. This patch cleans new PCTYPE/PTYPE/protocol created when a package is being removed. Fixes: e163c18a15b0 ("net/i40e: update ptype and pctype info") Cc: stable@dpdk.org Signed-off-by: Beilei Xing <beilei.xing@intel.com> Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Diffstat (limited to 'drivers/net/i40e/rte_pmd_i40e.c')
-rw-r--r--drivers/net/i40e/rte_pmd_i40e.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/i40e/rte_pmd_i40e.c b/drivers/net/i40e/rte_pmd_i40e.c
index f2d9619..9f9a650 100644
--- a/drivers/net/i40e/rte_pmd_i40e.c
+++ b/drivers/net/i40e/rte_pmd_i40e.c
@@ -1610,8 +1610,6 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
return -EINVAL;
}
- i40e_update_customized_info(dev, buff, size);
-
/* Find metadata segment */
metadata_seg_hdr = i40e_find_segment_in_package(SEGMENT_TYPE_METADATA,
pkg_hdr);
@@ -1715,6 +1713,10 @@ rte_pmd_i40e_process_ddp_package(uint16_t port, uint8_t *buff,
}
}
+ if (op == RTE_PMD_I40E_PKG_OP_WR_ADD ||
+ op == RTE_PMD_I40E_PKG_OP_WR_DEL)
+ i40e_update_customized_info(dev, buff, size, op);
+
rte_free(profile_info_sec);
return status;
}