#3277 closed enhancement (fixed)

QorIQ: Add MAC-less DPAA driver to libbsd

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: network/libbsd Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

The SDK Linux DPAA driver supports a so called MAC-less interface driver. This driver allows Ethernet communication between guest systems of a hypervisor.

Change History (21)

comment:1 Changed on 01/23/18 at 13:57:00 by Sebastian Huber <sebastian.huber@…>

In fe05886/rtems-libbsd:

linux/compiler.h: Define cold

Update #3277.

comment:2 Changed on 01/23/18 at 13:57:09 by Sebastian Huber <sebastian.huber@…>

In 583216a/rtems-libbsd:

linux/smp.h: Avoid function call overhead

Update #3277.

comment:3 Changed on 01/23/18 at 13:57:19 by Sebastian Huber <sebastian.huber@…>

In 066b536/rtems-libbsd:

linux/sort.h: New file

Update #3277.

comment:4 Changed on 01/23/18 at 13:57:28 by Sebastian Huber <sebastian.huber@…>

In 0d421d8/rtems-libbsd:

linux/of.h: Add of_n_addr_cells()

Update #3277.

comment:5 Changed on 01/23/18 at 13:57:38 by Sebastian Huber <sebastian.huber@…>

In 26ce2ac/rtems-libbsd:

linux/of.h: Add of_n_size_cells()

Update #3277.

comment:6 Changed on 01/23/18 at 13:57:47 by Sebastian Huber <sebastian.huber@…>

In 44fca38/rtems-libbsd:

linux/of.h: Add of_read_number()

Update #3277.

comment:7 Changed on 01/23/18 at 13:57:57 by Sebastian Huber <sebastian.huber@…>

In 81fc57d/rtems-libbsd:

linux/of.h: Add of_find_node_by_path()

Update #3277.

comment:8 Changed on 01/23/18 at 13:58:06 by Sebastian Huber <sebastian.huber@…>

In 0f1d2f6/rtems-libbsd:

linux/of_address.h: Add of_translate_address()

Update #3277.

comment:9 Changed on 01/23/18 at 13:58:16 by Sebastian Huber <sebastian.huber@…>

In e4923c8/rtems-libbsd:

linux/of_address.h: of_address_to_resource()

Translate address in of_address_to_resource().

Update #3277.

comment:10 Changed on 01/23/18 at 13:58:25 by Sebastian Huber <sebastian.huber@…>

In cfc149b/rtems-libbsd:

linux/of_irq.h: Generalize of_irq_to_resource()

Determine interrupt cells via device tree.

Update #3277.

comment:11 Changed on 01/23/18 at 13:58:35 by Sebastian Huber <sebastian.huber@…>

In 2fba1e4/rtems-libbsd:

dpaa: Remove unused configuration defines

Update #3277.

comment:12 Changed on 01/23/18 at 13:58:44 by Sebastian Huber <sebastian.huber@…>

In bdf99316/rtems-libbsd:

dpaa: Disable unused bman_pool members

Update #3277.

comment:13 Changed on 01/23/18 at 13:58:54 by Sebastian Huber <sebastian.huber@…>

In 34b7ccc/rtems-libbsd:

dpaa: Support FQ_TYPE_RX_PCD

Update #3277.

comment:14 Changed on 01/23/18 at 13:59:03 by Sebastian Huber <sebastian.huber@…>

In 1342fad/rtems-libbsd:

dpaa: Add and use SDK_DPAA_COMPAT_STATIC

Update #3277.

comment:15 Changed on 01/23/18 at 13:59:12 by Sebastian Huber <sebastian.huber@…>

In 95fe5b1/rtems-libbsd:

dpaa: Use device tree throughout in BMan init

Update #3277.

comment:16 Changed on 01/23/18 at 13:59:22 by Sebastian Huber <sebastian.huber@…>

In a7d252c/rtems-libbsd:

dpaa: Add and use bman_new_pool_for_bpid()

Update #3277.

comment:17 Changed on 01/23/18 at 13:59:32 by Sebastian Huber <sebastian.huber@…>

In 0f6ff4a/rtems-libbsd:

dpaa: QMan portal only initialization

Update #3277.

comment:18 Changed on 01/23/18 at 13:59:41 by Sebastian Huber <sebastian.huber@…>

In f5ed3aa/rtems-libbsd:

sdk_dpaa: Import from QorIQ SDK Linux

http://git.freescale.com/git/cgit.cgi/ppc/sdk/linux.git

Commit 1ae843c08261402b2c35d83422e4fa1e313611f4 (fsl-sdk-v2.0-1703).

Update #3277.

comment:19 Changed on 01/23/18 at 13:59:51 by Sebastian Huber <sebastian.huber@…>

In d62a3df/rtems-libbsd:

sdk_dpaa: Port to RTEMS

Update #3277.

comment:20 Changed on 01/23/18 at 14:00:00 by Sebastian Huber <sebastian.huber@…>

In 327f4e1/rtems-libbsd:

sdk_dpaa: What to do with tail queue drop?

The issue is this:

static int dpaa_eth_macless_probe(struct platform_device *_of_dev)
{
[...]

INIT_LIST_HEAD(&priv->dpa_fq_list);

err = dpa_fq_probe_macless(dev, &priv->dpa_fq_list, RX);
if (!err)

err = dpa_fq_probe_macless(dev, &priv->dpa_fq_list,

TX);

if (err < 0)

goto fq_probe_failed;

[...]

/* Add the FQs to the interface, and make them active */
/* For MAC-less devices we only get here for RX frame queues

  • initialization, which are the TX queues of the other
  • partition.
  • It is safe to rely on one partition to set the FQ taildrop
  • threshold for the TX queues of the other partition
  • because the ERN notifications will be received by the
  • partition doing qman_enqueue. */

err = dpa_fqs_init(dev, &priv->dpa_fq_list, true);
if (err < 0)

goto fq_alloc_failed;

[...]

The priv->dpa_fq_list contains a list of FQ_TYPE_RX_PCD and FQ_TYPE_TX
items. I don't understand what the "For MAC-less devices we only get
here for RX frame queues initialization" means in this context. The
td_enable == true in dpa_fqs_init(). So, we have:

int dpa_fq_init(struct dpa_fq *dpa_fq, bool td_enable)
{
[...]

if (dpa_fq->fq_type == FQ_TYPE_TX
dpa_fq->fq_type == FQ_TYPE_TX_CONFIRM

dpa_fq->fq_type == FQ_TYPE_TX_CONF_MQ) {

[...]

initfq.we_mask |= QM_INITFQ_WE_OAC;

[...]

}

if (td_enable) {

initfq.we_mask |= QM_INITFQ_WE_TDTHRESH;
qm_fqd_taildrop_set(&initfq.fqd.td,

DPA_FQ_TD, 1);

initfq.fqd.fq_ctrl = QM_FQCTRL_TDE;

}

The td_enable == true && dpa_fq->fq_type == FQ_TYPE_TX causes later:

int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts)
{
[...]

if (opts && (opts->we_mask & QM_INITFQ_WE_OAC)) {

/* And can't be set at the same time as TDTHRESH */
if (opts->we_mask & QM_INITFQ_WE_TDTHRESH)

return -EINVAL;

}

This aborts the initialization of the MAC-less driver. I don't
understand why this path doesn't happen on the SDK Linux system.

Update #3277.

comment:21 Changed on 02/05/18 at 10:41:20 by Sebastian Huber

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.