Re: [PATCHv2 2/6] virnetdevovs: Extract conversion parameters between virNetDevBandwidth and ovs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/17/21 6:38 AM, jx8zjs wrote:
> From: Jinsheng Zhang <zhangjl02@xxxxxxxxxx>
> 
> Signed-off-by: zhangjl02 <zhangjl02@xxxxxxxxxx>
> ---
>  src/util/virnetdevopenvswitch.c | 12 +++++++-----
>  src/util/virnetdevopenvswitch.h |  7 +++++++
>  2 files changed, 14 insertions(+), 5 deletions(-)
> 


> diff --git a/src/util/virnetdevopenvswitch.h b/src/util/virnetdevopenvswitch.h
> index 2dcd1aec6b..33e52f57c7 100644
> --- a/src/util/virnetdevopenvswitch.h
> +++ b/src/util/virnetdevopenvswitch.h
> @@ -26,6 +26,13 @@
>  #include "virnetdevvlan.h"
>  
>  #define VIR_NETDEV_OVS_DEFAULT_TIMEOUT 5
> +/*
> + * Average, peak, floor and burst in virNetDevBandwidth are in kbytes.
> + * However other_config in ovs qos is in bit.
> + * ingress_policing_rate in ovs interface is in kbit.
> + */
> +#define VIR_NETDEV_TX_TO_OVS 8192
> +#define VIR_NETDEV_RX_TO_OVS 8
>  
>  void virNetDevOpenvswitchSetTimeout(unsigned int timeout);
>  
> 

These macros seem to be used only from corresponding .c file. I think
they can be defined there. That way we can avoid polluting header files.

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux