Commit d1e462a7 authored by Xin Long's avatar Xin Long Committed by David S. Miller
Browse files

sctp: add probe_interval in sysctl and sock/asoc/transport



PLPMTUD can be enabled by doing 'sysctl -w net.sctp.probe_interval=n'.
'n' is the interval for PLPMTUD probe timer in milliseconds, and it
can't be less than 5000 if it's not 0.

All asoc/transport's PLPMTUD in a new socket will be enabled by default.

Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 745a3211
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -2834,6 +2834,14 @@ encap_port - INTEGER

	Default: 0

plpmtud_probe_interval - INTEGER
        The time interval (in milliseconds) for sending PLPMTUD probe chunks.
        These chunks are sent at the specified interval with a variable size
        to probe the mtu of a given path between 2 endpoints. PLPMTUD will
        be disabled when 0 is set, and other values for it must be >= 5000.

	Default: 0


``/proc/sys/net/core/*``
========================
+3 −0
Original line number Diff line number Diff line
@@ -84,6 +84,9 @@ struct netns_sctp {
	/* HB.interval		    - 30 seconds  */
	unsigned int hb_interval;

	/* The interval for PLPMTUD probe timer */
	unsigned int probe_interval;

	/* Association.Max.Retrans  - 10 attempts
	 * Path.Max.Retrans	    - 5	 attempts (per destination address)
	 * Max.Init.Retransmits	    - 8	 attempts
+2 −0
Original line number Diff line number Diff line
@@ -424,4 +424,6 @@ enum {
 */
#define SCTP_AUTH_RANDOM_LENGTH 32

#define SCTP_PROBE_TIMER_MIN	5000

#endif /* __sctp_constants_h__ */
+3 −0
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ struct sctp_sock {
	 * will be inherited by all new associations.
	 */
	__u32 hbinterval;
	__u32 probe_interval;

	__be16 udp_port;
	__be16 encap_port;
@@ -858,6 +859,7 @@ struct sctp_transport {
	 * the destination address every heartbeat interval.
	 */
	unsigned long hbinterval;
	unsigned long probe_interval;

	/* SACK delay timeout */
	unsigned long sackdelay;
@@ -1795,6 +1797,7 @@ struct sctp_association {
	 * will be inherited by all new transports.
	 */
	unsigned long hbinterval;
	unsigned long probe_interval;

	__be16 encap_port;

+2 −0
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ static struct sctp_association *sctp_association_init(
	 * sock configured value.
	 */
	asoc->hbinterval = msecs_to_jiffies(sp->hbinterval);
	asoc->probe_interval = msecs_to_jiffies(sp->probe_interval);

	asoc->encap_port = sp->encap_port;

@@ -625,6 +626,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
	 * association configured value.
	 */
	peer->hbinterval = asoc->hbinterval;
	peer->probe_interval = asoc->probe_interval;

	peer->encap_port = asoc->encap_port;

Loading