1. 18 Apr, 2023 33 commits
  2. 17 Apr, 2023 7 commits
    • Horatiu Vultur's avatar
      net: lan966x: Fix lan966x_ifh_get · 99676a57
      Horatiu Vultur authored
      From time to time, it was observed that the nanosecond part of the
      received timestamp, which is extracted from the IFH, it was actually
      bigger than 1 second. So then when actually calculating the full
      received timestamp, based on the nanosecond part from IFH and the second
      part which is read from HW, it was actually wrong.
      
      The issue seems to be inside the function lan966x_ifh_get, which
      extracts information from an IFH(which is an byte array) and returns the
      value in a u64. When extracting the timestamp value from the IFH, which
      starts at bit 192 and have the size of 32 bits, then if the most
      significant bit was set in the timestamp, then this bit was extended
      then the return value became 0xffffffff... . And the reason of this is
      because constants without any postfix are treated as signed longs and
      that is the reason why '1 << 31' becomes 0xffffffff80000000.
      This is fixed by adding the postfix 'ULL' to 1.
      
      Fixes: fd762783 ("net: lan966x: Stop using packing library")
      Signed-off-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      99676a57
    • David S. Miller's avatar
      Merge branch 'sctp-info-dump' · 0af03871
      David S. Miller authored
      Xin Long says:
      
      ====================
      sctp: add some missing peer_capables in sctp info dump
      
      The 1st patch removes the unused and obsolete hostname_address from
      sctp_association peer and also the bit from sctp_info peer_capables,
      and then reuses its bit for reconf_capable and use the higher
      available bit for intl_capable in the 2nd patch.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0af03871
    • Xin Long's avatar
      sctp: add intl_capable and reconf_capable in ss peer_capable · ab4f1e28
      Xin Long authored
      There are two new peer capables have been added since sctp_diag was
      introduced into SCTP. When dumping the peer capables, these two new
      peer capables should also be included. To not break the old capables,
      reconf_capable takes the old hostname_address bit, and intl_capable
      uses the higher available bit in sctpi_peer_capable.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab4f1e28
    • Xin Long's avatar
      sctp: delete the obsolete code for the host name address param · bd4b2818
      Xin Long authored
      In the latest RFC9260, the Host Name Address param has been deprecated.
      For INIT chunk:
      
        Note 3: An INIT chunk MUST NOT contain the Host Name Address
        parameter.  The receiver of an INIT chunk containing a Host Name
        Address parameter MUST send an ABORT chunk and MAY include an
        "Unresolvable Address" error cause.
      
      For Supported Address Types:
      
        The value indicating the Host Name Address parameter MUST NOT be
        used when sending this parameter and MUST be ignored when receiving
        this parameter.
      
      Currently Linux SCTP doesn't really support Host Name Address param,
      but only saves some flag and print debug info, which actually won't
      even be triggered due to the verification in sctp_verify_param().
      This patch is to delete those dead code.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bd4b2818
    • David S. Miller's avatar
      Merge branch 'mptcp-cleanups' · 9bf55bd4
      David S. Miller authored
      Matthieu Baerts says:
      
      ====================
      mptcp: various small cleanups
      
      Patch 1 makes a function static because it is only used in one file.
      
      Patch 2 adds info about the git trees we use to help occasional devs.
      
      Patch 3 removes an unused variable.
      
      Patch 4 removes duplicated entries from the help menu of a tool used in
      MPTCP selftests.
      
      Patch 5 removes some ShellCheck warnings in mptcp_join.sh selftest.
      
      Only very minor improvements then.
      ====================
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9bf55bd4
    • Matthieu Baerts's avatar
      selftests: mptcp: join: fix ShellCheck warnings · 0fcd72df
      Matthieu Baerts authored
      Most of the code had an issue according to ShellCheck.
      
      That's mainly due to the fact it incorrectly believes most of the code
      was unreachable because it's invoked by variable name, see how the
      "tests" array is used.
      
      Once SC2317 has been ignored, three small warnings were still visible:
      
       - SC2155: Declare and assign separately to avoid masking return values.
      
       - SC2046: Quote this to prevent word splitting: can be ignored because
         "ip netns pids" can display more than one pid.
      
       - SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
      
      This probably didn't fix any actual issues but it might help spotting
      new interesting warnings reported by ShellCheck as just before,
      ShellCheck was reporting issues for most lines making it a bit useless.
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0fcd72df
    • Matthieu Baerts's avatar
      selftests: mptcp: remove duplicated entries in usage · 0a85264e
      Matthieu Baerts authored
      mptcp_connect tool was printing some duplicated entries when showing how
      to use it: -j -l -r
      
      While at it, I also:
      
       - moved the very few entries that were not sorted,
      
       - added -R that was missing since
         commit 8a4b910d ("mptcp: selftests: add rcvbuf set option"),
      
       - removed the -u parameter that has been removed in
         commit f730b65c ("selftests: mptcp: try to set mptcp ulp mode in different sk states").
      
      No need to backport this, it is just an internal tool used by our
      selftests. The help menu is mainly useful for MPTCP kernel devs.
      Acked-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0a85264e