[port <portnum> default]
start_hdr = <start_hdr>
forward_bad_frames = <forward_bad_frames>
+ fill_bpool_buffs = <fill_bpool_buffs>
default_tc = <default_tc>
mapping_priority = <mapping_priority>
- ``<forward_bad_frames>``: Indicate whether to forward or drop l2 bad packets (0 or 1).
+- ``<fill_bpool_buffs>``: Control the amount of refill buffers (default is 64).
+
- ``<default_tc>``: Default traffic class (e.g. 0)
- ``<mapping_priority>``: QoS priority for mapping (`ip`, `vlan`, `ip/vlan` or `vlan/ip`).
#define MRVL_IFACE_NAME_ARG "iface"
#define MRVL_CFG_ARG "cfg"
-#define MRVL_BURST_SIZE 64
-
#define MRVL_ARP_LENGTH 28
#define MRVL_COOKIE_ADDR_INVALID ~0ULL
priv->ppio_params.match = match;
priv->ppio_params.eth_start_hdr = PP2_PPIO_HDR_ETH;
priv->forward_bad_frames = 0;
+ priv->fill_bpool_buffs = MRVL_BURST_SIZE;
if (mrvl_cfg) {
priv->ppio_params.eth_start_hdr =
mrvl_cfg->port[dev->data->port_id].eth_start_hdr;
priv->forward_bad_frames =
mrvl_cfg->port[dev->data->port_id].forward_bad_frames;
+ priv->fill_bpool_buffs =
+ mrvl_cfg->port[dev->data->port_id].fill_bpool_buffs;
}
/*
if (unlikely(num <= q->priv->bpool_min_size ||
(!rx_done && num < q->priv->bpool_init_size))) {
- mrvl_fill_bpool(q, MRVL_BURST_SIZE);
+ mrvl_fill_bpool(q, q->priv->fill_bpool_buffs);
} else if (unlikely(num > q->priv->bpool_max_size)) {
int i;
int pkt_to_remove = num - q->priv->bpool_init_size;
/** Maximum length of a match string */
#define MRVL_MATCH_LEN 16
+#define MRVL_BURST_SIZE 64
+
/** PMD-specific definition of a flow rule handle. */
struct mrvl_mtr;
struct rte_flow {
uint64_t rate_max;
uint8_t forward_bad_frames;
+ uint32_t fill_bpool_buffs;
};
/** Flow operations forward declaration. */
/* parser forward bad frames tokens */
#define MRVL_TOK_FWD_BAD_FRAMES "forward_bad_frames"
+/* parse fill bpool buffers tokens */
+#define MRVL_TOK_FILL_BPOOL_BUFFS "fill_bpool_buffs"
+
/** Number of tokens in range a-b = 2. */
#define MAX_RNG_TOKENS 2
/* Use global defaults, unless an override occurs */
(*cfg)->port[n].use_qos_global_defaults = 1;
+ /* Set non-zero defaults before the decision to continue to next
+ * port or to parse the port section in config file
+ */
+ (*cfg)->port[n].fill_bpool_buffs = MRVL_BURST_SIZE;
+
/* Skip ports non-existing in configuration. */
if (rte_cfgfile_num_sections(file, sec_name,
strlen(sec_name)) <= 0) {
} else {
(*cfg)->port[n].forward_bad_frames = 0;
}
+
+ /* Parse fill bpool buffs option */
+ entry = rte_cfgfile_get_entry(file, sec_name,
+ MRVL_TOK_FILL_BPOOL_BUFFS);
+ if (entry) {
+ if (get_val_securely(entry, &val) < 0) {
+ MRVL_LOG(ERR,
+ "Error in parsing %s value (%s)!\n",
+ MRVL_TOK_FILL_BPOOL_BUFFS, entry);
+ return -1;
+ }
+ (*cfg)->port[n].fill_bpool_buffs = val;
+ }
}
return 0;
struct pp2_cls_plcr_params policer_params;
uint8_t setup_policer;
uint8_t forward_bad_frames;
+ uint32_t fill_bpool_buffs;
} port[RTE_MAX_ETHPORTS];
};