diff for duplicates of <53CE65B5.3090903@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 35c218c..be62f75 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -114,7 +114,7 @@ state inheritance like this is usually done in sctp_assocociation_init(). > > - if (sctp_sk(asoc->base.sk)->nodelay) > - /* Nagle disabled */ -> + if (asoc->tx_delay = SCTP_F_TX_NODELAY) +> + if (asoc->tx_delay == SCTP_F_TX_NODELAY) > + /* Nagle disabled and MSG_MORE unset */ > return SCTP_XMIT_OK; > @@ -122,9 +122,9 @@ state inheritance like this is usually done in sctp_assocociation_init(). > /* Append to packet */ > return SCTP_XMIT_OK; > -> - if (inflight = 0) +> - if (inflight == 0) > - /* Nothing unacked */ -> + if (inflight = 0 && !(asoc->tx_delay & SCTP_F_TX_MSG_MORE)) +> + if (inflight == 0 && !(asoc->tx_delay & SCTP_F_TX_MSG_MORE)) > + /* Nothing unacked and application isn't going to send more */ > return SCTP_XMIT_OK; > @@ -164,8 +164,8 @@ state inheritance like this is usually done in sctp_assocociation_init(). > if (get_user(val, (int __user *)optval)) > return -EFAULT; > -> - sctp_sk(sk)->nodelay = (val = 0) ? 0 : 1; -> + val = val = 0 ? SCTP_F_TX_NAGLE : SCTP_F_TX_NODELAY; +> - sctp_sk(sk)->nodelay = (val == 0) ? 0 : 1; +> + val = val == 0 ? SCTP_F_TX_NAGLE : SCTP_F_TX_NODELAY; > + sctp_sk(sk)->tx_delay = val; > + > + /* Update cached value on each asoc (clears SCTP_F_TX_MSG_MORE) */ @@ -187,7 +187,7 @@ state inheritance like this is usually done in sctp_assocociation_init(). > return -EINVAL; > > len = sizeof(int); -> - val = (sctp_sk(sk)->nodelay = 1); +> - val = (sctp_sk(sk)->nodelay == 1); > + val = sctp_sk(sk)->tx_delay & SCTP_F_TX_NAGLE ? 0 : 1; > if (put_user(len, optlen)) > return -EFAULT; diff --git a/a/content_digest b/N1/content_digest index 0e3e51a..191414a 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\0063D6719AE5E284EB5DD2968C1650D6D1727AF02@AcuExch.aculab.com\0" "From\0Vlad Yasevich <vyasevich@gmail.com>\0" "Subject\0Re: [PATCH net-next v3 3/3] net: sctp: Add support for MSG_MORE on SCTP\0" - "Date\0Tue, 22 Jul 2014 13:23:01 +0000\0" + "Date\0Tue, 22 Jul 2014 09:23:01 -0400\0" "To\0David Laight <David.Laight@aculab.com>" Linux Networking Development Mailing List <netdev@vger.kernel.org> " 'linux-sctp@vger.kernel.org' <linux-sctp@vger.kernel.org>\0" @@ -124,7 +124,7 @@ "> \n" "> -\tif (sctp_sk(asoc->base.sk)->nodelay)\n" "> -\t\t/* Nagle disabled */\n" - "> +\tif (asoc->tx_delay = SCTP_F_TX_NODELAY)\n" + "> +\tif (asoc->tx_delay == SCTP_F_TX_NODELAY)\n" "> +\t\t/* Nagle disabled and MSG_MORE unset */\n" "> \t\treturn SCTP_XMIT_OK;\n" "> \n" @@ -132,9 +132,9 @@ "> \t\t/* Append to packet */\n" "> \t\treturn SCTP_XMIT_OK;\n" "> \n" - "> -\tif (inflight = 0)\n" + "> -\tif (inflight == 0)\n" "> -\t\t/* Nothing unacked */\n" - "> +\tif (inflight = 0 && !(asoc->tx_delay & SCTP_F_TX_MSG_MORE))\n" + "> +\tif (inflight == 0 && !(asoc->tx_delay & SCTP_F_TX_MSG_MORE))\n" "> +\t\t/* Nothing unacked and application isn't going to send more */\n" "> \t\treturn SCTP_XMIT_OK;\n" "> \t\n" @@ -174,8 +174,8 @@ "> \tif (get_user(val, (int __user *)optval))\n" "> \t\treturn -EFAULT;\n" "> \n" - "> -\tsctp_sk(sk)->nodelay = (val = 0) ? 0 : 1;\n" - "> +\tval = val = 0 ? SCTP_F_TX_NAGLE : SCTP_F_TX_NODELAY;\n" + "> -\tsctp_sk(sk)->nodelay = (val == 0) ? 0 : 1;\n" + "> +\tval = val == 0 ? SCTP_F_TX_NAGLE : SCTP_F_TX_NODELAY;\n" "> +\tsctp_sk(sk)->tx_delay = val;\n" "> +\n" "> +\t/* Update cached value on each asoc (clears SCTP_F_TX_MSG_MORE) */\n" @@ -197,11 +197,11 @@ "> \t\treturn -EINVAL;\n" "> \n" "> \tlen = sizeof(int);\n" - "> -\tval = (sctp_sk(sk)->nodelay = 1);\n" + "> -\tval = (sctp_sk(sk)->nodelay == 1);\n" "> +\tval = sctp_sk(sk)->tx_delay & SCTP_F_TX_NAGLE ? 0 : 1;\n" "> \tif (put_user(len, optlen))\n" "> \t\treturn -EFAULT;\n" "> \tif (copy_to_user(optval, &val, len))\n" > -b3baba5cf97ca2a23bd9c8c56c14b21c14ceaef89bc60404e18e26e2b094b71b +4bbcc474558aa8482335cf600eff3f92cd90c7e2ca8e0c36c63b975ab7aa2006
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.