Commit Graph

25 Commits

Author SHA1 Message Date
Alex O'Regan
aed23dbf5e Adds ConntrackCreate & ConntrackUpdate
- Also refactored setUpNetlinkTestWithKModule function to reduce redundant NS's created and checks made.

 - Add conntrack protoinfo TCP support + groundwork for other protocols.

 - Tests to cover the above.
2024-07-04 08:47:44 -07:00
Shaun Crampton
b54f85093f Add RouteListFilteredIter API.
Allows for listing large numbers of routes without
buffering the whole list in memory at once.

Add benchmarks for RouteListFiltered variants.
2024-07-03 13:08:00 -07:00
Yury Kulazhenkov
857968af11 Add support for VDPA devices management
Current implementation support
following functions:
- VDPANewDev
- VDPADelDev
- VDPAGetDevList
- VDPAGetDevByName
- VDPAGetDevConfigList
- VDPAGetDevConfigByName
- VDPAGetDevVStats
- VDPAGetMGMTDevList
- VDPAGetMGMTDevByBusAndName

Signed-off-by: Yury Kulazhenkov <ykulazhenkov@nvidia.com>
2024-01-29 10:29:44 -08:00
Tobias Klauser
ccef072df0 Mark skipUnlessRoot and minKernelRequired as test helpers
With this, the skip message will display the position of the
helper invocation (i.e. the test that caused the skip) instead of the
position of the t.Skip call in minKernelRequired the helper.
2023-10-24 10:52:43 -07:00
Tobias Klauser
40e139bb96 Enable extended error message reporting in tests
This causes the NETLINK_EXT_ACK socket option to be set and extended
error messages to be reported in errors. This should help debug test
failures.

Also use errors.Is to check for errors because using extended error
reporting, the errors no longer match exactly.
2023-10-24 09:29:12 -07:00
张祖建
b8aac10bba fix staticcheck issues 2021-09-21 09:10:48 -05:00
Moshe Litvin
88079d98e6 1. Fixed endianity probem with geneve VNI (ID)
2. Parse remote IP
3. Added unit test to test geneve paramters against "ip link"
2020-12-06 12:36:32 -08:00
Julian Kornberger
023a6dafdc Make go vet happier 2018-11-08 14:21:39 -08:00
Kentaro Ebisawa
f07d9d5231 Run both Inline/Encap mode in TestSEG6RouteAddDel 2018-05-01 15:34:56 -07:00
Yang Guan
41009d533b Read conntrack flow statistics
This PR allows populating per-connection packet and byte counts to
ConntrackFlow object when nf_conntrack_acct is enabled.
2018-03-16 14:29:24 -07:00
Alessandro Boch
6e7bb56ca4 Run TestSocketGet in dedicated netns
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-27 17:51:57 -08:00
Vishvananda Ishaya Abrams
f7e518d6f0 add missing log import 2017-11-08 03:42:16 -08:00
Kentaro Ebisawa
eb7ed874fe Support LWTUNNEL_ENCAP_SEG6 2017-11-08 03:33:01 -08:00
Alessandro Boch
ae21927b7c Exclude linux specific test code from running on other platforms
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-08 03:30:50 -08:00
Alessandro Boch
09a46322b2 Properly use Skip() function, add -test.v when running tests
- No need to separately log the skip message

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-08 03:30:16 -08:00
Alessandro Boch
a47a543cef Allow to skip tests based on min kernel version required
Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
2017-11-08 03:30:16 -08:00
Ian Bishop
0e3b74dbe2 replace syscall with golang.org/x/sys/unix 2017-10-26 09:45:08 -07:00
Chun Chen
7593cff56f Add bridge vlan support 2017-06-13 11:04:51 -07:00
Wataru Ishida
58c32ae2d7 Add support for GPRS Tunnelling Protocol(GTP)
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-05-06 23:07:19 -07:00
ISHIDA Wataru
fe3b5664d2 support MPLS
$ ip -M route add 100 dev eth0
$ ip -M route add 100 as to 200/300 dev eth0
$ ip -M route add 100 nexthop dev eth0 as to 200 \
                      nexthop dev eth1 as to 300
$ ip route add 10.10.0.0/24 encap mpls 200/300 dev eth0
$ ip route add 10.0.0.0/24 nexthop encap mpls 200 dev eth0 \
                           nexthop encap mpls 300 dev eth1

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2017-02-20 12:07:19 -08:00
Sebastien Boving
dbc72376c8 Properly skip tests which require root.
All these tests currently fail with 'Operation not permitted' when run as
non-root.
2017-02-06 09:09:57 -08:00
Alexander Morozov
d710fe886a IPVlan support
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-11 14:18:57 -08:00
Vishvananda Ishaya
1a26b9f251 Move all low level calls into nl subpackage 2014-09-18 19:04:48 -07:00
Vishvananda Ishaya
349cca1850 Formatting cleanup 2014-09-15 17:06:08 -07:00
Vishvananda Ishaya
8dab8b7462 Initial commit of netlink package 2014-08-31 20:34:46 -07:00