* [dpdk-stable] [PATCH] raw/ifpga/base: fix compile error on ia32 icc compiler [not found] <1521553556-62982-1-git-send-email-rosen.xu@intel.com> @ 2018-05-14 9:57 ` Xu, Rosen 2018-05-14 9:58 ` Xu, Rosen 2018-05-16 13:48 ` [dpdk-stable] [PATCH] drivers/bus/ifpga/: fix Coverity issue Rosen Xu 2 siblings, 0 replies; 9+ messages in thread From: Xu, Rosen @ 2018-05-14 9:57 UTC (permalink / raw) To: rosen.xu, tianfei.zhang; +Cc: stable From: "Zhang, Tianfei" <tianfei.zhang@intel.com> fix compile error on ia32 icc compiler Fixes: 56bb54ea1bdf ("raw/ifpga: add Intel FPGA bus rawdev driver") Cc: stable@dpdk.org Signed-off-by: Zhang, Tianfei <tianfei.zhang@intel.com> --- drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h index cd114fb..7a39a58 100644 --- a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h +++ b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h @@ -16,16 +16,20 @@ return &hw->port[port_id]; } -#define ifpga_for_each_feature(hw, feature) \ +#define ifpga_for_each_fme_feature(hw, feature) \ for ((feature) = (hw)->sub_feature; \ (feature) < (hw)->sub_feature + (FME_FEATURE_ID_MAX); (feature)++) +#define ifpga_for_each_port_feature(hw, feature) \ + for ((feature) = (hw)->sub_feature; \ + (feature) < (hw)->sub_feature + (PORT_FEATURE_ID_MAX); (feature)++) + static inline struct feature * get_fme_feature_by_id(struct ifpga_fme_hw *fme, u64 id) { struct feature *feature; - ifpga_for_each_feature(fme, feature) { + ifpga_for_each_fme_feature(fme, feature) { if (feature->id == id) return feature; } @@ -38,7 +42,7 @@ { struct feature *feature; - ifpga_for_each_feature(port, feature) { + ifpga_for_each_port_feature(port, feature) { if (feature->id == id) return feature; } -- 1.8.3.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-stable] [PATCH] raw/ifpga/base: fix compile error on ia32 icc compiler [not found] <1521553556-62982-1-git-send-email-rosen.xu@intel.com> 2018-05-14 9:57 ` [dpdk-stable] [PATCH] raw/ifpga/base: fix compile error on ia32 icc compiler Xu, Rosen @ 2018-05-14 9:58 ` Xu, Rosen 2018-05-14 10:20 ` [dpdk-stable] [dpdk-dev] " De Lara Guarch, Pablo 2018-05-16 13:48 ` [dpdk-stable] [PATCH] drivers/bus/ifpga/: fix Coverity issue Rosen Xu 2 siblings, 1 reply; 9+ messages in thread From: Xu, Rosen @ 2018-05-14 9:58 UTC (permalink / raw) To: dev, thomas Cc: rosen.xu, roy.fan.zhang, declan.doherty, bruce.richardson, shreyansh.jain, ferruh.yigit, konstantin.ananyev, tianfei.zhang, song.liu, hao.wu, gaetan.rivet, stable From: "Zhang, Tianfei" <tianfei.zhang@intel.com> fix compile error on ia32 icc compiler Fixes: 56bb54ea1bdf ("raw/ifpga: add Intel FPGA bus rawdev driver") Cc: stable@dpdk.org Signed-off-by: Zhang, Tianfei <tianfei.zhang@intel.com> --- drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h index cd114fb..7a39a58 100644 --- a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h +++ b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h @@ -16,16 +16,20 @@ return &hw->port[port_id]; } -#define ifpga_for_each_feature(hw, feature) \ +#define ifpga_for_each_fme_feature(hw, feature) \ for ((feature) = (hw)->sub_feature; \ (feature) < (hw)->sub_feature + (FME_FEATURE_ID_MAX); (feature)++) +#define ifpga_for_each_port_feature(hw, feature) \ + for ((feature) = (hw)->sub_feature; \ + (feature) < (hw)->sub_feature + (PORT_FEATURE_ID_MAX); (feature)++) + static inline struct feature * get_fme_feature_by_id(struct ifpga_fme_hw *fme, u64 id) { struct feature *feature; - ifpga_for_each_feature(fme, feature) { + ifpga_for_each_fme_feature(fme, feature) { if (feature->id == id) return feature; } @@ -38,7 +42,7 @@ { struct feature *feature; - ifpga_for_each_feature(port, feature) { + ifpga_for_each_port_feature(port, feature) { if (feature->id == id) return feature; } -- 1.8.3.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] raw/ifpga/base: fix compile error on ia32 icc compiler 2018-05-14 9:58 ` Xu, Rosen @ 2018-05-14 10:20 ` De Lara Guarch, Pablo 2018-05-14 10:32 ` Thomas Monjalon 0 siblings, 1 reply; 9+ messages in thread From: De Lara Guarch, Pablo @ 2018-05-14 10:20 UTC (permalink / raw) To: Xu, Rosen, dev, thomas Cc: Xu, Rosen, Zhang, Roy Fan, Doherty, Declan, Richardson, Bruce, shreyansh.jain, Yigit, Ferruh, Ananyev, Konstantin, Zhang, Tianfei, Liu, Song, Wu, Hao, gaetan.rivet, stable > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xu, Rosen > Sent: Monday, May 14, 2018 10:59 AM > To: dev@dpdk.org; thomas@monjalon.net > Cc: Xu, Rosen <rosen.xu@intel.com>; Zhang, Roy Fan > <roy.fan.zhang@intel.com>; Doherty, Declan <declan.doherty@intel.com>; > Richardson, Bruce <bruce.richardson@intel.com>; shreyansh.jain@nxp.com; > Yigit, Ferruh <ferruh.yigit@intel.com>; Ananyev, Konstantin > <konstantin.ananyev@intel.com>; Zhang, Tianfei <tianfei.zhang@intel.com>; > Liu, Song <song.liu@intel.com>; Wu, Hao <hao.wu@intel.com>; > gaetan.rivet@6wind.com; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] raw/ifpga/base: fix compile error on ia32 icc > compiler > > From: "Zhang, Tianfei" <tianfei.zhang@intel.com> > > fix compile error on ia32 icc compiler This is also applicable for 64-bit icc compilation. > > Fixes: 56bb54ea1bdf ("raw/ifpga: add Intel FPGA bus rawdev driver") > Cc: stable@dpdk.org No need to cc stable, as this is fixing code from this release. > > Signed-off-by: Zhang, Tianfei <tianfei.zhang@intel.com> Tested-by: Pablo de Lara <oablo.de.lara.guarch@intel.com> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] raw/ifpga/base: fix compile error on ia32 icc compiler 2018-05-14 10:20 ` [dpdk-stable] [dpdk-dev] " De Lara Guarch, Pablo @ 2018-05-14 10:32 ` Thomas Monjalon 0 siblings, 0 replies; 9+ messages in thread From: Thomas Monjalon @ 2018-05-14 10:32 UTC (permalink / raw) To: Xu, Rosen, Zhang, Tianfei Cc: dev, De Lara Guarch, Pablo, Zhang, Roy Fan, Doherty, Declan, Richardson, Bruce, shreyansh.jain, Yigit, Ferruh, Ananyev, Konstantin, Liu, Song, Wu, Hao, gaetan.rivet, stable > > From: "Zhang, Tianfei" <tianfei.zhang@intel.com> > > > > fix compile error on ia32 icc compiler > > This is also applicable for 64-bit icc compilation. > > > > > Fixes: 56bb54ea1bdf ("raw/ifpga: add Intel FPGA bus rawdev driver") > > Cc: stable@dpdk.org > > No need to cc stable, as this is fixing code from this release. > > > > > Signed-off-by: Zhang, Tianfei <tianfei.zhang@intel.com> > > Tested-by: Pablo de Lara <oablo.de.lara.guarch@intel.com> Applied, thanks ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-stable] [PATCH] drivers/bus/ifpga/: fix Coverity issue [not found] <1521553556-62982-1-git-send-email-rosen.xu@intel.com> 2018-05-14 9:57 ` [dpdk-stable] [PATCH] raw/ifpga/base: fix compile error on ia32 icc compiler Xu, Rosen 2018-05-14 9:58 ` Xu, Rosen @ 2018-05-16 13:48 ` Rosen Xu 2018-05-21 14:00 ` Thomas Monjalon [not found] ` <1526984778-95506-1-git-send-email-rosen.xu@intel.com> 2 siblings, 2 replies; 9+ messages in thread From: Rosen Xu @ 2018-05-16 13:48 UTC (permalink / raw) To: dev, thomas Cc: rosen.xu, roy.fan.zhang, declan.doherty, bruce.richardson, shreyansh.jain, ferruh.yigit, konstantin.ananyev, tianfei.zhang, song.liu, hao.wu, gaetan.rivet, stable Fix Coverity issue: 279455, 279459 and 279454 Signed-off-by: Rosen Xu <rosen.xu@intel.com> Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library") Coverity issue: 279455, 279459 and 279454 Cc: stable@dpdk.org --- drivers/bus/ifpga/ifpga_bus.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index 45597a1..b324872 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -156,27 +156,30 @@ void rte_ifpga_driver_unregister(struct rte_afu_driver *driver) if (rawdev->dev_ops && rawdev->dev_ops->dev_start && rawdev->dev_ops->dev_start(rawdev)) - goto free_dev; + goto end; strlcpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path)); - if (rawdev->dev_ops->firmware_load && + if (rawdev->dev_ops && + rawdev->dev_ops->firmware_load && rawdev->dev_ops->firmware_load(rawdev, &afu_pr_conf)){ IFPGA_BUS_ERR("firmware load error %d\n", ret); - goto free_dev; + goto end; } afu_dev->id.uuid.uuid_low = afu_pr_conf.afu_id.uuid.uuid_low; afu_dev->id.uuid.uuid_high = afu_pr_conf.afu_id.uuid.uuid_high; + rte_kvargs_free(kvlist); + free(path); return afu_dev; -free_dev: - free(afu_dev); end: if (kvlist) rte_kvargs_free(kvlist); if (path) free(path); + if (afu_dev) + free(afu_dev); return NULL; } @@ -367,7 +370,7 @@ void rte_ifpga_driver_unregister(struct rte_afu_driver *driver) return -EINVAL; afu_dev = RTE_DEV_TO_AFU(dev); - if (!dev) + if (!afu_dev) return -ENOENT; devargs = dev->devargs; -- 1.8.3.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-stable] [PATCH] drivers/bus/ifpga/: fix Coverity issue 2018-05-16 13:48 ` [dpdk-stable] [PATCH] drivers/bus/ifpga/: fix Coverity issue Rosen Xu @ 2018-05-21 14:00 ` Thomas Monjalon [not found] ` <1526984778-95506-1-git-send-email-rosen.xu@intel.com> 1 sibling, 0 replies; 9+ messages in thread From: Thomas Monjalon @ 2018-05-21 14:00 UTC (permalink / raw) To: Rosen Xu Cc: stable, dev, roy.fan.zhang, declan.doherty, bruce.richardson, shreyansh.jain, ferruh.yigit, konstantin.ananyev, tianfei.zhang, song.liu, hao.wu, gaetan.rivet 16/05/2018 15:48, Rosen Xu: > Fix Coverity issue: 279455, 279459 and 279454 > > Signed-off-by: Rosen Xu <rosen.xu@intel.com> > > Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library") > Coverity issue: 279455, 279459 and 279454 > Cc: stable@dpdk.org The commit message should explain what was the issue. FYI, it should look like this: " bus/ifpga: fix <scope of the change> <explanation of the issue> Coverity issue: 279455, 279459, 279454 Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library") Cc: stable@dpdk.org Signed-off-by: Rosen Xu <rosen.xu@intel.com> " ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <1526984778-95506-1-git-send-email-rosen.xu@intel.com>]
* [dpdk-stable] [PATCH v2 1/3] bus/ifpga: fix error control flow issue [not found] ` <1526984778-95506-1-git-send-email-rosen.xu@intel.com> @ 2018-05-22 10:26 ` Rosen Xu 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 2/3] bus/ifpga: fix resource leaks issue Rosen Xu 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 3/3] bus/ifpga: fix null pointer dereferences issue Rosen Xu 2 siblings, 0 replies; 9+ messages in thread From: Rosen Xu @ 2018-05-22 10:26 UTC (permalink / raw) To: dev, thomas Cc: rosen.xu, roy.fan.zhang, declan.doherty, bruce.richardson, shreyansh.jain, ferruh.yigit, konstantin.ananyev, tianfei.zhang, song.liu, hao.wu, gaetan.rivet, stable The control variable should be afu_dev not dev. Coverity issue: 279455 Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library") Cc: stable@dpdk.org Signed-off-by: Rosen Xu <rosen.xu@intel.com> --- drivers/bus/ifpga/ifpga_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index 45597a1..675b9a3 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -367,7 +367,7 @@ void rte_ifpga_driver_unregister(struct rte_afu_driver *driver) return -EINVAL; afu_dev = RTE_DEV_TO_AFU(dev); - if (!dev) + if (!afu_dev) return -ENOENT; devargs = dev->devargs; -- 1.8.3.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-stable] [PATCH v2 2/3] bus/ifpga: fix resource leaks issue [not found] ` <1526984778-95506-1-git-send-email-rosen.xu@intel.com> 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 1/3] bus/ifpga: fix error control flow issue Rosen Xu @ 2018-05-22 10:26 ` Rosen Xu 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 3/3] bus/ifpga: fix null pointer dereferences issue Rosen Xu 2 siblings, 0 replies; 9+ messages in thread From: Rosen Xu @ 2018-05-22 10:26 UTC (permalink / raw) To: dev, thomas Cc: rosen.xu, roy.fan.zhang, declan.doherty, bruce.richardson, shreyansh.jain, ferruh.yigit, konstantin.ananyev, tianfei.zhang, song.liu, hao.wu, gaetan.rivet, stable There are some resource leaks in ifpga_scan_one. This patch fixes it. Coverity issue: 279459 Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library") Cc: stable@dpdk.org Signed-off-by: Rosen Xu <rosen.xu@intel.com> --- drivers/bus/ifpga/ifpga_bus.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index 675b9a3..db16173 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -156,27 +156,29 @@ void rte_ifpga_driver_unregister(struct rte_afu_driver *driver) if (rawdev->dev_ops && rawdev->dev_ops->dev_start && rawdev->dev_ops->dev_start(rawdev)) - goto free_dev; + goto end; strlcpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path)); if (rawdev->dev_ops->firmware_load && rawdev->dev_ops->firmware_load(rawdev, &afu_pr_conf)){ IFPGA_BUS_ERR("firmware load error %d\n", ret); - goto free_dev; + goto end; } afu_dev->id.uuid.uuid_low = afu_pr_conf.afu_id.uuid.uuid_low; afu_dev->id.uuid.uuid_high = afu_pr_conf.afu_id.uuid.uuid_high; + rte_kvargs_free(kvlist); + free(path); return afu_dev; -free_dev: - free(afu_dev); end: if (kvlist) rte_kvargs_free(kvlist); if (path) free(path); + if (afu_dev) + free(afu_dev); return NULL; } -- 1.8.3.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-stable] [PATCH v2 3/3] bus/ifpga: fix null pointer dereferences issue [not found] ` <1526984778-95506-1-git-send-email-rosen.xu@intel.com> 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 1/3] bus/ifpga: fix error control flow issue Rosen Xu 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 2/3] bus/ifpga: fix resource leaks issue Rosen Xu @ 2018-05-22 10:26 ` Rosen Xu 2 siblings, 0 replies; 9+ messages in thread From: Rosen Xu @ 2018-05-22 10:26 UTC (permalink / raw) To: dev, thomas Cc: rosen.xu, roy.fan.zhang, declan.doherty, bruce.richardson, shreyansh.jain, ferruh.yigit, konstantin.ananyev, tianfei.zhang, song.liu, hao.wu, gaetan.rivet, stable Fix ifpga_scan_one() null pointer dereferences issue. Coverity issue: 279454 Fixes: 05fa3d4a6539 ("bus/ifpga: add Intel FPGA bus library") Cc: stable@dpdk.org Signed-off-by: Rosen Xu <rosen.xu@intel.com> --- drivers/bus/ifpga/ifpga_bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c index db16173..b324872 100644 --- a/drivers/bus/ifpga/ifpga_bus.c +++ b/drivers/bus/ifpga/ifpga_bus.c @@ -159,7 +159,8 @@ void rte_ifpga_driver_unregister(struct rte_afu_driver *driver) goto end; strlcpy(afu_pr_conf.bs_path, path, sizeof(afu_pr_conf.bs_path)); - if (rawdev->dev_ops->firmware_load && + if (rawdev->dev_ops && + rawdev->dev_ops->firmware_load && rawdev->dev_ops->firmware_load(rawdev, &afu_pr_conf)){ IFPGA_BUS_ERR("firmware load error %d\n", ret); -- 1.8.3.1 ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-05-22 10:25 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1521553556-62982-1-git-send-email-rosen.xu@intel.com> 2018-05-14 9:57 ` [dpdk-stable] [PATCH] raw/ifpga/base: fix compile error on ia32 icc compiler Xu, Rosen 2018-05-14 9:58 ` Xu, Rosen 2018-05-14 10:20 ` [dpdk-stable] [dpdk-dev] " De Lara Guarch, Pablo 2018-05-14 10:32 ` Thomas Monjalon 2018-05-16 13:48 ` [dpdk-stable] [PATCH] drivers/bus/ifpga/: fix Coverity issue Rosen Xu 2018-05-21 14:00 ` Thomas Monjalon [not found] ` <1526984778-95506-1-git-send-email-rosen.xu@intel.com> 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 1/3] bus/ifpga: fix error control flow issue Rosen Xu 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 2/3] bus/ifpga: fix resource leaks issue Rosen Xu 2018-05-22 10:26 ` [dpdk-stable] [PATCH v2 3/3] bus/ifpga: fix null pointer dereferences issue Rosen Xu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).