On Tue, Dec 7, 2021 at 11:11 PM Maxime Coquelin
<[email protected]> wrote:
> On 12/7/21 21:37, David Marchand wrote:
> > On Wed, Nov 24, 2021 at 10:24 PM Maxime Coquelin
> > <[email protected]> wrote:
> >>
> >> HXPS feature will enable steering Tx packets on transmist
> >
> > transmit*
> >
> >> queues based on their hashes. In order to test the feature,
> >
> > "their hashes" is ambiguous.
>
> s/their hashes/the packets hashes/ ?

Yep.


> >> @@ -5063,6 +5162,34 @@ dpdk_vhost_reconfigure_helper(struct netdev_dpdk 
> >> *dev)
> >>
> >>       netdev_dpdk_remap_txqs(dev);
> >>
> >> +    if (dev->up.n_txq != old_n_txq) {
> >> +        struct netdev_dpdk_vhost_q_stats *old_txq_stats, *new_txq_stats;
> >> +
> >> +        new_txq_stats = xcalloc(dev->up.n_txq, sizeof 
> >> *dev->sw_stats->txq);
> >> +        rte_spinlock_lock(&dev->stats_lock);
> >> +        old_txq_stats = dev->sw_stats->txq;
> >> +        memcpy(new_txq_stats, old_txq_stats,
> >> +                MIN(dev->up.n_txq, old_n_txq) * sizeof 
> >> *dev->sw_stats->txq);
> >> +        dev->sw_stats->txq = new_txq_stats;
> >
> > I prefer realloc and setting extra space to 0, but it is equivalent,
> > no strong opinion on the implementation.
>
> I initialy did it the same way you suggest, but then thought it would be
> better to avoid calling xrealloc() with the spinlock held. What do you
> think?

Indeed, your implementation is better.


-- 
David Marchand

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to