Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-20082

LNet: TCP receive buffer size setting not taking effect.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Medium
    • Lustre 2.18.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      When using the lnet_sock_setbuf function to set txbufsize and rxbufsize, there is an issue: rxbufsize is incorrectly assigned to sk->sk_sndbuf. This causes both sk_sndbuf and sk_rcvbuf to behave unexpectedly.

      This issue was introduced during the refactoring to support kernel 5.8 due to kernel interface changes. Refer to LU-13783.

      Code:

      void
      lnet_sock_setbuf(struct socket *sock, int txbufsize, int rxbufsize)
      {
              struct sock *sk = sock->sk;
      
              if (txbufsize != 0) {
                      sk->sk_userlocks |= SOCK_SNDBUF_LOCK;
                      sk->sk_sndbuf = txbufsize;
                      sk->sk_write_space(sk);
              }
      
              if (rxbufsize != 0) {
                      sk->sk_userlocks |= SOCK_RCVBUF_LOCK;
                      sk->sk_sndbuf = rxbufsize;
              }
      }

      `sk->sk_sndbuf = rxbufsize` should be `sk->sk_rcvbuf = rxbufsize`.

       

      Attachments

        Activity

          People

            xqu Xinxia Qu
            xqu Xinxia Qu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: