patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 1/2] common/sfc_efx/base: remove warnings about inline specifiers
@ 2020-11-30 22:02 Ivan Malov
  2020-11-30 22:02 ` [dpdk-stable] [PATCH 2/2] common/sfc_efx/base: fix signed/unsigned mismatch warnings Ivan Malov
  2020-12-01  7:24 ` [dpdk-stable] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ivan Malov
  0 siblings, 2 replies; 5+ messages in thread
From: Ivan Malov @ 2020-11-30 22:02 UTC (permalink / raw)
  To: dev; +Cc: stable, Andrew Rybchenko, Andy Moreton, Andrew Rybchenko

Windows build of the current libefx rejects these specifiers.
They're unneeded anyway; the compiler should decide inlining.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index ee0a3d319..cbc1cb28c 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -760,7 +760,7 @@ efx_mae_match_specs_equal(
 	    ((_mask)[(_bit) / (_mask_page_nbits)] &			\
 		    (1ULL << ((_bit) & ((_mask_page_nbits) - 1))))
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_prefix(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
@@ -780,7 +780,7 @@ efx_mask_is_prefix(
 	return B_TRUE;
 }
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_all_ones(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
@@ -794,7 +794,7 @@ efx_mask_is_all_ones(
 	return (t == (uint8_t)(~0));
 }
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_all_zeros(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
-- 
2.20.1


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

* [dpdk-stable] [PATCH 2/2] common/sfc_efx/base: fix signed/unsigned mismatch warnings
  2020-11-30 22:02 [dpdk-stable] [PATCH 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ivan Malov
@ 2020-11-30 22:02 ` Ivan Malov
  2020-12-01  7:24 ` [dpdk-stable] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ivan Malov
  1 sibling, 0 replies; 5+ messages in thread
From: Ivan Malov @ 2020-11-30 22:02 UTC (permalink / raw)
  To: dev; +Cc: stable, Andrew Rybchenko, Andy Moreton, Andrew Rybchenko

Fix signed/unsigned mismatch issues found by Windows build.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Fixes: bb71f7e0a35a ("common/sfc_efx/base: add match specs class comparison API")
Fixes: e9d5c5fb6872 ("common/sfc_efx/base: avoid reading past buffer")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index cbc1cb28c..2f5b16727 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -644,7 +644,7 @@ efx_mae_match_spec_field_set(
 		goto fail1;
 	}
 
-	if (field_id >= desc_set_nentries) {
+	if ((unsigned int)field_id >= desc_set_nentries) {
 		rc = EINVAL;
 		goto fail2;
 	}
@@ -844,7 +844,8 @@ efx_mae_match_spec_is_valid(
 	if (field_caps == NULL)
 		return (B_FALSE);
 
-	for (field_id = 0; field_id < desc_set_nentries; ++field_id) {
+	for (field_id = 0; (unsigned int)field_id < desc_set_nentries;
+	     ++field_id) {
 		const efx_mae_mv_desc_t *descp = &desc_setp[field_id];
 		efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id;
 		const uint8_t *m_buf = mvp + descp->emmd_mask_offset;
@@ -853,7 +854,7 @@ efx_mae_match_spec_is_valid(
 		if (m_size == 0)
 			continue; /* Skip array gap */
 
-		if (field_cap_id >= field_ncaps)
+		if ((unsigned int)field_cap_id >= field_ncaps)
 			break;
 
 		switch (field_caps[field_cap_id].emfc_support) {
@@ -1350,14 +1351,15 @@ efx_mae_match_specs_class_cmp(
 		return (0);
 	}
 
-	for (field_id = 0; field_id < desc_set_nentries; ++field_id) {
+	for (field_id = 0; (unsigned int)field_id < desc_set_nentries;
+	     ++field_id) {
 		const efx_mae_mv_desc_t *descp = &desc_setp[field_id];
 		efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id;
 
 		if (descp->emmd_mask_size == 0)
 			continue; /* Skip array gap */
 
-		if (field_cap_id >= field_ncaps)
+		if ((unsigned int)field_cap_id >= field_ncaps)
 			break;
 
 		if (field_caps[field_cap_id].emfc_mask_affects_class) {
-- 
2.20.1


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

* [dpdk-stable] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers
  2020-11-30 22:02 [dpdk-stable] [PATCH 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ivan Malov
  2020-11-30 22:02 ` [dpdk-stable] [PATCH 2/2] common/sfc_efx/base: fix signed/unsigned mismatch warnings Ivan Malov
@ 2020-12-01  7:24 ` Ivan Malov
  2020-12-01  7:24   ` [dpdk-stable] [PATCH v2 2/2] common/sfc_efx/base: fix signed/unsigned mismatch warnings Ivan Malov
  2020-12-08 17:44   ` [dpdk-stable] [dpdk-dev] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ferruh Yigit
  1 sibling, 2 replies; 5+ messages in thread
From: Ivan Malov @ 2020-12-01  7:24 UTC (permalink / raw)
  To: dev; +Cc: stable, Andrew Rybchenko, Andy Moreton

Windows build of the current libefx rejects these specifiers.
They're unneeded anyway; the compiler should decide inlining.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index ee0a3d319..cbc1cb28c 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -760,7 +760,7 @@ efx_mae_match_specs_equal(
 	    ((_mask)[(_bit) / (_mask_page_nbits)] &			\
 		    (1ULL << ((_bit) & ((_mask_page_nbits) - 1))))
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_prefix(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
@@ -780,7 +780,7 @@ efx_mask_is_prefix(
 	return B_TRUE;
 }
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_all_ones(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
@@ -794,7 +794,7 @@ efx_mask_is_all_ones(
 	return (t == (uint8_t)(~0));
 }
 
-static inline				boolean_t
+static					boolean_t
 efx_mask_is_all_zeros(
 	__in				size_t mask_nbytes,
 	__in_bcount(mask_nbytes)	const uint8_t *maskp)
-- 
2.20.1


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

* [dpdk-stable] [PATCH v2 2/2] common/sfc_efx/base: fix signed/unsigned mismatch warnings
  2020-12-01  7:24 ` [dpdk-stable] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ivan Malov
@ 2020-12-01  7:24   ` Ivan Malov
  2020-12-08 17:44   ` [dpdk-stable] [dpdk-dev] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ferruh Yigit
  1 sibling, 0 replies; 5+ messages in thread
From: Ivan Malov @ 2020-12-01  7:24 UTC (permalink / raw)
  To: dev; +Cc: stable, Andrew Rybchenko, Andy Moreton

Fix signed/unsigned mismatch issues found by Windows build.

Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
Fixes: bb71f7e0a35a ("common/sfc_efx/base: add match specs class comparison API")
Fixes: e9d5c5fb6872 ("common/sfc_efx/base: avoid reading past buffer")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index cbc1cb28c..2f5b16727 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -644,7 +644,7 @@ efx_mae_match_spec_field_set(
 		goto fail1;
 	}
 
-	if (field_id >= desc_set_nentries) {
+	if ((unsigned int)field_id >= desc_set_nentries) {
 		rc = EINVAL;
 		goto fail2;
 	}
@@ -844,7 +844,8 @@ efx_mae_match_spec_is_valid(
 	if (field_caps == NULL)
 		return (B_FALSE);
 
-	for (field_id = 0; field_id < desc_set_nentries; ++field_id) {
+	for (field_id = 0; (unsigned int)field_id < desc_set_nentries;
+	     ++field_id) {
 		const efx_mae_mv_desc_t *descp = &desc_setp[field_id];
 		efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id;
 		const uint8_t *m_buf = mvp + descp->emmd_mask_offset;
@@ -853,7 +854,7 @@ efx_mae_match_spec_is_valid(
 		if (m_size == 0)
 			continue; /* Skip array gap */
 
-		if (field_cap_id >= field_ncaps)
+		if ((unsigned int)field_cap_id >= field_ncaps)
 			break;
 
 		switch (field_caps[field_cap_id].emfc_support) {
@@ -1350,14 +1351,15 @@ efx_mae_match_specs_class_cmp(
 		return (0);
 	}
 
-	for (field_id = 0; field_id < desc_set_nentries; ++field_id) {
+	for (field_id = 0; (unsigned int)field_id < desc_set_nentries;
+	     ++field_id) {
 		const efx_mae_mv_desc_t *descp = &desc_setp[field_id];
 		efx_mae_field_cap_id_t field_cap_id = descp->emmd_field_cap_id;
 
 		if (descp->emmd_mask_size == 0)
 			continue; /* Skip array gap */
 
-		if (field_cap_id >= field_ncaps)
+		if ((unsigned int)field_cap_id >= field_ncaps)
 			break;
 
 		if (field_caps[field_cap_id].emfc_mask_affects_class) {
-- 
2.20.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers
  2020-12-01  7:24 ` [dpdk-stable] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ivan Malov
  2020-12-01  7:24   ` [dpdk-stable] [PATCH v2 2/2] common/sfc_efx/base: fix signed/unsigned mismatch warnings Ivan Malov
@ 2020-12-08 17:44   ` Ferruh Yigit
  1 sibling, 0 replies; 5+ messages in thread
From: Ferruh Yigit @ 2020-12-08 17:44 UTC (permalink / raw)
  To: Ivan Malov, dev; +Cc: stable, Andrew Rybchenko, Andy Moreton

On 12/1/2020 7:24 AM, Ivan Malov wrote:
> Windows build of the current libefx rejects these specifiers.
> They're unneeded anyway; the compiler should decide inlining.
> 
> Fixes: 34285fd0891d ("common/sfc_efx/base: add match spec validate API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>

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


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

end of thread, other threads:[~2020-12-08 17:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 22:02 [dpdk-stable] [PATCH 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ivan Malov
2020-11-30 22:02 ` [dpdk-stable] [PATCH 2/2] common/sfc_efx/base: fix signed/unsigned mismatch warnings Ivan Malov
2020-12-01  7:24 ` [dpdk-stable] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers Ivan Malov
2020-12-01  7:24   ` [dpdk-stable] [PATCH v2 2/2] common/sfc_efx/base: fix signed/unsigned mismatch warnings Ivan Malov
2020-12-08 17:44   ` [dpdk-stable] [dpdk-dev] [PATCH v2 1/2] common/sfc_efx/base: remove warnings about inline specifiers 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).