Hi Kevin,
While reviewing other patches, I noticed couple of minor nits.
Comments inline.
> diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index c5ab35d2a..5e787f9c0
> 100644
> --- a/lib/dpif-netdev.c
> +++ b/lib/dpif-netdev.c
> @@ -309,4 +309,10 @@ struct pmd_auto_lb { };
>
<snipped>
> @@ -4318,4 +4324,5 @@ dpif_netdev_set_config(struct dpif *dpif, const
> struct smap *other_config)
> uint8_t rebalance_improve;
> bool log_autolb = false;
> + enum sched_assignment_type pmd_rxq_assign_type;
>
> tx_flush_interval = smap_get_int(other_config, "tx-flush-interval", @@ -
> 4376,13 +4383,17 @@ dpif_netdev_set_config(struct dpif *dpif, const struct
> smap *other_config)
> }
>
> - bool pmd_rxq_assign_cyc = !strcmp(pmd_rxq_assign, "cycles");
> - if (!pmd_rxq_assign_cyc && strcmp(pmd_rxq_assign, "roundrobin")) {
> - VLOG_WARN("Unsupported Rxq to PMD assignment mode in pmd-rxq-
> assign. "
> - "Defaulting to 'cycles'.");
> - pmd_rxq_assign_cyc = true;
> + if (!strcmp(pmd_rxq_assign, "roundrobin")) {
> + pmd_rxq_assign_type = SCHED_ROUNDROBIN;
> + } else if (!strcmp(pmd_rxq_assign, "cycles")) {
> + pmd_rxq_assign_type = SCHED_CYCLES;
> + } else {
> + /* default */
Nit: should be capitalized and full stop missing?
> + VLOG_WARN("Unsupported rx queue to PMD assignment mode in "
> + "pmd-rxq-assign. Defaulting to 'cycles'.");
> + pmd_rxq_assign_type = SCHED_CYCLES;
> pmd_rxq_assign = "cycles";
> }
> - if (dp->pmd_rxq_assign_cyc != pmd_rxq_assign_cyc) {
> - dp->pmd_rxq_assign_cyc = pmd_rxq_assign_cyc;
> + if (dp->pmd_rxq_assign_type != pmd_rxq_assign_type) {
> + dp->pmd_rxq_assign_type = pmd_rxq_assign_type;
> VLOG_INFO("Rxq to PMD assignment mode changed to: \'%s\'.",
> pmd_rxq_assign);
> @@ -5040,4 +5051,196 @@ rr_numa_list_destroy(struct rr_numa_list *rr) }
>
<snipped>
> +static const char *
> +get_assignment_type_string(enum sched_assignment_type algo) {
> + switch (algo) {
> + case SCHED_ROUNDROBIN: return "roundrobin";
> + case SCHED_CYCLES: return "cycles";
> + case SCHED_MAX:
> + /* fall through */
Nit: Same as above comment.
> + default: return "Unknown";
> + }
> +}
> +
<snipped>
Thanks and regards
Sunil
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev