On 12/9/21 16:04, David Marchand wrote:
> On Thu, Dec 9, 2021 at 3:51 PM Maxime Coquelin
> <[email protected]> wrote:
>> On 12/7/21 21:37, David Marchand wrote:
>>>> +struct netdev_dpdk_vhost_q_stats {
>>>> +    uint64_t bytes;
>>>> +    uint64_t packets;
>>>> +    uint64_t errors;
>>>> +};
>>>> +
>>>>   /* Custom software stats for dpdk ports */
>>>>   struct netdev_dpdk_sw_stats {
>>>>       /* No. of retries when unable to transmit. */
>>>> @@ -206,6 +213,10 @@ struct netdev_dpdk_sw_stats {
>>>>       uint64_t rx_qos_drops;
>>>>       /* Packet drops in HWOL processing. */
>>>>       uint64_t tx_invalid_hwol_drops;
>>>> +    /* Per-queue Vhost Tx stats */
>>>> +    struct netdev_dpdk_vhost_q_stats *txq;
>>>> +    /* Per-queue Vhost Rx stats */
>>>> +    struct netdev_dpdk_vhost_q_stats *rxq;
>>> |Here, we add "driver" specific stats, while netdev_dpdk_sw_stats struct
>>> carries OVS "own" stats. This netdev_dpdk_sw_stats struct is converted
>>> by netdev_dpdk_get_sw_custom_stats and there is a small framework on
>>> adding custom OVS stats (using some macros "trick"). I'd rather leave
>>> netdev_dpdk_sw_stats struct untouched for consistency. Pointers to vhost
>>> specific stats can be added to the netdev_dpdk struct (we have some
>>> spare space after the pointer to netdev_dpdk_sw_stats). |
>>
>> I checked with pahole, and the comment stating "/*36 pad bytes here.*/"
>> is outdated. Since it is difficult to maintain it given it needs to be
>> updated when struct netdev_stats is modified, I will just remove it in
>> next revision.
> 
> Yeah... I don't like those comments which become obsolete too easily.
> +1

For the reference:  
d9d73f84ea22 ("Revert "dpif_netdev: Refactor dp_netdev_pmd_thread structure."")

This one needs a follow up. :)
Not sure if you want to go into that rabbit hole right now though.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to