From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752901AbcKHH1k (ORCPT ); Tue, 8 Nov 2016 02:27:40 -0500 Received: from mail-db5eur01on0068.outbound.protection.outlook.com ([104.47.2.68]:5728 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752723AbcKHH1g (ORCPT ); Tue, 8 Nov 2016 02:27:36 -0500 From: Madalin-Cristian Bucur To: David Miller CC: "netdev@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "oss@buserror.net" , "ppc@mindchasers.com" , "joe@perches.com" , "pebolle@tiscali.nl" , "joakim.tjernlund@transmode.se" Subject: RE: [PATCH net-next v6 02/10] dpaa_eth: add support for DPAA Ethernet Thread-Topic: [PATCH net-next v6 02/10] dpaa_eth: add support for DPAA Ethernet Thread-Index: AQHSNUiNwT1IEjDDuEKEIZQjO6RoxqDHrqoAgAXcWyCAACkAAIAAB8Rg Date: Mon, 7 Nov 2016 16:32:16 +0000 Message-ID: References: <1478117854-8952-3-git-send-email-madalin.bucur@nxp.com> <20161103.155816.642712588084106823.davem@davemloft.net> <20161107.105500.43380129278294700.davem@davemloft.net> In-Reply-To: <20161107.105500.43380129278294700.davem@davemloft.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=madalin.bucur@nxp.com; x-originating-ip: [192.88.146.1] x-ms-office365-filtering-correlation-id: 8c59a012-3d75-4d41-21d0-08d4072ba2ed x-microsoft-exchange-diagnostics: 1;AM4PR04MB1602;7:SdTtnJnT0QPHVKfutZBDVesdVM5xqOuYfuv0eDczahpBLKxjq3IK3EpcK5OMNGX39gw3bqssyiAR5TfgzkfHb1v9ik8EsAqSIm4/bBAkmRGYrMW7qFQ6y3UPdgdp4lxsBm39MbznyIaFguqqDKaroUhrNR5ea71X+tLhOe4wJ7+FPIM9Pb/ccjHY2EAukZM7IEK8op/wuB8TJSVvTfzjXv+Df9qP5TmXUNJpxrzzZfM4h4VI0+ur0AVsxKee7oauyP/KeCZihvoTYtKqwxGjEIyI5PffHfmEuhiP7MjWdJSFX4d5yByWNIxhNgrc06KhPzK/AznTnCp7UaJr8y+Q75koADPNCdrZaOCyuF53C6w=;23:5Oh5k4/qT/5z4luSkHSPXBaYj4l+5C6311CRigA42D8JwtZPI3u2MJTEcoUFmsxgxcdYu+QHtHQXgQBViZWkxzpKcu5cJjD7ug22ZkkJ78KmlRXuFD0nsNYR5d6wmPboQFM41vDAPaVk+tcFSypux0wECclVwyz1QPjKMKALxl9OfzFMJzVYJIE5AerlpZUm x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM4PR04MB1602; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6045074)(6060229)(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6061226)(6046074);SRVR:AM4PR04MB1602;BCL:0;PCL:0;RULEID:;SRVR:AM4PR04MB1602; x-forefront-prvs: 0119DC3B5E x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(7916002)(189002)(13464003)(377454003)(199003)(105586002)(97736004)(305945005)(7736002)(8676002)(8936002)(74316002)(86362001)(66066001)(81166006)(50986999)(76176999)(54356999)(2906002)(81156014)(101416001)(11100500001)(9686002)(3660700001)(6116002)(93886004)(2900100001)(3280700002)(102836003)(189998001)(76576001)(6916009)(7696004)(19580405001)(2950100002)(110136003)(68736007)(106116001)(5660300001)(19580395003)(92566002)(7846002)(3846002)(33656002)(122556002)(4326007)(77096005)(5002640100001)(586003)(10400500002)(87936001)(106356001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR04MB1602;H:AM4PR04MB1604.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Nov 2016 16:32:16.3429 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR04MB1602 X-OriginatorOrg: nxp.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uA87Riwd005464 > -----Original Message----- > From: David Miller [mailto:davem@davemloft.net] > Sent: Monday, November 07, 2016 5:55 PM > > From: Madalin-Cristian Bucur > Date: Mon, 7 Nov 2016 15:43:26 +0000 > > >> From: David Miller [mailto:davem@davemloft.net] > >> Sent: Thursday, November 03, 2016 9:58 PM > >> > >> Why? By clearing this, you disallow an important fundamental way to do > >> performane testing, via pktgen. > > > > The Tx path in DPAA requires one to insert a back-pointer to the skb > into > > the Tx buffer. On the Tx confirmation path the back-pointer in the > buffer > > is used to release the skb. If Tx buffer is shared we'd alter the back- > pointer > > and leak/double free skbs. See also > > Then have your software state store an array of SKB pointers, one for each > TX ring entry, just like every other driver does. There is no Tx ring in DPAA. Frames are send out on QMan HW queues towards the FMan for Tx and then received back on Tx confirmation queues for cleanup. Array traversal would for sure cost more than using the back-pointer. Also, we can now process confirmations on a different core than the one doing Tx, we'd have to keep the arrays percpu and force the Tx conf on the same core. Or add locks. Madalin From mboxrd@z Thu Jan 1 00:00:00 1970 From: Madalin-Cristian Bucur Subject: RE: [PATCH net-next v6 02/10] dpaa_eth: add support for DPAA Ethernet Date: Mon, 7 Nov 2016 16:32:16 +0000 Message-ID: References: <1478117854-8952-3-git-send-email-madalin.bucur@nxp.com> <20161103.155816.642712588084106823.davem@davemloft.net> <20161107.105500.43380129278294700.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "pebolle@tiscali.nl" , "joakim.tjernlund@transmode.se" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ppc@mindchasers.com" , "oss@buserror.net" , "joe@perches.com" , "linuxppc-dev@lists.ozlabs.org" To: David Miller Return-path: In-Reply-To: <20161107.105500.43380129278294700.davem@davemloft.net> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: netdev.vger.kernel.org > -----Original Message----- > From: David Miller [mailto:davem@davemloft.net] > Sent: Monday, November 07, 2016 5:55 PM >=20 > From: Madalin-Cristian Bucur > Date: Mon, 7 Nov 2016 15:43:26 +0000 >=20 > >> From: David Miller [mailto:davem@davemloft.net] > >> Sent: Thursday, November 03, 2016 9:58 PM > >> > >> Why? By clearing this, you disallow an important fundamental way to d= o > >> performane testing, via pktgen. > > > > The Tx path in DPAA requires one to insert a back-pointer to the skb > into > > the Tx buffer. On the Tx confirmation path the back-pointer in the > buffer > > is used to release the skb. If Tx buffer is shared we'd alter the back- > pointer > > and leak/double free skbs. See also >=20 > Then have your software state store an array of SKB pointers, one for eac= h > TX ring entry, just like every other driver does. There is no Tx ring in DPAA. Frames are send out on QMan HW queues towards the FMan for Tx and then received back on Tx confirmation queues for cleanu= p. Array traversal would for sure cost more than using the back-pointer. Also, we can now process confirmations on a different core than the one doing Tx, we'd have to keep the arrays percpu and force the Tx conf on the same core. Or add locks. Madalin From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0080.outbound.protection.outlook.com [104.47.0.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tCHzC2ZBkzDvQv for ; Tue, 8 Nov 2016 03:32:23 +1100 (AEDT) From: Madalin-Cristian Bucur To: David Miller CC: "netdev@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" , "oss@buserror.net" , "ppc@mindchasers.com" , "joe@perches.com" , "pebolle@tiscali.nl" , "joakim.tjernlund@transmode.se" Subject: RE: [PATCH net-next v6 02/10] dpaa_eth: add support for DPAA Ethernet Date: Mon, 7 Nov 2016 16:32:16 +0000 Message-ID: References: <1478117854-8952-3-git-send-email-madalin.bucur@nxp.com> <20161103.155816.642712588084106823.davem@davemloft.net> <20161107.105500.43380129278294700.davem@davemloft.net> In-Reply-To: <20161107.105500.43380129278294700.davem@davemloft.net> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > -----Original Message----- > From: David Miller [mailto:davem@davemloft.net] > Sent: Monday, November 07, 2016 5:55 PM >=20 > From: Madalin-Cristian Bucur > Date: Mon, 7 Nov 2016 15:43:26 +0000 >=20 > >> From: David Miller [mailto:davem@davemloft.net] > >> Sent: Thursday, November 03, 2016 9:58 PM > >> > >> Why? By clearing this, you disallow an important fundamental way to d= o > >> performane testing, via pktgen. > > > > The Tx path in DPAA requires one to insert a back-pointer to the skb > into > > the Tx buffer. On the Tx confirmation path the back-pointer in the > buffer > > is used to release the skb. If Tx buffer is shared we'd alter the back- > pointer > > and leak/double free skbs. See also >=20 > Then have your software state store an array of SKB pointers, one for eac= h > TX ring entry, just like every other driver does. There is no Tx ring in DPAA. Frames are send out on QMan HW queues towards the FMan for Tx and then received back on Tx confirmation queues for cleanu= p. Array traversal would for sure cost more than using the back-pointer. Also, we can now process confirmations on a different core than the one doing Tx, we'd have to keep the arrays percpu and force the Tx conf on the same core. Or add locks. Madalin