Skip to content

Commit

Permalink
fd: Introduce a unicast service timer.
Browse files Browse the repository at this point in the history
This patch adds a new timer to be used by the server side unicast
negotiation logic.

Signed-off-by: Richard Cochran <[email protected]>
  • Loading branch information
richardcochran committed Jul 2, 2018
1 parent a076fd1 commit dfa9e65
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions e2e_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ enum fsm_event e2e_event(struct port *p, int fd_index)
case FD_MANNO_TIMER:
case FD_SYNC_TX_TIMER:
case FD_UNICAST_REQ_TIMER:
case FD_UNICAST_SRV_TIMER:
pr_err("unexpected timer expiration");
return EV_NONE;

Expand Down
3 changes: 2 additions & 1 deletion fd.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#ifndef HAVE_FD_H
#define HAVE_FD_H

#define N_TIMER_FDS 7
#define N_TIMER_FDS 8

/*
* The order matters here. The DELAY timer must appear before the
Expand All @@ -38,6 +38,7 @@ enum {
FD_MANNO_TIMER,
FD_SYNC_TX_TIMER,
FD_UNICAST_REQ_TIMER,
FD_UNICAST_SRV_TIMER,
FD_RTNL,
N_POLLFD,
};
Expand Down
1 change: 1 addition & 0 deletions p2p_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ enum fsm_event p2p_event(struct port *p, int fd_index)
case FD_MANNO_TIMER:
case FD_SYNC_TX_TIMER:
case FD_UNICAST_REQ_TIMER:
case FD_UNICAST_SRV_TIMER:
pr_err("unexpected timer expiration");
return EV_NONE;

Expand Down
4 changes: 4 additions & 0 deletions port.c
Original file line number Diff line number Diff line change
Expand Up @@ -2474,6 +2474,10 @@ static enum fsm_event bc_event(struct port *p, int fd_index)
port_set_sync_tx_tmo(p);
return port_tx_sync(p, NULL) ? EV_FAULT_DETECTED : EV_NONE;

case FD_UNICAST_SRV_TIMER:
pr_debug("port %hu: unicast service timeout", portnum(p));
return EV_NONE;

case FD_UNICAST_REQ_TIMER:
pr_debug("port %hu: unicast request timeout", portnum(p));
return unicast_client_timer(p) ? EV_FAULT_DETECTED : EV_NONE;
Expand Down

0 comments on commit dfa9e65

Please sign in to comment.