Patch "selftests/net: timestamping: Fix bind_phc check" has been added to the 5.17-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/net: timestamping: Fix bind_phc check

to the 5.17-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-net-timestamping-fix-bind_phc-check.patch
and it can be found in the queue-5.17 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 90f71fc84b690536aa7725bf0aafd72bd2359f3e
Author: Gerhard Engleder <gerhard@xxxxxxxxxxxxxxxxxxxxx>
Date:   Sun Jan 30 10:54:22 2022 +0100

    selftests/net: timestamping: Fix bind_phc check
    
    [ Upstream commit 678dfd5280341d877ca646499bfdc82a3d8b4356 ]
    
    timestamping checks socket options during initialisation. For the field
    bind_phc of the socket option SO_TIMESTAMPING it expects the value -1 if
    PHC is not bound. Actually the value of bind_phc is 0 if PHC is not
    bound. This results in the following output:
    
    SIOCSHWTSTAMP: tx_type 0 requested, got 0; rx_filter 0 requested, got 0
    SO_TIMESTAMP 0
    SO_TIMESTAMPNS 0
    SO_TIMESTAMPING flags 0, bind phc 0
       not expected, flags 0, bind phc -1
    
    This is fixed by setting default value and expected value of bind_phc to
    0.
    
    Fixes: 2214d7032479 ("selftests/net: timestamping: support binding PHC")
    Signed-off-by: Gerhard Engleder <gerhard@xxxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/net/timestamping.c b/tools/testing/selftests/net/timestamping.c
index aee631c5284e..044bc0e9ed81 100644
--- a/tools/testing/selftests/net/timestamping.c
+++ b/tools/testing/selftests/net/timestamping.c
@@ -325,8 +325,8 @@ int main(int argc, char **argv)
 	struct ifreq device;
 	struct ifreq hwtstamp;
 	struct hwtstamp_config hwconfig, hwconfig_requested;
-	struct so_timestamping so_timestamping_get = { 0, -1 };
-	struct so_timestamping so_timestamping = { 0, -1 };
+	struct so_timestamping so_timestamping_get = { 0, 0 };
+	struct so_timestamping so_timestamping = { 0, 0 };
 	struct sockaddr_in addr;
 	struct ip_mreq imr;
 	struct in_addr iaddr;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux