Commit Graph

1253 Commits

Author SHA1 Message Date
Stephen Hemminger
742fb8a25c v6.12.0 2024-11-19 08:57:22 -08:00
Stephen Hemminger
d092468f11 uapi: update to bpf.h
Stay insync with upstream

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-29 21:33:41 -07:00
Stephen Hemminger
5498aeb947 uapi: update of bpf.h
Update from 6.12-rc4

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-21 10:22:11 -07:00
Xiao Liang
18bbd74b34 ip: Move of set_netnsid_from_name() to namespace.c
Move set_netnsid_from_name() outside for reuse, like what's done for
netns_id_from_name().

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-17 12:08:08 -07:00
Stephen Hemminger
b32ac38cc4 uapi: update headers
Current headers from 6.12-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-10-05 09:05:28 -07:00
Nicolas Dichtel
57daf8ff8c iplink: fix fd leak when playing with netns
The command 'ip link set foo netns mynetns' opens a file descriptor to fill
the netlink attribute IFLA_NET_NS_FD. This file descriptor is never closed.
When batch mode is used, the number of file descriptor may grow greatly and
reach the maximum file descriptor number that can be opened.

This fd can be closed only after the netlink answer. Moreover, a second
fd could be opened because some (struct link_util)->parse_opt() handlers
call iplink_parse().

Let's add a helper to manage these fds:
 - open_fds_add() stores a fd, up to 5 (arbitrary choice, it seems enough);
 - open_fds_close() closes all stored fds.

Fixes: 0dc34c7713 ("iproute2: Add processless network namespace support")
Reported-by: Alexandre Ferrieux <alexandre.ferrieux@orange.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-09-28 09:24:56 -07:00
Stephen Hemminger
8b9d9ea427 Merge ssh://gitolite.kernel.org/pub/scm/network/iproute2/iproute2-next 2024-09-18 08:45:43 -07:00
Stephen Hemminger
b19d4d6eef v6.11.0 2024-09-15 12:42:26 -07:00
David Ahern
1a605b72ea Update kernel headers
Update kernel headers to commit:
    bfba7bc8b7c2 ("Merge branch 'unmask-dscp-part-four'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-09-09 15:15:51 +00:00
David Ahern
a61a44b608 Update kernel headers
Update kernel headers to commit:
    a99ef548bba0 ("bnx2x: Set ivi->vlan field as an integer")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-08-19 01:04:45 +00:00
Stephen Hemminger
ae32ba8273 uapi: update to 6.11-rc1
Update from 6.11-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-07-29 09:37:31 -07:00
Stephen Hemminger
db0edb90d2 v6.10.0 2024-07-16 19:38:17 -07:00
Stephen Hemminger
39e4b6f5f3 uapi: update to pre 6.10-rc1 headers
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-05-20 08:45:51 -07:00
Stephen Hemminger
08cd3ce70a Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-next 2024-05-13 16:21:11 -07:00
Stephen Hemminger
03e50e0880 v6.9.0 2024-05-12 20:07:45 -07:00
Stephen Hemminger
853f34bf09 uapi: spelling fix for xfrm.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-05-10 16:19:35 -07:00
David Ahern
0475c997c0 Update kernel headers
Update kernel headers to commit:
    5829614a7b3b ("Merge branch 'net-sysctl-sentinel'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-05-03 15:18:43 +00:00
Michal Swiatkowski
976dca372e f_flower: implement pfcp opts
Allow adding tc filter for PFCP header.

Add support for parsing TCA_FLOWER_KEY_ENC_OPTS_PFCP.
Options are as follows: TYPE:SEID.

TYPE is a 8-bit value represented in hex and can be  1
for session header and 0 for node header. In PFCP packet
this is S flag in header.

SEID is a 64-bit session id value represented in hex.

This patch enables adding hardware filters using PFCP fields, see [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=d823265dd45bbf14bd67aa476057108feb4143ce

Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-04-23 15:34:19 +00:00
David Ahern
e7b4fcb2af Merge remote-tracking branch 'main/main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-04-21 01:12:29 +00:00
David Ahern
e6a170a9d4 Update kernel headers
Update kernel headers to commit:
    32affa5578f0 ("fib: rules: no longer hold RTNL in fib_nl_dumprule()")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-04-13 16:32:58 +00:00
Stephen Hemminger
4b3b5375a7 uapi: update headers
User headers based on pre 6.9-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-03-16 08:14:56 -07:00
Petr Machata
95836fbf35 libnetlink: Add rta_getattr_uint()
NLA_UINT attributes have a 4-byte payload if possible, and an 8-byte one if
necessary. Add a function to extract these. Since we need to dispatch on
length anyway, make the getter truly universal by supporting also u8 and
u16.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-03-15 15:03:06 +00:00
David Ahern
8b3b71898d Update kernel headers
Update kernel headers to commit:
    237bb5f7f7f5 ("cxgb4: unnecessary check for 0 in the free_sge_txq_uld() function")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-03-15 15:02:15 +00:00
Stephen Hemminger
ade05d59c3 Merge branch 'main' of git://git.kernel.org/pub/scm/network/iproute2/iproute2-next 2024-03-11 16:39:39 -07:00
Stephen Hemminger
e5fd785830 v6.8.0 2024-03-11 08:53:55 -07:00
Denis Kirjanov
a9fce55334 iproute2: move generic_proc_open into lib
the function has the same definition in ifstat and ss

v2: fix the typo in the chagelog
v3: rebase on master

Signed-off-by: Denis Kirjanov <dkirjanov@suse.de>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-03-06 16:23:10 +00:00
David Ahern
691b688900 Update kernel headers
Update kernel headers to commit
    4b2765ae410a ("Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-03-03 22:24:26 +00:00
Stephen Hemminger
68eef949c2 uapi: update in6.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-02-29 16:09:24 -08:00
David Ahern
f900302f32 Merge remote-tracking branch 'main/main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-02-18 17:41:39 +00:00
Andrea Claudi
9cf6493cab treewide: fix typos in various comments
Fix various typos and spelling errors in some iproute2 comments.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-02-09 08:45:10 -08:00
David Ahern
cb47f27143 Update kernel headers
Update kernel headers to commit:
    1e8f1477aba5 ("Merge branch 'net-phy-c22-c45-enumeration'")

Signed-off-by: David Ahern <dsahern@kernel.org>
2024-02-07 16:25:36 +00:00
Stephen Hemminger
325c96e749 uapi: update virtio_config.h
Updated from to 6.8.0-rc1.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-22 10:11:00 -08:00
Stephen Hemminger
a10e05ad35 uapi: remove tc_ipt.h
Removed upstream.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-18 08:13:21 -08:00
Stephen Hemminger
dc517768cc uapi: update headers from 6.8-rc1
Removal of no longer used TC structs.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2024-01-15 09:39:36 -08:00
David Ahern
97d3edd743 Merge remote-tracking branch 'main/main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-01-08 19:25:43 +00:00
Stephen Hemminger
3dc3445bbf v6.7.0 2024-01-08 09:38:23 -08:00
Stephen Hemminger
45dc10463d remove support for iptables action
There is an open upstream kernel patch to remove ipt action from
kernel. This is corresponding iproute2 change.

 - Remove support fot ipt and xt in tc.
 - Remove no longer used header files.
 - Update man pages.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2024-01-08 01:44:50 +00:00
David Ahern
4be86f8e27 Update kernel headers
Update kernel headers to commit:
    92de776d2090 ("Merge tag 'mlx5-updates-2023-12-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux")

Signed-off-by: David Ahern <dsahern@kernel.org>
2023-12-30 14:25:22 -07:00
Benjamin Poirier
d205b5cf38 bridge: Provide rta_type()
Factor out the repeated code pattern
rta_type = attr->rta_type & NLA_TYPE_MASK
into a helper which is similar to the existing kernel function nla_type().

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:58:16 -08:00
Benjamin Poirier
1d73bfc8ab bridge: Deduplicate print_range()
The two implementations are now identical so keep only one instance and
move it to json_print.c where there are already a few other specialized
printing functions.

The string that's formatted in the "end" buffer is only needed when
outputting a range so move the snprintf() call within the condition.

The second argument's purpose is better conveyed by calling it "end" rather
than "id" so rename it.

Reviewed-by: Petr Machata <petrm@nvidia.com>
Tested-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-22 09:57:54 -08:00
Stephen Hemminger
aed89de0e1 uapi: update stddef.h
Change from upstream 6.7-rc4

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-12-08 09:27:59 -08:00
David Ahern
7775a2306b Update kernel headers
Update kernel headers to commit:
    074ac38d5b95 ("octeontx2-af: cn10k: Increase outstanding LMTST transactions")

Signed-off-by: David Ahern <dsahern@kernel.org>
2023-12-06 17:08:17 +00:00
David Ahern
f441c02221 Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-22 19:38:34 +00:00
Petr Machata
2b8766663d lib: utils: Introduce parse_one_of_deprecated()
The function parse_one_of() currently uses matches() for string comparison
under the hood. Extending matches()-based parsers is tricky, because newly
added matches might change the way strings are parsed, if the newly-added
string shares a prefix with a string that is matched later in the code.

In this patch, introduce a new function, parse_one_of_deprecated(). This
will be currently synonymous with parse_one_of(), however the latter will
change behavior in the next patch.

Use the new function for parsing of the macsec "validate" option. The
reason is that the valid strings for that option are "disabled", "check"
and "strict". It is not hard to see how "disabled" could be misspelled as
"disable", and be baked in some script in this form.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-22 19:32:09 +00:00
Petr Machata
60254925cc lib: utils: Switch matches() to returning int again
Since commit 1f420318bd ("utils: don't match empty strings as prefixes")
the function has pretended to return a boolean. But every user expects it
to return zero on success and a non-zero value on failure, like strcmp().
Even the function itself actually returns "true" to mean "no match". This
only makes sense if one considers a boolean to be a one-bit unsigned
integer with no inherent meaning, which I do not think is reasonable.

Switch the prototype back to int, and return 1 instead of true.

Cc: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-22 19:31:55 +00:00
Stephen Hemminger
22f27fcb13 uapi: update headers from 6.7-rc1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2023-11-13 08:38:58 -08:00
Jiri Pirko
2ded9c18a3 devlink: introduce support for netns id for nested handle
Nested handle may contain DEVLINK_ATTR_NETNS_ID attribute that indicates
the network namespace where the nested devlink instance resides. Process
this converting to netns name if possible and print to user.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-11 17:31:29 +00:00
Jiri Pirko
a59b83f73d ip/ipnetns: move internals of get_netnsid_from_name() into namespace.c
In order to be able to reuse get_netnsid_from_name() function outside of
ip code, move the internals to lib/namespace.c to a new function called
netns_id_from_name().

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-11 17:30:59 +00:00
Stephen Hemminger
cb0709b74f Merge branch 'main' of git://git.kernel.org/pub/scm/network/iproute2/iproute2-next 2023-11-06 12:40:38 -08:00
David Ahern
34d5458cfb Update kernel headers
Update kernel headers to commit:
    ff269e2cd5ad ("Merge tag 'net-next-6.7-followup' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next")

Import mptcp_pm.h due to a new dependency.

Signed-off-by: David Ahern <dsahern@kernel.org>
2023-11-06 10:08:23 -07:00