[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-02 Thread Neil Horman
On Mon, Dec 01, 2014 at 10:55:29PM +0100, Olivier MATZ wrote: > Hi Neil, > > On 12/01/2014 06:16 PM, Neil Horman wrote: > >>> [...] > >>> > >>> Whats the advantage to keeping this warning? > >>> > >> The advantage is that it does exactly what it's meant to do. If someone > >> goes to > >> assign

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Olivier MATZ
Hi Neil, On 12/01/2014 06:16 PM, Neil Horman wrote: >>> [...] >>> >>> Whats the advantage to keeping this warning? >>> >> The advantage is that it does exactly what it's meant to do. If someone goes >> to >> assign l2_len = 128; somewhere, it will throw a warning. If someone goes to >> change >>

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Bruce Richardson
On Mon, Dec 01, 2014 at 11:35:28AM -0500, Neil Horman wrote: > On Mon, Dec 01, 2014 at 03:24:32PM +, Bruce Richardson wrote: > > On Mon, Dec 01, 2014 at 10:18:06AM -0500, Neil Horman wrote: > > > On Mon, Dec 01, 2014 at 02:36:46PM +, Bruce Richardson wrote: > > > > On Mon, Dec 01, 2014 at 0

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Bruce Richardson
On Mon, Dec 01, 2014 at 10:18:06AM -0500, Neil Horman wrote: > On Mon, Dec 01, 2014 at 02:36:46PM +, Bruce Richardson wrote: > > On Mon, Dec 01, 2014 at 09:25:44AM -0500, Neil Horman wrote: > > > On Mon, Dec 01, 2014 at 11:24:58AM +, Bruce Richardson wrote: > > > > On Mon, Dec 01, 2014 at 0

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Bruce Richardson
On Mon, Dec 01, 2014 at 09:25:44AM -0500, Neil Horman wrote: > On Mon, Dec 01, 2014 at 11:24:58AM +, Bruce Richardson wrote: > > On Mon, Dec 01, 2014 at 06:18:17AM -0500, Neil Horman wrote: > > > On Mon, Dec 01, 2014 at 10:09:38AM +0100, Olivier MATZ wrote: > > > > Hi Bruce, Hi Neil, > > > > >

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Neil Horman
On Mon, Dec 01, 2014 at 04:44:39PM +, Bruce Richardson wrote: > On Mon, Dec 01, 2014 at 11:35:28AM -0500, Neil Horman wrote: > > On Mon, Dec 01, 2014 at 03:24:32PM +, Bruce Richardson wrote: > > > On Mon, Dec 01, 2014 at 10:18:06AM -0500, Neil Horman wrote: > > > > On Mon, Dec 01, 2014 at 0

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Neil Horman
On Mon, Dec 01, 2014 at 03:24:32PM +, Bruce Richardson wrote: > On Mon, Dec 01, 2014 at 10:18:06AM -0500, Neil Horman wrote: > > On Mon, Dec 01, 2014 at 02:36:46PM +, Bruce Richardson wrote: > > > On Mon, Dec 01, 2014 at 09:25:44AM -0500, Neil Horman wrote: > > > > On Mon, Dec 01, 2014 at 1

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Bruce Richardson
On Mon, Dec 01, 2014 at 06:18:17AM -0500, Neil Horman wrote: > On Mon, Dec 01, 2014 at 10:09:38AM +0100, Olivier MATZ wrote: > > Hi Bruce, Hi Neil, > > > > On 11/30/2014 02:05 AM, Neil Horman wrote: > > > On Fri, Nov 28, 2014 at 03:31:00PM +, Bruce Richardson wrote: > > >> When compiling with

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Olivier MATZ
Hi Bruce, On 12/01/2014 10:48 AM, Bruce Richardson wrote: >> I found that the following code works: >> >> tx_offload_mask.l2_len |= ~0; >> >> (note the '|=' instead of '=') >> >> I would avoid to create a macro. What do you think? >> >> Regards, >> Olivier > > Nice one - cleanest solution th

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Neil Horman
On Mon, Dec 01, 2014 at 02:36:46PM +, Bruce Richardson wrote: > On Mon, Dec 01, 2014 at 09:25:44AM -0500, Neil Horman wrote: > > On Mon, Dec 01, 2014 at 11:24:58AM +, Bruce Richardson wrote: > > > On Mon, Dec 01, 2014 at 06:18:17AM -0500, Neil Horman wrote: > > > > On Mon, Dec 01, 2014 at 1

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Olivier MATZ
Hi Bruce, Hi Neil, On 11/30/2014 02:05 AM, Neil Horman wrote: > On Fri, Nov 28, 2014 at 03:31:00PM +, Bruce Richardson wrote: >> When compiling with clang, errors were being emitted due to truncation >> of values when assigning to the tx_offload_mask bit fields. >> >> dpdk.org/lib/librte_pmd_i

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Bruce Richardson
On Mon, Dec 01, 2014 at 10:09:38AM +0100, Olivier MATZ wrote: > Hi Bruce, Hi Neil, > > On 11/30/2014 02:05 AM, Neil Horman wrote: > > On Fri, Nov 28, 2014 at 03:31:00PM +, Bruce Richardson wrote: > >> When compiling with clang, errors were being emitted due to truncation > >> of values when as

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Neil Horman
On Mon, Dec 01, 2014 at 11:24:58AM +, Bruce Richardson wrote: > On Mon, Dec 01, 2014 at 06:18:17AM -0500, Neil Horman wrote: > > On Mon, Dec 01, 2014 at 10:09:38AM +0100, Olivier MATZ wrote: > > > Hi Bruce, Hi Neil, > > > > > > On 11/30/2014 02:05 AM, Neil Horman wrote: > > > > On Fri, Nov 28,

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-12-01 Thread Neil Horman
On Mon, Dec 01, 2014 at 10:09:38AM +0100, Olivier MATZ wrote: > Hi Bruce, Hi Neil, > > On 11/30/2014 02:05 AM, Neil Horman wrote: > > On Fri, Nov 28, 2014 at 03:31:00PM +, Bruce Richardson wrote: > >> When compiling with clang, errors were being emitted due to truncation > >> of values when as

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-11-29 Thread Neil Horman
On Fri, Nov 28, 2014 at 03:31:00PM +, Bruce Richardson wrote: > When compiling with clang, errors were being emitted due to truncation > of values when assigning to the tx_offload_mask bit fields. > > dpdk.org/lib/librte_pmd_ixgbe/ixgbe_rxtx.c:404:27: fatal error: implicit > truncation from '

[dpdk-dev] [PATCH] ixgbe: fix clang compile - remove truncation errors

2014-11-28 Thread Bruce Richardson
When compiling with clang, errors were being emitted due to truncation of values when assigning to the tx_offload_mask bit fields. dpdk.org/lib/librte_pmd_ixgbe/ixgbe_rxtx.c:404:27: fatal error: implicit truncation from 'int' to bitfield changes value from -1 to 127 [-Wbitfield-constant-conversi