DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH v1] net/idpf: avoid truncation of constant value
@ 2025-04-09 12:54 Praveen Shetty
  2025-04-09 14:27 ` Bruce Richardson
  0 siblings, 1 reply; 4+ messages in thread
From: Praveen Shetty @ 2025-04-09 12:54 UTC (permalink / raw)
  To: dev, bruce.richardson

Truncation of constant value compiler warning was reported in clang/msvc
compiler for the VIRTCHNL2_CAP_OEM bit setting.This is due to 64 bit number
is initialized in a 32 bit enum.VIRTCHNL2_CAP_OEM capability is not used in
the present dpdk code,so removing this bit setting from the dpdk to avoid
the truncation.

Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
---
 drivers/net/intel/idpf/base/virtchnl2.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/intel/idpf/base/virtchnl2.h b/drivers/net/intel/idpf/base/virtchnl2.h
index 3285a2b674..cf010c0504 100644
--- a/drivers/net/intel/idpf/base/virtchnl2.h
+++ b/drivers/net/intel/idpf/base/virtchnl2.h
@@ -265,8 +265,6 @@ enum virtchnl2_cap_other {
 	 * if a reserved bit is set in a standard completion's tag.
 	 */
 	VIRTCHNL2_CAP_MISS_COMPL_TAG		= BIT_ULL(20),
-	/* This must be the last capability */
-	VIRTCHNL2_CAP_OEM			= BIT_ULL(63),
 };
 
 /**
-- 
2.34.1


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

* Re: [PATCH v1] net/idpf: avoid truncation of constant value
  2025-04-09 12:54 [PATCH v1] net/idpf: avoid truncation of constant value Praveen Shetty
@ 2025-04-09 14:27 ` Bruce Richardson
  2025-04-11  6:52   ` David Marchand
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2025-04-09 14:27 UTC (permalink / raw)
  To: Praveen Shetty; +Cc: dev

On Wed, Apr 09, 2025 at 12:54:40PM +0000, Praveen Shetty wrote:
> Truncation of constant value compiler warning was reported in clang/msvc
> compiler for the VIRTCHNL2_CAP_OEM bit setting.This is due to 64 bit number
> is initialized in a 32 bit enum.VIRTCHNL2_CAP_OEM capability is not used in
> the present dpdk code,so removing this bit setting from the dpdk to avoid
> the truncation.

Please just watch spacing after punctuation in commit message. Will fix on
apply as necessary, no need for new revision to fix it.

> 
> Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
> ---
>  drivers/net/intel/idpf/base/virtchnl2.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/intel/idpf/base/virtchnl2.h b/drivers/net/intel/idpf/base/virtchnl2.h
> index 3285a2b674..cf010c0504 100644
> --- a/drivers/net/intel/idpf/base/virtchnl2.h
> +++ b/drivers/net/intel/idpf/base/virtchnl2.h
> @@ -265,8 +265,6 @@ enum virtchnl2_cap_other {
>  	 * if a reserved bit is set in a standard completion's tag.
>  	 */
>  	VIRTCHNL2_CAP_MISS_COMPL_TAG		= BIT_ULL(20),
> -	/* This must be the last capability */
> -	VIRTCHNL2_CAP_OEM			= BIT_ULL(63),
>  };
>  

Although technically perhaps not as good as [1], this avoids significant
divergence from the shared base code, while still fixing the core issue.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>


[1] https://patches.dpdk.org/project/dpdk/patch/1734537913-1159-1-git-send-email-andremue@linux.microsoft.com/


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

* Re: [PATCH v1] net/idpf: avoid truncation of constant value
  2025-04-09 14:27 ` Bruce Richardson
@ 2025-04-11  6:52   ` David Marchand
  2025-04-11 13:51     ` Andre Muezerie
  0 siblings, 1 reply; 4+ messages in thread
From: David Marchand @ 2025-04-11  6:52 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Praveen Shetty, dev, Andre Muezerie

On Wed, Apr 9, 2025 at 4:27 PM Bruce Richardson
<bruce.richardson@intel.com> wrote:
>
> On Wed, Apr 09, 2025 at 12:54:40PM +0000, Praveen Shetty wrote:
> > Truncation of constant value compiler warning was reported in clang/msvc
> > compiler for the VIRTCHNL2_CAP_OEM bit setting.This is due to 64 bit number
> > is initialized in a 32 bit enum.VIRTCHNL2_CAP_OEM capability is not used in
> > the present dpdk code,so removing this bit setting from the dpdk to avoid
> > the truncation.
>
> Please just watch spacing after punctuation in commit message. Will fix on
> apply as necessary, no need for new revision to fix it.
>
> >
> > Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
> > ---
> >  drivers/net/intel/idpf/base/virtchnl2.h | 2 --
> >  1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/net/intel/idpf/base/virtchnl2.h b/drivers/net/intel/idpf/base/virtchnl2.h
> > index 3285a2b674..cf010c0504 100644
> > --- a/drivers/net/intel/idpf/base/virtchnl2.h
> > +++ b/drivers/net/intel/idpf/base/virtchnl2.h
> > @@ -265,8 +265,6 @@ enum virtchnl2_cap_other {
> >        * if a reserved bit is set in a standard completion's tag.
> >        */
> >       VIRTCHNL2_CAP_MISS_COMPL_TAG            = BIT_ULL(20),
> > -     /* This must be the last capability */
> > -     VIRTCHNL2_CAP_OEM                       = BIT_ULL(63),
> >  };
> >
>
> Although technically perhaps not as good as [1], this avoids significant
> divergence from the shared base code, while still fixing the core issue.
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>
>
> [1] https://patches.dpdk.org/project/dpdk/patch/1734537913-1159-1-git-send-email-andremue@linux.microsoft.com/

LGTM.
I marked Andre patch as rejected.


-- 
David Marchand


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

* Re: [PATCH v1] net/idpf: avoid truncation of constant value
  2025-04-11  6:52   ` David Marchand
@ 2025-04-11 13:51     ` Andre Muezerie
  0 siblings, 0 replies; 4+ messages in thread
From: Andre Muezerie @ 2025-04-11 13:51 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, Praveen Shetty, dev

On Fri, Apr 11, 2025 at 08:52:12AM +0200, David Marchand wrote:
> On Wed, Apr 9, 2025 at 4:27 PM Bruce Richardson
> <bruce.richardson@intel.com> wrote:
> >
> > On Wed, Apr 09, 2025 at 12:54:40PM +0000, Praveen Shetty wrote:
> > > Truncation of constant value compiler warning was reported in clang/msvc
> > > compiler for the VIRTCHNL2_CAP_OEM bit setting.This is due to 64 bit number
> > > is initialized in a 32 bit enum.VIRTCHNL2_CAP_OEM capability is not used in
> > > the present dpdk code,so removing this bit setting from the dpdk to avoid
> > > the truncation.
> >
> > Please just watch spacing after punctuation in commit message. Will fix on
> > apply as necessary, no need for new revision to fix it.
> >
> > >
> > > Signed-off-by: Praveen Shetty <praveen.shetty@intel.com>
> > > ---
> > >  drivers/net/intel/idpf/base/virtchnl2.h | 2 --
> > >  1 file changed, 2 deletions(-)
> > >
> > > diff --git a/drivers/net/intel/idpf/base/virtchnl2.h b/drivers/net/intel/idpf/base/virtchnl2.h
> > > index 3285a2b674..cf010c0504 100644
> > > --- a/drivers/net/intel/idpf/base/virtchnl2.h
> > > +++ b/drivers/net/intel/idpf/base/virtchnl2.h
> > > @@ -265,8 +265,6 @@ enum virtchnl2_cap_other {
> > >        * if a reserved bit is set in a standard completion's tag.
> > >        */
> > >       VIRTCHNL2_CAP_MISS_COMPL_TAG            = BIT_ULL(20),
> > > -     /* This must be the last capability */
> > > -     VIRTCHNL2_CAP_OEM                       = BIT_ULL(63),
> > >  };
> > >
> >
> > Although technically perhaps not as good as [1], this avoids significant
> > divergence from the shared base code, while still fixing the core issue.
> >
> > Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> >
> >
> > [1] https://patches.dpdk.org/project/dpdk/patch/1734537913-1159-1-git-send-email-andremue@linux.microsoft.com/
> 
> LGTM.
> I marked Andre patch as rejected.
> 

I'm good with that. My main goal is to get this code to compile with MSVC.

> 
> -- 
> David Marchand

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

end of thread, other threads:[~2025-04-11 13:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-09 12:54 [PATCH v1] net/idpf: avoid truncation of constant value Praveen Shetty
2025-04-09 14:27 ` Bruce Richardson
2025-04-11  6:52   ` David Marchand
2025-04-11 13:51     ` Andre Muezerie

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