[v3,5/5] net/cxgbe: use rte macro instead of GCC attribute

Message ID 1709763287-10713-6-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series use rte macros instead of GCC __attribute |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Tyler Retzlaff March 6, 2024, 10:14 p.m. UTC
  Use existing __rte_may_alias macro from rte_common.h instead of
directly using __attribute__((__may_alias__)).

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 drivers/net/cxgbe/base/common.h  | 2 +-
 drivers/net/cxgbe/base/t4_hw.c   | 2 +-
 drivers/net/cxgbe/base/t4vf_hw.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
  

Comments

Morten Brørup March 6, 2024, 10:42 p.m. UTC | #1
> From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com]
> Sent: Wednesday, 6 March 2024 23.15
> 
> Use existing __rte_may_alias macro from rte_common.h instead of
> directly using __attribute__((__may_alias__)).
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---

Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
  
David Marchand June 12, 2024, 8:16 a.m. UTC | #2
Hello,

On Wed, Mar 6, 2024 at 11:14 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> Use existing __rte_may_alias macro from rte_common.h instead of
> directly using __attribute__((__may_alias__)).
>
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  drivers/net/cxgbe/base/common.h  | 2 +-
>  drivers/net/cxgbe/base/t4_hw.c   | 2 +-
>  drivers/net/cxgbe/base/t4vf_hw.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Adding cxgbe maintainer.

This patch is touching base/ driver code.
Rahul, is this change ok for you?
  
David Marchand June 13, 2024, 1:44 p.m. UTC | #3
Hello Rahul,

On Wed, Jun 12, 2024 at 10:16 AM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Wed, Mar 6, 2024 at 11:14 PM Tyler Retzlaff
> <roretzla@linux.microsoft.com> wrote:
> >
> > Use existing __rte_may_alias macro from rte_common.h instead of
> > directly using __attribute__((__may_alias__)).
> >
> > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> > ---
> >  drivers/net/cxgbe/base/common.h  | 2 +-
> >  drivers/net/cxgbe/base/t4_hw.c   | 2 +-
> >  drivers/net/cxgbe/base/t4vf_hw.c | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
>
> Adding cxgbe maintainer.
>
> This patch is touching base/ driver code.
> Rahul, is this change ok for you?

I got a bounce on the previous mail.
Trying again.
  
David Marchand June 13, 2024, 2:05 p.m. UTC | #4
On Thu, Jun 13, 2024 at 3:44 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> On Wed, Jun 12, 2024 at 10:16 AM David Marchand
> <david.marchand@redhat.com> wrote:
> >
> > On Wed, Mar 6, 2024 at 11:14 PM Tyler Retzlaff
> > <roretzla@linux.microsoft.com> wrote:
> > >
> > > Use existing __rte_may_alias macro from rte_common.h instead of
> > > directly using __attribute__((__may_alias__)).
> > >
> > > Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> > > ---
> > >  drivers/net/cxgbe/base/common.h  | 2 +-
> > >  drivers/net/cxgbe/base/t4_hw.c   | 2 +-
> > >  drivers/net/cxgbe/base/t4vf_hw.c | 2 +-
> > >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > Adding cxgbe maintainer.
> >
> > This patch is touching base/ driver code.
> > Rahul, is this change ok for you?
>
> I got a bounce on the previous mail.
> Trying again.

So again, no luck.
I tried to contact some people at chelsio.

I'll keep this patch on hold for now but apply the rest of the series.
  

Patch

diff --git a/drivers/net/cxgbe/base/common.h b/drivers/net/cxgbe/base/common.h
index 4482ddb..8dc7fab 100644
--- a/drivers/net/cxgbe/base/common.h
+++ b/drivers/net/cxgbe/base/common.h
@@ -428,7 +428,7 @@  static inline unsigned int core_ticks_to_us(const struct adapter *adapter,
 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
 			    int size, void *rpl, bool sleep_ok, int timeout);
 int t4_wr_mbox_meat(struct adapter *adap, int mbox,
-		    const void __attribute__((__may_alias__)) *cmd, int size,
+		    const void __rte_may_alias *cmd, int size,
 		    void *rpl, bool sleep_ok);
 
 static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox,
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index bed755f..d02da39 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -291,7 +291,7 @@  static void fw_asrt(struct adapter *adap, u32 mbox_addr)
  * the return value is the error code indicated by FW (negated).
  */
 int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox,
-			    const void __attribute__((__may_alias__)) *cmd,
+			    const void __rte_may_alias *cmd,
 			    int size, void *rpl, bool sleep_ok, int timeout)
 {
 	/*
diff --git a/drivers/net/cxgbe/base/t4vf_hw.c b/drivers/net/cxgbe/base/t4vf_hw.c
index 46d24a6..573ccb1 100644
--- a/drivers/net/cxgbe/base/t4vf_hw.c
+++ b/drivers/net/cxgbe/base/t4vf_hw.c
@@ -68,7 +68,7 @@  static void get_mbox_rpl(struct adapter *adap, __be64 *rpl, int nflit,
  * the return value is the error code indicated by FW (negated).
  */
 int t4vf_wr_mbox_core(struct adapter *adapter,
-		      const void __attribute__((__may_alias__)) *cmd,
+		      const void __rte_may_alias *cmd,
 		      int size, void *rpl, bool sleep_ok)
 {
 	/*