All of lore.kernel.org
 help / color / mirror / Atom feed
* DPAA: Software Portal selection for network interface
@ 2017-06-22 12:42 Sebastian Huber
  2017-06-22 14:48 ` Madalin-cristian Bucur
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Huber @ 2017-06-22 12:42 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Madalin Bucur

Hello,

as far as I understand the software portal selection for a network=20
interface is done in

static int dpaa_eth_probe(struct platform_device *pdev)
{
     [...]
     channel =3D dpaa_get_channel();
     if (channel < 0) {
         dev_err(dev, "dpaa_get_channel() failed\n");
         err =3D channel;
         goto get_channel_failed;
     }

     priv->channel =3D (u16)channel;

     /* Start a thread that will walk the CPUs with affine portals
      * and add this pool channel to each's dequeue mask.
      */
     dpaa_eth_add_channel(priv->channel);

with

static int dpaa_get_channel(void)
{
     spin_lock(&rx_pool_channel_init);
     if (!rx_pool_channel) {
         u32 pool;
         int ret;

         ret =3D qman_alloc_pool(&pool);

         if (!ret)
             rx_pool_channel =3D pool;
     }
     spin_unlock(&rx_pool_channel_init);
     if (!rx_pool_channel)
         return -ENOMEM;
     return rx_pool_channel;
}

which always returns the same pool channel (e.g. 0x401) if successful.

This means all the QMan portal_isr() are distributed round-robin to all=20
affine portals. Is there some way to configure the software portal for a=20
specific network interface, e.g. use processors 0, 1, 2, 3 for one=20
interface,and 4, 5, 6, 7 for another?

--=20
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG=
.

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

* RE: DPAA: Software Portal selection for network interface
  2017-06-22 12:42 DPAA: Software Portal selection for network interface Sebastian Huber
@ 2017-06-22 14:48 ` Madalin-cristian Bucur
  2017-06-23  6:42   ` Sebastian Huber
  0 siblings, 1 reply; 3+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luZyBvbiBhbGwgQ1BVcy4NCg0KTWVhbndoaWxlLCB3
b3VsZCBSUFMgKFJlY2VpdmUgUGFja2V0IFN0ZWVyaW5nKSBiZSBhIHNvbHV0aW9uIGZvciB5b3U/
DQoNCj4gLS0NCj4gU2ViYXN0aWFuIEh1YmVyLCBlbWJlZGRlZCBicmFpbnMgR21iSA0KPiANCj4g
QWRkcmVzcyA6IERvcm5pZXJzdHIuIDQsIEQtODIxNzggUHVjaGhlaW0sIEdlcm1hbnkNCj4gUGhv
bmUgICA6ICs0OSA4OSAxODkgNDcgNDEtMTYNCj4gRmF4ICAgICA6ICs0OSA4OSAxODkgNDcgNDEt
MDkNCj4gRS1NYWlsICA6IHNlYmFzdGlhbi5odWJlckBlbWJlZGRlZC1icmFpbnMuZGUNCj4gUEdQ
ICAgICA6IFB1YmxpYyBrZXkgYXZhaWxhYmxlIG9uIHJlcXVlc3QuDQo+IA0KPiBEaWVzZSBOYWNo
cmljaHQgaXN0IGtlaW5lIGdlc2Now6RmdGxpY2hlIE1pdHRlaWx1bmcgaW0gU2lubmUgZGVzIEVI
VUcuDQoNCg0KUmVnYXJkcywNCk1hZGFsaW4NCg==

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

* Re: DPAA: Software Portal selection for network interface
  2017-06-22 14:48 ` Madalin-cristian Bucur
@ 2017-06-23  6:42   ` Sebastian Huber
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Huber @ 2017-06-23  6:42 UTC (permalink / raw)
  To: Madalin-cristian Bucur, linuxppc-dev

On 22/06/17 16:48, Madalin-cristian Bucur wrote:

>> This means all the QMan portal_isr() are distributed round-robin to al=
l
>> affine portals. Is there some way to configure the software portal for=
 a
>> specific network interface, e.g. use processors 0, 1, 2, 3 for one
>> interface,and 4, 5, 6, 7 for another?
> We've stripped all configurability and advanced features from the initi=
al
> DPAA submission. We don't have options to configure this. On the other =
hand,
> the ingress queues are held active in the portal, resulting in one CPU =
doing
> dequeues while there are frames available. This is done to avoid frame
> reordering, improving termination performance (and forwarded TCP perfor=
mance).
>
> The downside is that we're not saturating all CPUs with traffic. We're
> currently working on adding Rx hashing, to be able to maintain intra-fl=
ow
> frame order while spreading processing on all CPUs.
>
> Meanwhile, would RPS (Receive Packet Steering) be a solution for you?
>

We receive UDP packets with an MTU of 1500 on one of the 10G interfaces=20
at wire speed. So, I guess I have to add this configure myself somehow=20
and use a dedicated software portal for this interface.

--=20
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine gesch=C3=A4ftliche Mitteilung im Sinne des EHUG=
.

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

end of thread, other threads:[~2017-06-23  6:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-22 12:42 DPAA: Software Portal selection for network interface Sebastian Huber
2017-06-22 14:48 ` Madalin-cristian Bucur
2017-06-23  6:42   ` Sebastian Huber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.