DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [PATCH] example/vhost_crypto: fix incorrect fetch size
@ 2019-11-26  9:54 Fan Zhang
  2020-01-14  9:30 ` Maxime Coquelin
  0 siblings, 1 reply; 2+ messages in thread
From: Fan Zhang @ 2019-11-26  9:54 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, Fan Zhang

Coverity issue: 343401

Fixes: f5188211c721 ("examples/vhost_crypto: add sample application")
Cc: roy.fan.zhang@intel.com

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 examples/vhost_crypto/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
index 1d7ba9419..5d80bcaca 100644
--- a/examples/vhost_crypto/main.c
+++ b/examples/vhost_crypto/main.c
@@ -387,7 +387,7 @@ vhost_crypto_worker(void *arg)
 				continue;
 
 			for (j = 0; j < NB_VIRTIO_QUEUES; j++) {
-				to_fetch = RTE_MIN(burst_size,
+				to_fetch = RTE_MAX(burst_size,
 						(NB_CRYPTO_DESCRIPTORS -
 						info->nb_inflight_ops));
 				fetched = rte_vhost_crypto_fetch_requests(
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] example/vhost_crypto: fix incorrect fetch size
  2019-11-26  9:54 [dpdk-dev] [PATCH] example/vhost_crypto: fix incorrect fetch size Fan Zhang
@ 2020-01-14  9:30 ` Maxime Coquelin
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Coquelin @ 2020-01-14  9:30 UTC (permalink / raw)
  To: Fan Zhang, dev

Hi Fan,

On 11/26/19 10:54 AM, Fan Zhang wrote:
> Coverity issue: 343401
> 
> Fixes: f5188211c721 ("examples/vhost_crypto: add sample application")
> Cc: roy.fan.zhang@intel.com
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
> ---
>  examples/vhost_crypto/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c
> index 1d7ba9419..5d80bcaca 100644
> --- a/examples/vhost_crypto/main.c
> +++ b/examples/vhost_crypto/main.c
> @@ -387,7 +387,7 @@ vhost_crypto_worker(void *arg)
>  				continue;
>  
>  			for (j = 0; j < NB_VIRTIO_QUEUES; j++) {
> -				to_fetch = RTE_MIN(burst_size,
> +				to_fetch = RTE_MAX(burst_size,
>  						(NB_CRYPTO_DESCRIPTORS -
>  						info->nb_inflight_ops));
>  				fetched = rte_vhost_crypto_fetch_requests(
> 

Could you please add a commit message to explain the change?
With just the patch context, this fix looks weird.

Thanks!
Maxime


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-26  9:54 [dpdk-dev] [PATCH] example/vhost_crypto: fix incorrect fetch size Fan Zhang
2020-01-14  9:30 ` Maxime Coquelin

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git