Message ID | 20230417081535.102275-1-wangchuanlei@inspur.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [ovs-dev] pinctrl: fix restart of controller when bfd min_tx set to 1 | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | fail | github build: failed |
On Mon, Apr 17, 2023 at 10:16 AM wangchuanlei <wangchuanlei@inspur.com> wrote: > when create bfd entry, set min_tx to 1, (tx_timeout * 25)/100 is > zero, which cause controller to restart! > > Signed-off-by: wangchuanlei <wangchuanlei@inspur.com> > Hi, > --- > controller/pinctrl.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/controller/pinctrl.c b/controller/pinctrl.c > index 795847729..7817da6e0 100644 > --- a/controller/pinctrl.c > +++ b/controller/pinctrl.c > @@ -7190,7 +7190,6 @@ bfd_monitor_send_msg(struct rconn *swconn, long long > int *bfd_time) > pinctrl_send_bfd_tx_msg(swconn, entry, false); > > tx_timeout = MAX(entry->local_min_tx, entry->remote_min_rx); > - tx_timeout -= random_range((tx_timeout * 25) / 100); > thank you for the patch, but I don't think that removing this line is the proper solution. The removal would cause the timeout to be always the maximum of those two values. IMO the correct approach would be to subtract the random value only if the original value is >= 4 (as "(tx_timeout * 25) / 100" effectively quarters the value) e.g. if (tx_timeout >= 4) { tx_timeout -= random_range(tx_timeout / 4); } > entry->next_tx = cur_time + tx_timeout; > next: > if (*bfd_time > entry->next_tx) { > -- > 2.27.0 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > Thanks, Ales
diff --git a/controller/pinctrl.c b/controller/pinctrl.c index 795847729..7817da6e0 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -7190,7 +7190,6 @@ bfd_monitor_send_msg(struct rconn *swconn, long long int *bfd_time) pinctrl_send_bfd_tx_msg(swconn, entry, false); tx_timeout = MAX(entry->local_min_tx, entry->remote_min_rx); - tx_timeout -= random_range((tx_timeout * 25) / 100); entry->next_tx = cur_time + tx_timeout; next: if (*bfd_time > entry->next_tx) {
when create bfd entry, set min_tx to 1, (tx_timeout * 25)/100 is zero, which cause controller to restart! Signed-off-by: wangchuanlei <wangchuanlei@inspur.com> --- controller/pinctrl.c | 1 - 1 file changed, 1 deletion(-)