hi,
I test ipv6_bind by "fcnal-test.sh -v -t ipv6_bind" in kernel v5.16-rc3.
There are two tests failed.
TEST: TCP socket bind to out of scope local address - ns-A loopback IPv6 [FAIL]
TEST: TCP socket bind to VRF address with device bind - VRF IPv6 [FAIL]
In fcnal-test.sh expected command error not occurred.
ipv6_addr_bind_novrf()
{
......
log_test_addr ${a} $? 1 "TCP socket bind to out of scope local address"
ipv6_addr_bind_vrf()
{
......
log_test_addr ${a} $? 1 "TCP socket bind to VRF address with device bind"
Did I set something wrong that result in these failed?
The test output is attached.
best regards,
Synchronous Ethernet networks use a physical layer clock to syntonize
the frequency across different network elements.
Basic SyncE node defined in the ITU-T G.8264 consist of an Ethernet
Equipment Clock (EEC) and have the ability to recover synchronization
from the synchronization inputs - either traffic interfaces or external
frequency sources.
The EEC can synchronize its frequency (syntonize) to any of those sources.
It is also able to select synchronization source through priority tables
and synchronization status messaging. It also provides neccessary
filtering and holdover capabilities
This patch series introduces basic interface for reading and configuring
recover clocks on a SyncE capable device
v4:
- Dropped EEC_STATE reporting (TBD: DPLL subsystem)
- moved recovered clock configuration to ethtool netlink
v3:
- remove RTM_GETRCLKRANGE
- return state of all possible pins in the RTM_GETRCLKSTATE
- clarify documentation
v2:
- improved documentation
- fixed kdoc warning
RFC history:
v2:
- removed whitespace changes
- fix issues reported by test robot
v3:
- Changed naming from SyncE to EEC
- Clarify cover letter and commit message for patch 1
v4:
- Removed sync_source and pin_idx info
- Changed one structure to attributes
- Added EEC_SRC_PORT flag to indicate that the EEC is synchronized
to the recovered clock of a port that returns the state
v5:
- add EEC source as an optiona attribute
- implement support for recovered clocks
- align states returned by EEC to ITU-T G.781
v6:
- fix EEC clock state reporting
- add documentation
- fix descriptions in code comments
Maciej Machnikowski (4):
ice: add support detecting features based on netlist
ethtool: Add ability to configure recovered clock for SyncE feature
ice: add support for monitoring SyncE DPLL state
ice: add support for SyncE recovered clocks
Documentation/networking/ethtool-netlink.rst | 67 +++++
drivers/net/ethernet/intel/ice/ice.h | 7 +
.../net/ethernet/intel/ice/ice_adminq_cmd.h | 70 ++++-
drivers/net/ethernet/intel/ice/ice_common.c | 224 +++++++++++++++
drivers/net/ethernet/intel/ice/ice_common.h | 20 +-
drivers/net/ethernet/intel/ice/ice_devids.h | 3 +
drivers/net/ethernet/intel/ice/ice_ethtool.c | 97 +++++++
drivers/net/ethernet/intel/ice/ice_lib.c | 6 +-
drivers/net/ethernet/intel/ice/ice_ptp.c | 35 +++
drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 49 ++++
drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 36 +++
drivers/net/ethernet/intel/ice/ice_type.h | 1 +
include/linux/ethtool.h | 9 +
include/uapi/linux/ethtool_netlink.h | 21 ++
net/ethtool/Makefile | 3 +-
net/ethtool/netlink.c | 20 ++
net/ethtool/netlink.h | 4 +
net/ethtool/synce.c | 267 ++++++++++++++++++
18 files changed, 935 insertions(+), 4 deletions(-)
create mode 100644 net/ethtool/synce.c
--
2.26.3
Another iteration of gpio-sim patches. This time the changes are quite
small. I removed the ifdefs from gpiolib.c as requested by Andy. In this
version gpiolib-of will also prefer fwnodes over of_nodes and - if set -
will convert them to of_nodes before proceeding.
Tested both with configfs as well as device-tree.
v1 -> v2:
- add selftests for gpio-sim
- add helper programs for selftests
- update the configfs rename callback to work with the new API introduced in
v5.11
- fix a missing quote in the documentation
- use !! whenever using bits operation that are required to return 0 or 1
- use provided bitmap API instead of reimplementing copy or fill operations
- fix a deadlock in gpio_sim_direction_output()
- add new read-only configfs attributes for mapping of configfs items to GPIO
device names
- and address other minor issues pointed out in reviews of v1
v2 -> v3:
- use devm_bitmap_alloc() instead of the zalloc variant if we're initializing
the bitmap with 1s
- drop the patch exporting device_is_bound()
- don't return -ENODEV from dev_nam and chip_name configfs attributes, return
a string indicating that the device is not available yet ('n/a')
- fix indentation where it makes sense
- don't protect IDA functions which use their own locking and where it's not
needed
- use kmemdup() instead of kzalloc() + memcpy()
- collected review tags
- minor coding style fixes
v3 -> v4:
- return 'none' instead of 'n/a' from dev_name and chip_name before the device
is registered
- use sysfs_emit() instead of s*printf()
- drop GPIO_SIM_MAX_PROP as it's only used in an array's definition where it's
fine to hardcode the value
v4 -> v5:
- drop lib patches that are already upstream
- use BIT() instead of (1UL << bit) for flags
- fix refcounting for the configfs_dirent in rename()
- drop d_move() from the rename() callback
- free memory allocated for the live and pending groups in configfs_d_iput()
and not in detach_groups()
- make sure that if a group of some name is in the live directory, a new group
with the same name cannot be created in the pending directory
v5 -> v6:
- go back to using (1UL << bit) instead of BIT()
- if the live group dentry doesn't exist for whatever reason at the time when
mkdir() in the pending group is called (would be a BUG()), return -ENOENT
instead of -EEXIST which should only be returned if given subsystem already
exists in either live or pending group
v6 -> v7:
- as detailed by Andy in commit 6fda593f3082 ("gpio: mockup: Convert to use
software nodes") removing device properties after the platform device is
removed but before the GPIO device gets dropped can lead to a use-after-free
bug - use software nodes to manually control the freeing of the properties
v7 -> v8:
- fixed some minor coding style issues as pointed out by Andy
v8 -> v9:
- dropped the patches implementing committable-items and reworked the
driver to not use them
- reworked the gpio-line-names property and configuring specific lines
in general
- many smaller tweaks here and there
v9 -> v10:
- make writing to 'live' wait for the probe to finish and report an
error to user-space if it failed
- add the ability to hog lines from the kernel-space
- rework locking (drop separate locks for line context objects)
- rework the sysfs interface (create a separate group for each line with
a constant number of attributes instead of going the other way around)
v10 -> v11:
- rework the configfs structure to represent a deeper hierarchy that
gpiolib supports, namely: multiple banks per platform device
v11 -> v12:
- simplify patch 2/7 by removing any mentions of OF from gpiolib.c
- improve the documentation by adding rest markups
- add a device-tree sample to the docs
- drop some trailing whitespaces from the driver
- make gpio_sim_make_bank_swnode() static
- fix coding style in patch 6/7
- add patch 3/7 that makes the OF part of gpiolib prefer to use gpio_chip's fwnode (if set) over of_node
Bartosz Golaszewski (7):
gpiolib: provide gpiod_remove_hogs()
gpiolib: allow to specify the firmware node in struct gpio_chip
gpiolib: of: make fwnode take precedence in struct gpio_chip
gpio: sim: new testing module
selftests: gpio: provide a helper for reading chip info
selftests: gpio: add a helper for reading GPIO line names
selftests: gpio: add test cases for gpio-sim
Documentation/admin-guide/gpio/gpio-sim.rst | 134 ++
drivers/gpio/Kconfig | 8 +
drivers/gpio/Makefile | 1 +
drivers/gpio/gpio-sim.c | 1594 +++++++++++++++++
drivers/gpio/gpiolib-of.c | 3 +
drivers/gpio/gpiolib.c | 18 +-
include/linux/gpio/driver.h | 2 +
include/linux/gpio/machine.h | 2 +
tools/testing/selftests/gpio/.gitignore | 2 +
tools/testing/selftests/gpio/Makefile | 4 +-
tools/testing/selftests/gpio/config | 1 +
tools/testing/selftests/gpio/gpio-chip-info.c | 57 +
tools/testing/selftests/gpio/gpio-line-name.c | 55 +
tools/testing/selftests/gpio/gpio-sim.sh | 396 ++++
14 files changed, 2274 insertions(+), 3 deletions(-)
create mode 100644 Documentation/admin-guide/gpio/gpio-sim.rst
create mode 100644 drivers/gpio/gpio-sim.c
create mode 100644 tools/testing/selftests/gpio/gpio-chip-info.c
create mode 100644 tools/testing/selftests/gpio/gpio-line-name.c
create mode 100755 tools/testing/selftests/gpio/gpio-sim.sh
--
2.25.1
When building selftests/vDSO with clang the following warning shows up:
clang -std=gnu99 -Wno-pointer-sign vdso_test_gettimeofday.c parse_vdso.c \
-o /tmp/kselftest/vDSO/vdso_test_gettimeofday
parse_vdso.c:65:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (g = h & 0xf0000000)
~~^~~~~~~~~~~~~~~~
Rework to a parentheses before doing the check.
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
Reviewed-by: Nick Desaulniers <ndesaulniers(a)google.com>
---
v1 -> v2: fixed checkpatch warnings
tools/testing/selftests/vDSO/parse_vdso.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/vDSO/parse_vdso.c b/tools/testing/selftests/vDSO/parse_vdso.c
index 413f75620a35..fdd38f7e0e43 100644
--- a/tools/testing/selftests/vDSO/parse_vdso.c
+++ b/tools/testing/selftests/vDSO/parse_vdso.c
@@ -62,7 +62,8 @@ static unsigned long elf_hash(const unsigned char *name)
while (*name)
{
h = (h << 4) + *name++;
- if (g = h & 0xf0000000)
+ g = h & 0xf0000000;
+ if (g)
h ^= g >> 24;
h &= ~g;
}
--
2.33.0
Hello,
Resctrl_tests is in the kselftest directory, but it cannot use kselftest
framework. The aim of this series is to make resctrl_tests run by using
kselftest framework and to fix some bug/setting of resctrl_tests when
use kselftest framework.
In kselftest framework, we can build/run resctrl_tests by build/run
all tests of kselftest, and we also can use the "TARGETS" variable
on the make command line to specify resctrl_tests to build/run.
To ensure the resctrl_tests finish in limited time(which is specified
by timeout command), set the limited time for resctrl_tests to 120 seconds.
When resctrl filesystem is not supported or resctrl_tests is not run as
root, return skip code of kselftest. If it is not finish in limited time,
terminate resctrl_tests same as when executing ctrl+c.
Thanks,
Tan, Shaopeng (3):
selftests/resctrl: Make resctrl_tests run using kselftest framework
selftests/resctrl: Return KSFT_SKIP(4) if resctrl filessystem is not
supported or resctrl is not run as root
selftests/resctrl: Kill the child process created by fork() when the
SIGTERM signal comes
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/resctrl/Makefile | 21 +++++++++------------
tools/testing/selftests/resctrl/resctrl_tests.c | 4 ++--
tools/testing/selftests/resctrl/resctrl_val.c | 1 +
tools/testing/selftests/resctrl/settings | 1 +
5 files changed, 14 insertions(+), 14 deletions(-)
create mode 100644 tools/testing/selftests/resctrl/settings
--
1.8.3.1
The test for bpf_iter_task_vma assumes that the output will be longer
than 1 kB, as the comment above the loop says. Due to this assumption,
the loop becomes infinite if the output turns to be shorter than 1 kB.
The return value of read_fd_into_buffer is 0 when the end of file was
reached, and len isn't being increased any more.
This commit adds a break on EOF to handle short output correctly. For
the reference, this is the contents that I get when running test_progs
under vmtest.sh, and it's shorter than 1 kB:
00400000-00401000 r--p 00000000 fe:00 25867 /root/bpf/test_progs
00401000-00674000 r-xp 00001000 fe:00 25867 /root/bpf/test_progs
00674000-0095f000 r--p 00274000 fe:00 25867 /root/bpf/test_progs
0095f000-00983000 r--p 0055e000 fe:00 25867 /root/bpf/test_progs
00983000-00a8a000 rw-p 00582000 fe:00 25867 /root/bpf/test_progs
00a8a000-0484e000 rw-p 00000000 00:00 0
7f6c64000000-7f6c64021000 rw-p 00000000 00:00 0
7f6c64021000-7f6c68000000 ---p 00000000 00:00 0
7f6c6ac8f000-7f6c6ac90000 r--s 00000000 00:0d 8032
anon_inode:bpf-map
7f6c6ac90000-7f6c6ac91000 ---p 00000000 00:00 0
7f6c6ac91000-7f6c6b491000 rw-p 00000000 00:00 0
7f6c6b491000-7f6c6b492000 r--s 00000000 00:0d 8032
anon_inode:bpf-map
7f6c6b492000-7f6c6b493000 rw-s 00000000 00:0d 8032
anon_inode:bpf-map
7ffc1e23d000-7ffc1e25e000 rw-p 00000000 00:00 0
7ffc1e3b8000-7ffc1e3bc000 r--p 00000000 00:00 0
7ffc1e3bc000-7ffc1e3bd000 r-xp 00000000 00:00 0
7fffffffe000-7ffffffff000 --xp 00000000 00:00 0
Fixes: e8168840e16c ("selftests/bpf: Add test for bpf_iter_task_vma")
Signed-off-by: Maxim Mikityanskiy <maximmi(a)nvidia.com>
---
tools/testing/selftests/bpf/prog_tests/bpf_iter.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_iter.c b/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
index 9454331aaf85..ea6823215e9c 100644
--- a/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
+++ b/tools/testing/selftests/bpf/prog_tests/bpf_iter.c
@@ -1206,13 +1206,14 @@ static void test_task_vma(void)
goto out;
/* Read CMP_BUFFER_SIZE (1kB) from bpf_iter. Read in small chunks
- * to trigger seq_file corner cases. The expected output is much
- * longer than 1kB, so the while loop will terminate.
+ * to trigger seq_file corner cases.
*/
len = 0;
while (len < CMP_BUFFER_SIZE) {
err = read_fd_into_buffer(iter_fd, task_vma_output + len,
min(read_size, CMP_BUFFER_SIZE - len));
+ if (!err)
+ break;
if (CHECK(err < 0, "read_iter_fd", "read_iter_fd failed\n"))
goto out;
len += err;
--
2.30.2
v8:
- Reorganize the patch series and rationalize the features and
constraints of a partition.
- Update patch descriptions and documentation accordingly.
v7:
- Simplify the documentation patch (patch 5) as suggested by Tejun.
- Fix a typo in patch 2 and improper commit log in patch 3.
v6:
- Remove duplicated tmpmask from update_prstate() which should fix the
frame size too large problem reported by kernel test robot.
This patchset makes four enhancements to the cpuset v2 code.
Patch 1: Enable partition with no task to have empty cpuset.cpus.effective.
Patch 2: Refining the features and constraints of a cpuset partition
clarifying what changes are allowed.
Patch 3: Add a new partition state "isolated" to create a partition
root without load balancing. This is for handling intermitten workloads
that have a strict low latency requirement.
Patch 4: Enable the "cpuset.cpus.partition" file to show the reason
that causes invalid partition like "root invalid (No cpu available
due to hotplug)".
Patch 5 updates the cgroup-v2.rst file accordingly. Patch 6 adds a new
cpuset test to test the new cpuset partition code.
Waiman Long (6):
cgroup/cpuset: Allow no-task partition to have empty
cpuset.cpus.effective
cgroup/cpuset: Refining features and constraints of a partition
cgroup/cpuset: Add a new isolated cpus.partition type
cgroup/cpuset: Show invalid partition reason string
cgroup/cpuset: Update description of cpuset.cpus.partition in
cgroup-v2.rst
kselftest/cgroup: Add cpuset v2 partition root state test
Documentation/admin-guide/cgroup-v2.rst | 153 ++--
kernel/cgroup/cpuset.c | 393 +++++++----
tools/testing/selftests/cgroup/Makefile | 5 +-
.../selftests/cgroup/test_cpuset_prs.sh | 664 ++++++++++++++++++
tools/testing/selftests/cgroup/wait_inotify.c | 87 +++
5 files changed, 1115 insertions(+), 187 deletions(-)
create mode 100755 tools/testing/selftests/cgroup/test_cpuset_prs.sh
create mode 100644 tools/testing/selftests/cgroup/wait_inotify.c
--
2.27.0