DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes
@ 2019-03-27 21:08 Stephen Hemminger
  2019-03-27 21:08 ` Stephen Hemminger
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Stephen Hemminger @ 2019-03-27 21:08 UTC (permalink / raw)
  To: maxime.coquelin, tiwei.bie, zhihong.wang; +Cc: dev, Stephen Hemminger

Looks like the LGTM checker complains about condition
checks that are always true.

Stephen Hemminger (2):
  net/netvsc: fix lgtm static checker complaint
  net/virtio: fix lgtm static checker complaint

 drivers/net/netvsc/hn_rxtx.c     | 2 +-
 drivers/net/virtio/virtio_rxtx.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.17.1

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

* [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes
  2019-03-27 21:08 [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Stephen Hemminger
@ 2019-03-27 21:08 ` Stephen Hemminger
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint Stephen Hemminger
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Stephen Hemminger @ 2019-03-27 21:08 UTC (permalink / raw)
  To: maxime.coquelin, tiwei.bie, zhihong.wang; +Cc: dev, Stephen Hemminger

Looks like the LGTM checker complains about condition
checks that are always true.

Stephen Hemminger (2):
  net/netvsc: fix lgtm static checker complaint
  net/virtio: fix lgtm static checker complaint

 drivers/net/netvsc/hn_rxtx.c     | 2 +-
 drivers/net/virtio/virtio_rxtx.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.17.1


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

* [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint
  2019-03-27 21:08 [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Stephen Hemminger
  2019-03-27 21:08 ` Stephen Hemminger
@ 2019-03-27 21:08 ` Stephen Hemminger
  2019-03-27 21:08   ` Stephen Hemminger
  2019-03-28  0:25   ` Rami Rosen
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 2/2] net/virtio: " Stephen Hemminger
  2019-03-28 17:11 ` [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Ferruh Yigit
  3 siblings, 2 replies; 14+ messages in thread
From: Stephen Hemminger @ 2019-03-27 21:08 UTC (permalink / raw)
  To: maxime.coquelin, tiwei.bie, zhihong.wang
  Cc: dev, Stephen Hemminger, Stephen Hemminger

Since previous test is for mtu < 1519 the next else if
is always true. This causes the lgtm static tool to complain.
Not a real issue, just cosmetic.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/net/netvsc/hn_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 6197118b01ee..8818d68cea5c 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -123,7 +123,7 @@ hn_update_packet_stats(struct hn_stats *stats, const struct rte_mbuf *m)
 			stats->size_bins[0]++;
 		else if (s < 1519)
 			stats->size_bins[6]++;
-		else if (s >= 1519)
+		else
 			stats->size_bins[7]++;
 	}
 
-- 
2.17.1

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

* [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint Stephen Hemminger
@ 2019-03-27 21:08   ` Stephen Hemminger
  2019-03-28  0:25   ` Rami Rosen
  1 sibling, 0 replies; 14+ messages in thread
From: Stephen Hemminger @ 2019-03-27 21:08 UTC (permalink / raw)
  To: maxime.coquelin, tiwei.bie, zhihong.wang
  Cc: dev, Stephen Hemminger, Stephen Hemminger

Since previous test is for mtu < 1519 the next else if
is always true. This causes the lgtm static tool to complain.
Not a real issue, just cosmetic.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
 drivers/net/netvsc/hn_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 6197118b01ee..8818d68cea5c 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -123,7 +123,7 @@ hn_update_packet_stats(struct hn_stats *stats, const struct rte_mbuf *m)
 			stats->size_bins[0]++;
 		else if (s < 1519)
 			stats->size_bins[6]++;
-		else if (s >= 1519)
+		else
 			stats->size_bins[7]++;
 	}
 
-- 
2.17.1


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

* [dpdk-dev] [PATCH 2/2] net/virtio: fix lgtm static checker complaint
  2019-03-27 21:08 [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Stephen Hemminger
  2019-03-27 21:08 ` Stephen Hemminger
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint Stephen Hemminger
@ 2019-03-27 21:08 ` Stephen Hemminger
  2019-03-27 21:08   ` Stephen Hemminger
                     ` (2 more replies)
  2019-03-28 17:11 ` [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Ferruh Yigit
  3 siblings, 3 replies; 14+ messages in thread
From: Stephen Hemminger @ 2019-03-27 21:08 UTC (permalink / raw)
  To: maxime.coquelin, tiwei.bie, zhihong.wang; +Cc: dev, Stephen Hemminger

Since previous test is for mtu < 1519 the next else if
is always true. This causes the lgtm static tool to complain.
Not a real issue, just cosmetic.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/virtio/virtio_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 5f6796bdba37..268fe3b8f156 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1110,7 +1110,7 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
 			stats->size_bins[0]++;
 		else if (s < 1519)
 			stats->size_bins[6]++;
-		else if (s >= 1519)
+		else
 			stats->size_bins[7]++;
 	}
 
-- 
2.17.1

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

* [dpdk-dev] [PATCH 2/2] net/virtio: fix lgtm static checker complaint
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 2/2] net/virtio: " Stephen Hemminger
@ 2019-03-27 21:08   ` Stephen Hemminger
  2019-03-28  0:28   ` Rami Rosen
  2019-03-28 11:04   ` Maxime Coquelin
  2 siblings, 0 replies; 14+ messages in thread
From: Stephen Hemminger @ 2019-03-27 21:08 UTC (permalink / raw)
  To: maxime.coquelin, tiwei.bie, zhihong.wang; +Cc: dev, Stephen Hemminger

Since previous test is for mtu < 1519 the next else if
is always true. This causes the lgtm static tool to complain.
Not a real issue, just cosmetic.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/virtio/virtio_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 5f6796bdba37..268fe3b8f156 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -1110,7 +1110,7 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
 			stats->size_bins[0]++;
 		else if (s < 1519)
 			stats->size_bins[6]++;
-		else if (s >= 1519)
+		else
 			stats->size_bins[7]++;
 	}
 
-- 
2.17.1


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

* Re: [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint Stephen Hemminger
  2019-03-27 21:08   ` Stephen Hemminger
@ 2019-03-28  0:25   ` Rami Rosen
  2019-03-28  0:25     ` Rami Rosen
  1 sibling, 1 reply; 14+ messages in thread
From: Rami Rosen @ 2019-03-28  0:25 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: maxime.coquelin, tiwei.bie, zhihong.wang, dev, Stephen Hemminger

Acked-by: Rami Rosen <ramirose@gmail.com>

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

* Re: [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint
  2019-03-28  0:25   ` Rami Rosen
@ 2019-03-28  0:25     ` Rami Rosen
  0 siblings, 0 replies; 14+ messages in thread
From: Rami Rosen @ 2019-03-28  0:25 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: maxime.coquelin, tiwei.bie, zhihong.wang, dev, Stephen Hemminger

Acked-by: Rami Rosen <ramirose@gmail.com>

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

* Re: [dpdk-dev] [PATCH 2/2] net/virtio: fix lgtm static checker complaint
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 2/2] net/virtio: " Stephen Hemminger
  2019-03-27 21:08   ` Stephen Hemminger
@ 2019-03-28  0:28   ` Rami Rosen
  2019-03-28  0:28     ` Rami Rosen
  2019-03-28 11:04   ` Maxime Coquelin
  2 siblings, 1 reply; 14+ messages in thread
From: Rami Rosen @ 2019-03-28  0:28 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: maxime.coquelin, tiwei.bie, zhihong.wang, dev

Acked-by: Rami Rosen <ramirose@gmail.com>

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

* Re: [dpdk-dev] [PATCH 2/2] net/virtio: fix lgtm static checker complaint
  2019-03-28  0:28   ` Rami Rosen
@ 2019-03-28  0:28     ` Rami Rosen
  0 siblings, 0 replies; 14+ messages in thread
From: Rami Rosen @ 2019-03-28  0:28 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: maxime.coquelin, tiwei.bie, zhihong.wang, dev

Acked-by: Rami Rosen <ramirose@gmail.com>

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

* Re: [dpdk-dev] [PATCH 2/2] net/virtio: fix lgtm static checker complaint
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 2/2] net/virtio: " Stephen Hemminger
  2019-03-27 21:08   ` Stephen Hemminger
  2019-03-28  0:28   ` Rami Rosen
@ 2019-03-28 11:04   ` Maxime Coquelin
  2019-03-28 11:04     ` Maxime Coquelin
  2 siblings, 1 reply; 14+ messages in thread
From: Maxime Coquelin @ 2019-03-28 11:04 UTC (permalink / raw)
  To: Stephen Hemminger, tiwei.bie, zhihong.wang; +Cc: dev



On 3/27/19 10:08 PM, Stephen Hemminger wrote:
> Since previous test is for mtu < 1519 the next else if
> is always true. This causes the lgtm static tool to complain.
> Not a real issue, just cosmetic.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>   drivers/net/virtio/virtio_rxtx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
> index 5f6796bdba37..268fe3b8f156 100644
> --- a/drivers/net/virtio/virtio_rxtx.c
> +++ b/drivers/net/virtio/virtio_rxtx.c
> @@ -1110,7 +1110,7 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
>   			stats->size_bins[0]++;
>   		else if (s < 1519)
>   			stats->size_bins[6]++;
> -		else if (s >= 1519)
> +		else
>   			stats->size_bins[7]++;
>   	}
>   
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* Re: [dpdk-dev] [PATCH 2/2] net/virtio: fix lgtm static checker complaint
  2019-03-28 11:04   ` Maxime Coquelin
@ 2019-03-28 11:04     ` Maxime Coquelin
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Coquelin @ 2019-03-28 11:04 UTC (permalink / raw)
  To: Stephen Hemminger, tiwei.bie, zhihong.wang; +Cc: dev



On 3/27/19 10:08 PM, Stephen Hemminger wrote:
> Since previous test is for mtu < 1519 the next else if
> is always true. This causes the lgtm static tool to complain.
> Not a real issue, just cosmetic.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>   drivers/net/virtio/virtio_rxtx.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
> index 5f6796bdba37..268fe3b8f156 100644
> --- a/drivers/net/virtio/virtio_rxtx.c
> +++ b/drivers/net/virtio/virtio_rxtx.c
> @@ -1110,7 +1110,7 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
>   			stats->size_bins[0]++;
>   		else if (s < 1519)
>   			stats->size_bins[6]++;
> -		else if (s >= 1519)
> +		else
>   			stats->size_bins[7]++;
>   	}
>   
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

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

* Re: [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes
  2019-03-27 21:08 [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Stephen Hemminger
                   ` (2 preceding siblings ...)
  2019-03-27 21:08 ` [dpdk-dev] [PATCH 2/2] net/virtio: " Stephen Hemminger
@ 2019-03-28 17:11 ` Ferruh Yigit
  2019-03-28 17:11   ` Ferruh Yigit
  3 siblings, 1 reply; 14+ messages in thread
From: Ferruh Yigit @ 2019-03-28 17:11 UTC (permalink / raw)
  To: Stephen Hemminger, maxime.coquelin, tiwei.bie, zhihong.wang; +Cc: dev

On 3/27/2019 9:08 PM, Stephen Hemminger wrote:
> Looks like the LGTM checker complains about condition
> checks that are always true.
> 
> Stephen Hemminger (2):
>   net/netvsc: fix lgtm static checker complaint
>   net/virtio: fix lgtm static checker complaint

Series applied to dpdk-next-net/master, thanks.

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

* Re: [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes
  2019-03-28 17:11 ` [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Ferruh Yigit
@ 2019-03-28 17:11   ` Ferruh Yigit
  0 siblings, 0 replies; 14+ messages in thread
From: Ferruh Yigit @ 2019-03-28 17:11 UTC (permalink / raw)
  To: Stephen Hemminger, maxime.coquelin, tiwei.bie, zhihong.wang; +Cc: dev

On 3/27/2019 9:08 PM, Stephen Hemminger wrote:
> Looks like the LGTM checker complains about condition
> checks that are always true.
> 
> Stephen Hemminger (2):
>   net/netvsc: fix lgtm static checker complaint
>   net/virtio: fix lgtm static checker complaint

Series applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2019-03-28 17:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 21:08 [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Stephen Hemminger
2019-03-27 21:08 ` Stephen Hemminger
2019-03-27 21:08 ` [dpdk-dev] [PATCH 1/2] net/netvsc: fix lgtm static checker complaint Stephen Hemminger
2019-03-27 21:08   ` Stephen Hemminger
2019-03-28  0:25   ` Rami Rosen
2019-03-28  0:25     ` Rami Rosen
2019-03-27 21:08 ` [dpdk-dev] [PATCH 2/2] net/virtio: " Stephen Hemminger
2019-03-27 21:08   ` Stephen Hemminger
2019-03-28  0:28   ` Rami Rosen
2019-03-28  0:28     ` Rami Rosen
2019-03-28 11:04   ` Maxime Coquelin
2019-03-28 11:04     ` Maxime Coquelin
2019-03-28 17:11 ` [dpdk-dev] [PATCH 0/2] minor lgtm warning fixes Ferruh Yigit
2019-03-28 17:11   ` Ferruh Yigit

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).