1 /* Copyright (c) 2009 Nicira Networks
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
21 #include "ovs-vswitchd.h"
25 #define THIS_MODULE VLM_port
29 set_ingress_policing(const char *port_name)
31 int kbits_rate = cfg_get_int(0, "port.%s.ingress.policing-rate",
33 int kbits_burst = cfg_get_int(0, "port.%s.ingress.policing-burst",
36 return netdev_nodev_set_policing(port_name, kbits_rate, kbits_burst);
46 port_reconfigure(void)
52 bridge_get_ifaces(&ports);
53 for (i=0; i<ports.n; i++) {
54 set_ingress_policing(ports.names[i]);