/* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
*
* Copyright 2013-2016 Freescale Semiconductor Inc.
- * Copyright 2016 NXP
+ * Copyright 2016-2019 NXP
*
*/
#include <fsl_mc_sys.h>
token);
cmd_params = (struct dpni_cmd_set_pools *)cmd.params;
cmd_params->num_dpbp = cfg->num_dpbp;
+ cmd_params->pool_options = cfg->pool_options;
for (i = 0; i < cmd_params->num_dpbp; i++) {
cmd_params->pool[i].dpbp_id =
cpu_to_le16(cfg->pools[i].dpbp_id);
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
* @token: Token of DPNI object
* @mac_addr: MAC address to add
- *
+ * @flags : 0 - tc_id and flow_id will be ignored.
+ * Pkt with this mac_id will be passed to the next
+ * classification stages
+ * DPNI_MAC_SET_QUEUE_ACTION
+ * Pkt with this mac will be forward directly to
+ * queue defined by the tc_id and flow_id
+ * @tc_id : Traffic class selection (0-7)
+ * @flow_id : Selects the specific queue out of the set allocated for the
+ * same as tc_id. Value must be in range 0 to NUM_QUEUES - 1
* Return: '0' on Success; Error code otherwise.
*/
int dpni_add_mac_addr(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
- const uint8_t mac_addr[6])
+ const uint8_t mac_addr[6],
+ uint8_t flags,
+ uint8_t tc_id,
+ uint8_t flow_id)
{
struct mc_command cmd = { 0 };
struct dpni_cmd_add_mac_addr *cmd_params;
cmd_flags,
token);
cmd_params = (struct dpni_cmd_add_mac_addr *)cmd.params;
+ cmd_params->flags = flags;
+ cmd_params->tc_id = tc_id;
+ cmd_params->fq_id = flow_id;
+
for (i = 0; i < 6; i++)
cmd_params->mac_addr[i] = mac_addr[5 - i];
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
* @token: Token of DPNI object
* @vlan_id: VLAN ID to add
+ * @flags: 0 - tc_id and flow_id will be ignored.
+ * Pkt with this vlan_id will be passed to the next
+ * classification stages
+ * DPNI_VLAN_SET_QUEUE_ACTION
+ * Pkt with this vlan_id will be forward directly to
+ * queue defined by the tc_id and flow_id
+ *
+ * @tc_id: Traffic class selection (0-7)
+ * @flow_id: Selects the specific queue out of the set allocated for the
+ * same as tc_id. Value must be in range 0 to NUM_QUEUES - 1
*
* Return: '0' on Success; Error code otherwise.
*/
int dpni_add_vlan_id(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
- uint16_t vlan_id)
+ uint16_t vlan_id,
+ uint8_t flags,
+ uint8_t tc_id,
+ uint8_t flow_id)
{
struct dpni_cmd_vlan_id *cmd_params;
struct mc_command cmd = { 0 };
cmd_flags,
token);
cmd_params = (struct dpni_cmd_vlan_id *)cmd.params;
+ cmd_params->flags = flags;
+ cmd_params->tc_id = tc_id;
+ cmd_params->flow_id = flow_id;
cmd_params->vlan_id = cpu_to_le16(vlan_id);
/* send command to mc*/
uint16_t token,
const struct dpni_rule_cfg *cfg,
uint8_t tc_id,
- uint16_t index)
+ uint16_t index,
+ uint8_t flags,
+ uint8_t flow_id)
{
struct dpni_cmd_add_qos_entry *cmd_params;
struct mc_command cmd = { 0 };
cmd_flags,
token);
cmd_params = (struct dpni_cmd_add_qos_entry *)cmd.params;
+ cmd_params->flags = flags;
+ cmd_params->flow_id = flow_id;
cmd_params->tc_id = tc_id;
cmd_params->key_size = cfg->key_size;
cmd_params->index = cpu_to_le16(index);
* @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
* @token: Token of DPNI object
* @page: Selects the statistics page to retrieve, see
- * DPNI_GET_STATISTICS output. Pages are numbered 0 to 3.
+ * DPNI_GET_STATISTICS output. Pages are numbered 0 to 6.
* @param: Custom parameter for some pages used to select
* a certain statistic source, for example the TC.
* @stat: Structure containing the statistics