RE: [PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in tx_data_offset

2017-10-27 Thread Bogdan Purcareata
> -Original Message-
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Friday, October 27, 2017 5:27 PM
> To: Bogdan Purcareata <bogdan.purcare...@nxp.com>
> Cc: Ruxandra Ioana Radulescu <ruxandra.radule...@nxp.com>;
> gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
> de...@driverdev.osuosl.org
> Subject: Re: [PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in
> tx_data_offset
> 
> 
> On Fri, Oct 27, 2017 at 02:11:34PM +, Bogdan Purcareata wrote:
> > When configuring the Tx buffer layout, the software annotation size is
> > mentioned, and MC accounts for it when configuring the frame
> > tx_data_offset. No need to handle it in the driver as well.
> >
> 
> The impact is that we allocate slightly less memory right?

Yes, 64B per frame.

Bogdan P.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in tx_data_offset

2017-10-27 Thread Bogdan Purcareata
> -Original Message-
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Friday, October 27, 2017 5:34 PM
> To: Bogdan Purcareata <bogdan.purcare...@nxp.com>
> Cc: Ruxandra Ioana Radulescu <ruxandra.radule...@nxp.com>;
> gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
> de...@driverdev.osuosl.org
> Subject: Re: [PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in
> tx_data_offset
> 
> On Fri, Oct 27, 2017 at 02:31:22PM +, Bogdan Purcareata wrote:
> > > -Original Message-
> > > From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> > > Sent: Friday, October 27, 2017 5:27 PM
> > > To: Bogdan Purcareata <bogdan.purcare...@nxp.com>
> > > Cc: Ruxandra Ioana Radulescu <ruxandra.radule...@nxp.com>;
> > > gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
> > > de...@driverdev.osuosl.org
> > > Subject: Re: [PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in
> > > tx_data_offset
> > >
> > >
> > > On Fri, Oct 27, 2017 at 02:11:34PM +, Bogdan Purcareata wrote:
> > > > When configuring the Tx buffer layout, the software annotation size is
> > > > mentioned, and MC accounts for it when configuring the frame
> > > > tx_data_offset. No need to handle it in the driver as well.
> > > >
> > >
> > > The impact is that we allocate slightly less memory right?
> >
> > Yes, 64B per frame.
> 
> Ok.  Cool.  Please put this kind of stuff in the changelog.  At first I
> thought it was maybe a buffer overflow just from reading what was in the
> email without looking at the code.

Okay, will update in v2.

Thank you!
Bogdan P.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in tx_data_offset

2017-10-27 Thread Dan Carpenter
On Fri, Oct 27, 2017 at 02:31:22PM +, Bogdan Purcareata wrote:
> > -Original Message-
> > From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> > Sent: Friday, October 27, 2017 5:27 PM
> > To: Bogdan Purcareata <bogdan.purcare...@nxp.com>
> > Cc: Ruxandra Ioana Radulescu <ruxandra.radule...@nxp.com>;
> > gre...@linuxfoundation.org; linux-ker...@vger.kernel.org;
> > de...@driverdev.osuosl.org
> > Subject: Re: [PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in
> > tx_data_offset
> > 
> > 
> > On Fri, Oct 27, 2017 at 02:11:34PM +, Bogdan Purcareata wrote:
> > > When configuring the Tx buffer layout, the software annotation size is
> > > mentioned, and MC accounts for it when configuring the frame
> > > tx_data_offset. No need to handle it in the driver as well.
> > >
> > 
> > The impact is that we allocate slightly less memory right?
> 
> Yes, 64B per frame.

Ok.  Cool.  Please put this kind of stuff in the changelog.  At first I
thought it was maybe a buffer overflow just from reading what was in the
email without looking at the code.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in tx_data_offset

2017-10-27 Thread Dan Carpenter

On Fri, Oct 27, 2017 at 02:11:34PM +, Bogdan Purcareata wrote:
> When configuring the Tx buffer layout, the software annotation size is
> mentioned, and MC accounts for it when configuring the frame
> tx_data_offset. No need to handle it in the driver as well.
> 

The impact is that we allocate slightly less memory right?

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/5] staging: fsl-dpaa2/eth: Don't account SWA in tx_data_offset

2017-10-27 Thread Bogdan Purcareata
When configuring the Tx buffer layout, the software annotation size is
mentioned, and MC accounts for it when configuring the frame
tx_data_offset. No need to handle it in the driver as well.

Signed-off-by: Bogdan Purcareata 
---
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c 
b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
index 92faaaf..d68c1f5 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c
@@ -1872,9 +1872,6 @@ static int setup_dpni(struct fsl_mc_device *ls_dev)
dev_warn(dev, "Tx data offset (%d) not a multiple of 64B\n",
 priv->tx_data_offset);
 
-   /* Accommodate software annotation space (SWA) */
-   priv->tx_data_offset += DPAA2_ETH_SWA_SIZE;
-
return 0;
 
 close:
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel