public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ioana Ciornei <ciorneiioana@gmail.com>
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
	corbet@lwn.net, Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: Re: [PATCH net-next] docs: networking: dpaa2: add documentation for the switch driver
Date: Thu, 22 Jul 2021 16:27:22 +0200	[thread overview]
Message-ID: <YPmASiX46tOjUOe/@lunn.ch> (raw)
In-Reply-To: <20210722132735.685606-1-ciorneiioana@gmail.com>

> +At the moment, the dpaa2-switch driver imposes the following restrictions on
> +the DPSW object that it will probe:
> +
> + * The maximum number of FDBs should be at least equal to the number of switch
> +   interfaces.

Should maximum actually be minimum?

This is necessary so that separation of switch ports can be
> +   done, ie when not under a bridge, each switch port will have its own FDB.
> +
> + * Both the broadcast and flooding configuration should be per FDB. This
> +   enables the driver to restrict the broadcast and flooding domains of each
> +   FDB depending on the switch ports that are sharing it (aka are under the
> +   same bridge).
> +
> + * The control interface of the switch should not be disabled
> +   (DPSW_OPT_CTRL_IF_DIS not passed as a create time option). Without the
> +   control interface, the driver is not capable to provide proper Rx/Tx traffic
> +   support on the switch port netdevices.
> +
> +Besides the configuration of the actual DPSW object, the dpaa2-switch driver
> +will need the following DPAA2 objects:
> +
> + * 1 DPMCP - A Management Command Portal object is needed for any interraction
> +   with the MC firmware.
> +
> + * 1 DPBP - A Buffer Pool is used for seeding buffers intended for the Rx path
> +   on the control interface.
> +
> + * Access to at least one DPIO object (Software Portal) is needed for any
> +   enqueue/dequeue operation to be performed on the control interface queues.
> +   The DPIO object will be shared, no need for a private one.

Are these requirements tested? Will the driver fail probe if they are
not met?

> +Routing actions (redirect, trap, drop)
> +--------------------------------------
> +
> +The DPAA2 switch is able to offload flow-based redirection of packets making
> +use of ACL tables. Shared filter blocks are supported by sharing a single ACL
> +table between multiple ports.
> +
> +The following flow keys are supported:
> +
> + * Ethernet: dst_mac/src_mac
> + * IPv4: dst_ip/src_ip/ip_proto/tos
> + * VLAN: vlan_id/vlan_prio/vlan_tpid/vlan_dei
> + * L4: dst_port/src_port
> +
> +Also, the matchall filter can be used to redirect the entire traffic received
> +on a port.
> +
> +As per flow actions, the following are supported:
> +
> + * drop
> + * mirred egress redirect
> + * trap
> +
> +Each ACL entry (filter) can be setup with only one of the listed
> +actions.
> +
> +A sorted single linked list is used to keep the ACL entries by their
> +order of priority. When adding a new filter, this enables us to quickly
> +ascertain if the new entry has the highest priority of the entire block
> +or if we should make some space in the ACL table by increasing the
> +priority of the filters already in the table.

It would be nice to have an example which shows priority in action,
since i don't understand what you are saying here.

      Andrew

  reply	other threads:[~2021-07-22 14:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 13:27 [PATCH net-next] docs: networking: dpaa2: add documentation for the switch driver Ioana Ciornei
2021-07-22 14:27 ` Andrew Lunn [this message]
2021-07-22 14:42   ` Ioana Ciornei
2021-07-22 15:10     ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YPmASiX46tOjUOe/@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ciorneiioana@gmail.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox