1. maybe I am not clearly describe this question.
what I am want to find out is why VALID_POLICING is still set when
kbits_rate equals to 0?
in openvsiwthc document, it says:
ingress_policing_rate: integer, at least 0
Maximum rate for data received on this interface, in kbps. Data received
faster than this rate is
dropped. Set to 0 (the default) to disable policing.
2. ok, for this RTM_NEWLILNK, i wil find it by myself.
anyway, thanks!
At 2015-08-20 06:54:10, "Ben Pfaff" <[email protected]> wrote:
>On Mon, Aug 10, 2015 at 09:36:51PM +0800, ychen wrote:
>> There are still something puzzled me, can you do some help?
>> 1. what's the meaning of the flag VALID_POLICING?
>> I don't see any meaning of the flag VALID_POLICING in function
>> netdev_linux_set_policing().
>> you see, whether the parameter "kbits_rate"equals to 0, the clause
>> netdev->cache_valid |= VALID_POLICING; will be executed only if the
>> conditions matches error !=0
>
>I don't think that's true. The full condition checks for error == 0 or
>error == ENODEV:
> if (!error || error == ENODEV) {
> netdev->netdev_policing_error = error;
> netdev->cache_valid |= VALID_POLICING;
> }
>
>> another strange phenomenon is that, when i set breakpoint on function
>> netdev_linux_set_policing, I found that netdev->cache_valid equals to 0x73
>> which means VALID_POLICING has set before this function
>> but I can't find anywhere to set this flag except in function
>> netdev_linux_set_policing. why?
>
>I also only see netdev_linux_set_policing() setting this flag.
>
>> 2. which event triggered message RTM_NEWLINK?
>> I found that when use command "add-port br0 tap111", first function
>> netdev_linux_set_policing() will be called, then netdev_linux_update() with
>> message RTM_NEWLINK
>> and this message will lead to netdev->cache_valid to clear the flag
>> VALID_POLICING.
>> my question is, the port tap111 is a system port, I have created it in
>> kernel before add it to ovs bridge.
>> and I didn't to anything like up the port or change the port's namespace
>> or change mtu/mac etc, but why RTM_NEWLINK is trigerred?
>
>I'm not an expert on that aspect of Linux. You can read the kernel
>source code as easily as I can, I guess.
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss