|
@@ -222,6 +222,21 @@ static int set_default_qdisc(struct ctl_table *table, int write,
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+static int proc_do_dev_weight(struct ctl_table *table, int write,
|
|
|
|
+ void __user *buffer, size_t *lenp, loff_t *ppos)
|
|
|
|
+{
|
|
|
|
+ int ret;
|
|
|
|
+
|
|
|
|
+ ret = proc_dointvec(table, write, buffer, lenp, ppos);
|
|
|
|
+ if (ret != 0)
|
|
|
|
+ return ret;
|
|
|
|
+
|
|
|
|
+ dev_rx_weight = weight_p * dev_weight_rx_bias;
|
|
|
|
+ dev_tx_weight = weight_p * dev_weight_tx_bias;
|
|
|
|
+
|
|
|
|
+ return ret;
|
|
|
|
+}
|
|
|
|
+
|
|
static int proc_do_rss_key(struct ctl_table *table, int write,
|
|
static int proc_do_rss_key(struct ctl_table *table, int write,
|
|
void __user *buffer, size_t *lenp, loff_t *ppos)
|
|
void __user *buffer, size_t *lenp, loff_t *ppos)
|
|
{
|
|
{
|
|
@@ -273,7 +288,21 @@ static struct ctl_table net_core_table[] = {
|
|
.data = &weight_p,
|
|
.data = &weight_p,
|
|
.maxlen = sizeof(int),
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.mode = 0644,
|
|
- .proc_handler = proc_dointvec
|
|
|
|
|
|
+ .proc_handler = proc_do_dev_weight,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .procname = "dev_weight_rx_bias",
|
|
|
|
+ .data = &dev_weight_rx_bias,
|
|
|
|
+ .maxlen = sizeof(int),
|
|
|
|
+ .mode = 0644,
|
|
|
|
+ .proc_handler = proc_do_dev_weight,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .procname = "dev_weight_tx_bias",
|
|
|
|
+ .data = &dev_weight_tx_bias,
|
|
|
|
+ .maxlen = sizeof(int),
|
|
|
|
+ .mode = 0644,
|
|
|
|
+ .proc_handler = proc_do_dev_weight,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
.procname = "netdev_max_backlog",
|
|
.procname = "netdev_max_backlog",
|