]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: refactor tcp_read_skb() a bit
authorCong Wang <cong.wang@bytedance.com>
Wed, 17 Aug 2022 19:54:44 +0000 (12:54 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 18 Aug 2022 18:04:56 +0000 (11:04 -0700)
commit85748c26880ca202319fd418600fc1840eb1c5da
tree3e166b8c8d792283d7f4ce6bbc2354591387f5d8
parentd8a1b22101f8da9701c42b851bb90f33236a420e
tcp: refactor tcp_read_skb() a bit

As tcp_read_skb() only reads one skb at a time, the while loop is
unnecessary, we can turn it into an if. This also simplifies the
code logic.

Cc: Eric Dumazet <edumazet@google.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c