patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break
@ 2020-05-02 16:10 pbhagavatula
  2020-05-04  9:17 ` Harman Kalra
  0 siblings, 1 reply; 4+ messages in thread
From: pbhagavatula @ 2020-05-02 16:10 UTC (permalink / raw)
  To: jerinj, ferruh.yigit, Harman Kalra; +Cc: thomas, dev, Pavan Nikhilesh, stable

From: Pavan Nikhilesh <pbhagavatula@marvell.com>

GCC 9.1 fixes a bug with passing bitfields as pass by value in function
parameters and generates a warning for the same as below:

drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1

Fix the warning generated by passing bitfield as pass by reference.

Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
More info on GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=c590597c45948c6e6fa282878198fd226da95998

 drivers/common/octeontx/octeontx_mbox.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c
index 2fd253107..effe0b267 100644
--- a/drivers/common/octeontx/octeontx_mbox.c
+++ b/drivers/common/octeontx/octeontx_mbox.c
@@ -279,7 +279,7 @@ octeontx_start_domain(void)
 }

 static int
-octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
+octeontx_check_mbox_version(struct mbox_intf_ver *app_intf_ver,
 			    struct mbox_intf_ver *intf_ver)
 {
 	struct mbox_intf_ver kernel_intf_ver = {0};
@@ -290,8 +290,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 	hdr.coproc = NO_COPROC;
 	hdr.msg = RM_INTERFACE_VERSION;

-	result = octeontx_mbox_send(&hdr, &app_intf_ver, sizeof(app_intf_ver),
-			&kernel_intf_ver, sizeof(kernel_intf_ver));
+	result = octeontx_mbox_send(&hdr, app_intf_ver,
+				    sizeof(struct mbox_intf_ver),
+				    &kernel_intf_ver, sizeof(kernel_intf_ver));
 	if (result != sizeof(kernel_intf_ver)) {
 		mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
 			     result, hdr.res_code);
@@ -301,9 +302,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 	if (intf_ver)
 		*intf_ver = kernel_intf_ver;

-	if (app_intf_ver.platform != kernel_intf_ver.platform ||
-			app_intf_ver.major != kernel_intf_ver.major ||
-			app_intf_ver.minor != kernel_intf_ver.minor)
+	if (app_intf_ver->platform != kernel_intf_ver.platform ||
+			app_intf_ver->major != kernel_intf_ver.major ||
+			app_intf_ver->minor != kernel_intf_ver.minor)
 		result = -EINVAL;

 	return result;
@@ -312,7 +313,7 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
 int
 octeontx_mbox_init(void)
 {
-	const struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
+	struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
 		.platform = 0x01,
 		.major = 0x01,
 		.minor = 0x03
@@ -330,7 +331,7 @@ octeontx_mbox_init(void)
 		return ret;
 	}

-	ret = octeontx_check_mbox_version(MBOX_INTERFACE_VERSION,
+	ret = octeontx_check_mbox_version(&MBOX_INTERFACE_VERSION,
 					  &rm_intf_ver);
 	if (ret < 0) {
 		mbox_log_err("MBOX version: Kernel(%d.%d.%d) != DPDK(%d.%d.%d)",
--
2.26.2


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break
  2020-05-02 16:10 [dpdk-stable] [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break pbhagavatula
@ 2020-05-04  9:17 ` Harman Kalra
  2020-05-05 10:33   ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Harman Kalra @ 2020-05-04  9:17 UTC (permalink / raw)
  To: pbhagavatula; +Cc: jerinj, ferruh.yigit, thomas, dev, stable

On Sat, May 02, 2020 at 09:40:31PM +0530, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> GCC 9.1 fixes a bug with passing bitfields as pass by value in function
> parameters and generates a warning for the same as below:
> 
> drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
> for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1
> 
> Fix the warning generated by passing bitfield as pass by reference.
> 
> Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Acked-by: Harman Kalra <hkalra@marvell.com>

> ---
> More info on GCC bug
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88469
> https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=c590597c45948c6e6fa282878198fd226da95998
> 
>  drivers/common/octeontx/octeontx_mbox.c | 17 +++++++++--------
>  1 file changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/common/octeontx/octeontx_mbox.c b/drivers/common/octeontx/octeontx_mbox.c
> index 2fd253107..effe0b267 100644
> --- a/drivers/common/octeontx/octeontx_mbox.c
> +++ b/drivers/common/octeontx/octeontx_mbox.c
> @@ -279,7 +279,7 @@ octeontx_start_domain(void)
>  }
> 
>  static int
> -octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
> +octeontx_check_mbox_version(struct mbox_intf_ver *app_intf_ver,
>  			    struct mbox_intf_ver *intf_ver)
>  {
>  	struct mbox_intf_ver kernel_intf_ver = {0};
> @@ -290,8 +290,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
>  	hdr.coproc = NO_COPROC;
>  	hdr.msg = RM_INTERFACE_VERSION;
> 
> -	result = octeontx_mbox_send(&hdr, &app_intf_ver, sizeof(app_intf_ver),
> -			&kernel_intf_ver, sizeof(kernel_intf_ver));
> +	result = octeontx_mbox_send(&hdr, app_intf_ver,
> +				    sizeof(struct mbox_intf_ver),
> +				    &kernel_intf_ver, sizeof(kernel_intf_ver));
>  	if (result != sizeof(kernel_intf_ver)) {
>  		mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
>  			     result, hdr.res_code);
> @@ -301,9 +302,9 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
>  	if (intf_ver)
>  		*intf_ver = kernel_intf_ver;
> 
> -	if (app_intf_ver.platform != kernel_intf_ver.platform ||
> -			app_intf_ver.major != kernel_intf_ver.major ||
> -			app_intf_ver.minor != kernel_intf_ver.minor)
> +	if (app_intf_ver->platform != kernel_intf_ver.platform ||
> +			app_intf_ver->major != kernel_intf_ver.major ||
> +			app_intf_ver->minor != kernel_intf_ver.minor)
>  		result = -EINVAL;
> 
>  	return result;
> @@ -312,7 +313,7 @@ octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
>  int
>  octeontx_mbox_init(void)
>  {
> -	const struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
> +	struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
>  		.platform = 0x01,
>  		.major = 0x01,
>  		.minor = 0x03
> @@ -330,7 +331,7 @@ octeontx_mbox_init(void)
>  		return ret;
>  	}
> 
> -	ret = octeontx_check_mbox_version(MBOX_INTERFACE_VERSION,
> +	ret = octeontx_check_mbox_version(&MBOX_INTERFACE_VERSION,
>  					  &rm_intf_ver);
>  	if (ret < 0) {
>  		mbox_log_err("MBOX version: Kernel(%d.%d.%d) != DPDK(%d.%d.%d)",
> --
> 2.26.2
> 

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break
  2020-05-04  9:17 ` Harman Kalra
@ 2020-05-05 10:33   ` Ferruh Yigit
  2020-05-06 21:51     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2020-05-05 10:33 UTC (permalink / raw)
  To: Harman Kalra, pbhagavatula; +Cc: jerinj, thomas, dev, stable

On 5/4/2020 10:17 AM, Harman Kalra wrote:
> On Sat, May 02, 2020 at 09:40:31PM +0530, pbhagavatula@marvell.com wrote:
>> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>>
>> GCC 9.1 fixes a bug with passing bitfields as pass by value in function
>> parameters and generates a warning for the same as below:
>>
>> drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
>> for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1
>>
>> Fix the warning generated by passing bitfield as pass by reference.
>>
>> Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> 
> Acked-by: Harman Kalra <hkalra@marvell.com>
> 

Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break
  2020-05-05 10:33   ` Ferruh Yigit
@ 2020-05-06 21:51     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-05-06 21:51 UTC (permalink / raw)
  To: pbhagavatula; +Cc: Harman Kalra, stable, jerinj, dev, Ferruh Yigit

05/05/2020 12:33, Ferruh Yigit:
> On 5/4/2020 10:17 AM, Harman Kalra wrote:
> > On Sat, May 02, 2020 at 09:40:31PM +0530, pbhagavatula@marvell.com wrote:
> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >>
> >> GCC 9.1 fixes a bug with passing bitfields as pass by value in function
> >> parameters and generates a warning for the same as below:
> >>
> >> drivers/common/octeontx/octeontx_mbox.c:282:1: note: parameter passing
> >> for argument of type ‘struct mbox_intf_ver’ changed in GCC 9.1
> >>
> >> Fix the warning generated by passing bitfield as pass by reference.
> >>
> >> Fixes: b4134b2d31cc ("common/octeontx: update mbox to version 1.1.3")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> > 
> > Acked-by: Harman Kalra <hkalra@marvell.com>
> 
> Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks



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

end of thread, other threads:[~2020-05-06 21:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-02 16:10 [dpdk-stable] [dpdk-dev] [PATCH] common/octeontx: fix GCC 9.1 ABI break pbhagavatula
2020-05-04  9:17 ` Harman Kalra
2020-05-05 10:33   ` Ferruh Yigit
2020-05-06 21:51     ` Thomas Monjalon

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