Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
|
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
5829614a7b3b ("Merge branch 'net-sysctl-sentinel'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
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>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
32affa5578f0 ("fib: rules: no longer hold RTNL in fib_nl_dumprule()")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
User headers based on pre 6.9-rc1
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
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>
|
|
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>
|
|
git://git.kernel.org/pub/scm/network/iproute2/iproute2-next
|
|
|
|
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>
|
|
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>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
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>
|
|
Update kernel headers to commit:
1e8f1477aba5 ("Merge branch 'net-phy-c22-c45-enumeration'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Updated from to 6.8.0-rc1.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Removed upstream.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Removal of no longer used TC structs.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Change from upstream 6.7-rc4
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
074ac38d5b95 ("octeontx2-af: cn10k: Increase outstanding LMTST transactions")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
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>
|
|
Since commit 1f420318bda3 ("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>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
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>
|
|
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>
|
|
git://git.kernel.org/pub/scm/network/iproute2/iproute2-next
|
|
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>
|
|
|
|
|
|
The BPF verifier allows setting a higher verbosity level, which is
helpful when it comes to debugging verifier issue, specially when used
on BPF program that loads successfully (but should not have passed the
verifier in the first place). Increase the BPF verifier log level when
in verbose mode to help with such cases.
Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit
dcf02bac377e ("Merge branch 'net-stmmac-improve-tx-timer-logic'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update to if_packet.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Benefit from GET_POLICY command of ctrl netlink and introduce a helper
that dumps policies and finds out, if there is a separate policy
specified for dump op of specified command.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
Update kernel headers to commit:
6c9cfb853063 ("net: ethernet: mtk_wed: minor change in wed_{tx,rx}info_show")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
When using ip vrf and SELinux is enabled, make sure to set the exec file
context before calling cmd_exec.
This ensures that the command is executed with the right context,
falling back to the ifconfig_t context when needed.
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
ss provides some selinux stub functions, useful when iproute2 is
compiled without selinux support.
Move them to lib/ so we can use them in other iproute2 tools.
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Mathieu Schroeter <mathieu@schroetersa.ch>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Mathieu Schroeter <mathieu@schroetersa.ch>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Based off ov 6.5-rc5
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
34093c9fa05d ("net: Remove duplicated include in mac.c")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Add support for the so called "stateless" configuration pattern (read
from /etc, fall back to /usr), giving system administrators a way to
define local configuration without changing any distro-provided files.
In practice this means that each configuration file FOO is loaded
from /usr/lib/iproute2/FOO unless /etc/iproute2/FOO exists.
Signed-off-by: Gioele Barabucci <gioele@svario.it>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
All headers and source in iproute2 should be using SPDX license info.
Add a couple that were missed, and take off boilerplate.
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
The files bpf_api.h and bpf_elf.h are useful for TC BPF programs
to use. And there is no requirement that those be GPL only;
we intend to allow BSD licensed BPF helpers as well.
This makes the file license same as libbpf.
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
|
|
|
Update kernel headers to commit:
cc7554954848 ("net: micrel: Change to receive timestamp in the frame for lan8841")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
ae91f7e436f8 ("net/pppoe: fix a typo for the PPPOE_HASH_BITS_1 definition")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Function was defined but not used in current iproute2 code.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
No need to expose these parts of command line parsing.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
The function rtnl_addproto_a2n() was defined but never used.
Use it to allow for symbolic names, and fix the function signatures
so protocol value is consistently __u8.
Fixes: bdb8d8549ed9 ("ip: Support IP address protocol")
Cc: petrm@nvidia.com
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Minor addition to in.h
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Add new helper function print_bool_opt() which prints
with no prefix and use it for vxlan options.
If the option matches the expected default value,
it is not printed if in non JSON mode unless the details
setting is repeated.
Use a table for the vxlan options. This will change
the order of the printing of options.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
All kernel header files should come from local copy of sanitized
headers, rather than relying on what Linux distribution ships.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
|
|
|
There is already a min() definition, add this below it.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
fbc1449d385d ("Merge tag 'mlx5-updates-2023-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
e28531143b25 ("net: ethernet: mtk_eth_soc: mtk_ppe: prefer newly added l2 flows")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
IPv4 and IPv6 addresses can be assigned a protocol value that indicates the
provenance of the IP address. The attribute is modeled after ip route
protocols, and essentially allows the administrator or userspace stack to
tag addresses in some way that makes sense to the actor in question.
Support for this feature was merged with commit 47f0bd503210 ("net: Add new
protocol attribute to IP addresses"), for kernel 5.18.
In this patch, add support for setting the protocol attribute at IP address
addition, replacement, and listing requests.
An example session with the feature in action:
# ip address add dev d 192.0.2.1/28 proto 0xab
# ip address show dev d
26: d: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 06:29:74:fd:1f:eb brd ff:ff:ff:ff:ff:ff
inet 192.0.2.1/28 scope global proto 0xab d
valid_lft forever preferred_lft forever
# ip address replace dev d 192.0.2.1/28 proto 0x11
# ip address show dev d
26: d: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 06:29:74:fd:1f:eb brd ff:ff:ff:ff:ff:ff
inet 192.0.2.1/28 scope global proto 0x11 d
valid_lft forever preferred_lft forever
A JSON dump. The protocol value is always provided as a string, even in
numeric mode, to provide a consistent interface.
# ip -j address show dev d | jq
[
{
"ifindex": 26,
"ifname": "d",
"flags": [
"BROADCAST",
"NOARP"
],
"mtu": 1500,
"qdisc": "noop",
"operstate": "DOWN",
"group": "default",
"txqlen": 1000,
"link_type": "ether",
"address": "06:29:74:fd:1f:eb",
"broadcast": "ff:ff:ff:ff:ff:ff",
"addr_info": [
{
"family": "inet",
"local": "192.0.2.1",
"prefixlen": 28,
"scope": "global",
"protocol": "0x11",
"label": "d",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
}
]
}
]
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
da617cd8d906 ("smsc911x: remove superfluous variable init")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
fcb3a4653bc5 ("net/sched: act_api: use the correct TCA_ACT attributes in dump")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Upstream 6.2-rc2
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
61d731e6538d ("Merge tag 'linux-can-next-for-6.3-20230206' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit
a7b87d2a31dc ("Merge branch 'mlxsw-add-support-of-latency-tlv'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Conflicts:
devlink/devlink.c
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
Update kernel headers to commit:
7e68dd7d07a2 ("Merge tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
The netlink header must be first in the netlink message, so move it
there.
Fixes: fee4a56f0191 ("Update kernel headers")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
dbadae927287 ("tsnep: Rework RX buffer allocation")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Conflicts:
include/uapi/linux/bpf.h
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
bf46390f39c6 ("Merge branch 'genetlink-per-op-type-policies'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
|
|
|
Update kernel headers to commit:
62c07983bef9 ("once: add DO_ONCE_SLOW() for sleepable contexts")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
bc37b24ee05e ("Merge branch 'mlx5-xsk-updates-part3-2022-09-30'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Add a new function rtnl_echo_talk() that could be used when the
sub-component supports NLM_F_ECHO flag. With this function we can
remove the redundant code added by commit b264b4c6568c7 ("ip: add
NLM_F_ECHO support").
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
There is no rule to have an error code after NLMSG_DONE msg. The only reason
we has this offset is that kernel function netlink_dump_done() has an error
code followed by the netlink message header.
Making nl_dump_ext_ack_done() has an offset parameter. So we can adjust
this for NLMSG_DONE message without error code.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
When user space configures the kernel with netlink messages, it can set the
NLM_F_ECHO flag to request the kernel to send the applied configuration back
to the caller. This allows user space to retrieve configuration information
that are filled by the kernel (either because these parameters can only be
set by the kernel or because user space let the kernel choose a default
value).
NLM_F_ACK is also supplied incase the kernel doesn't support NLM_F_ECHO
and we will wait for the reply forever. Just like the update in
iplink.c, which I plan to post a patch to kernel later.
A new parameter -echo is added when user want to get feedback from kernel.
e.g.
# ip -echo addr add 192.168.0.1/24 dev eth1
3: eth1 inet 192.168.0.1/24 scope global eth1
valid_lft forever preferred_lft forever
# ip -j -p -echo addr del 192.168.0.1/24 dev eth1
[ {
"deleted": true,
"index": 3,
"dev": "eth1",
"family": "inet",
"local": "192.168.0.1",
"prefixlen": 24,
"scope": "global",
"label": "eth1",
"valid_life_time": 4294967295,
"preferred_life_time": 4294967295
} ]
Suggested-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
0140a7168f8b ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update headers based on 6.0-rc6
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
mnlu_gen_socket_open opens a socket and configures it for use with a
generic netlink family. As part of this process it sends a
CTRL_CMD_GETFAMILY to get the ID for the family name requested.
In addition to the family id, this command reports a few other useful
values including the maximum attribute. The maximum attribute is useful in
order to know whether a given attribute is supported and for knowing the
necessary size to allocate for other operations such as policy dumping.
Since we already have to issue a CTRL_CMD_GETFAMILY to get the id, we can
also store the maximum attribute as well. Modify the callback functions to
parse the maximum attribute NLA and store it in the mnlu_gen_socket
structure.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
cb45a8bf4693 ("net: axienet: Switch to 64-bit RX/TX statistics")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
These are the post-merge of netwoking user headers.
Note: this fixes compilation with gcc-12
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
Update kernel headers to commit
63757225a933 ("Merge tag 'mlx5-updates-2022-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Introduce PPPoE specific fields in tc-flower:
- session id (16 bits)
- ppp protocol (16 bits)
Those fields can be provided only when protocol was set to
ETH_P_PPP_SES. ppp_proto works similar to vlan_ethtype, i.e.
ppp_proto overwrites eth_type. Thanks to that, fields from
encapsulated protocols (such as src_ip) can be specified.
e.g.
# tc filter add dev ens6f0 ingress prio 1 protocol ppp_ses \
flower \
pppoe_sid 1234 \
ppp_proto ip \
dst_ip 127.0.0.1 \
src_ip 127.0.0.2 \
action drop
Vlan and cvlan is also supported, in this case cvlan_ethtype
or vlan_ethtype has to be set to ETH_P_PPP_SES.
e.g.
# tc filter add dev ens6f0 ingress prio 1 protocol 802.1Q \
flower \
vlan_id 2 \
vlan_ethtype ppp_ses \
pppoe_sid 1234 \
ppp_proto ip \
dst_ip 127.0.0.1 \
src_ip 127.0.0.2 \
action drop
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Acked-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
PPP protocol field uses different values than ethertype. Introduce
utilities for translating PPP protocols from strings to values
and vice versa. Use generic API from utils in order to get
proto id and name.
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Acked-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Move core logic of ll_proto_n2a and ll_proto_a2n
to utils.c and make it more generic by allowing to
pass table of protocols as argument (proto_tb).
Introduce struct proto with protocol ID and name to
allow this. This wil allow to use those functions by
other use cases.
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Acked-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
__kernel_old_time_t definition is needed for pppoe-in-flower patches.
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
ppp_defs header file is needed by PPPoE in flower support.
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
5588d6280270 ("net/cdc_ncm: Increase NTB max RX/TX values to 64kb")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Keep VDPA sanitized headers up to current kernel.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
This reverts commit 291898c5ff881d0dc5d947031def0528101476cb.
|
|
When vdpa was updated, it included linux/virtio_ring.h but that
sanitized header file was not added.
Fixes: bd91c7647189 ("vdpa: Allow for printing negotiated features of a device")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Iproute2 depends on kernel headers and all necessary kernel headers
should be in iproute tree.
Fixes: c2ecc82b9d4c ("vdpa: Add vdpa tool")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
In bpf program, only the program name is unique. Before this patch, if there
are multiple programs with the same section name, only the first program
will be attached. With program name support, users could specify the exact
program they want to attach.
Note this feature is only supported when iproute2 build with libbpf.
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
ebeae54d3a77 ("net: pcs: xpcs: depends on PHYLINK in Kconfig")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
From 5.19-rc0
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
27f2533bcc6e ("nfp: flower: support to offload pedit of IPv6 flowinto fields")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
a65cc8435540 ("Merge branch 'bnxt_en-next'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Add support for "-s" option which causes bridge vni to dump per-vni
statistics. Note that it disables vni range compression.
Example:
$ bridge -s vni | more
dev vni group/remote
vxlan0 1024 239.1.1.1
RX: bytes 0 pkts 0 drops 0 errors 0
TX: bytes 0 pkts 0 drops 0 errors 0
1025 239.1.1.1
RX: bytes 0 pkts 0 drops 0 errors 0
TX: bytes 0 pkts 0 drops 0 errors 0
Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Signed-off-by: Roopa Prabhu <roopa@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
This patch adds bridge command to manage
recently added vnifilter on a collect metadata
vxlan device.
examples:
$bridge vni add dev vxlan0 vni 400
$bridge vni add dev vxlan0 vni 200 group 239.1.1.101
$bridge vni del dev vxlan0 vni 400
$bridge vni show
$bridge -s vni show
Signed-off-by: Roopa Prabhu <roopa@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
A number of functions in the rtnl_*_req family accept a caller-provided
callback to set up arbitrary filtering. rtnl_statsdump_req_filter()
currently only allows setting a field in the IFSM header, not custom
attributes. So far these were not necessary, but with introduction of more
detailed filtering settings, the callback becomes necessary.
To that end, add a filter_fn and filter_data arguments to the function.
Unlike the other filters, this one is typed to expect an IFSM pointer, to
permit tweaking the header itself as well.
Pass NULLs in the existing callers.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
cc271ab86606 ("wwan_hwsim: Avoid flush_scheduled_work() usage")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
Update kernel headers to commit:
092d992b76ed ("Merge tag 'mlx5-updates-2022-03-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
asprintf() allocates memory which is not freed on the error path of
get_task_name(), thus potentially leading to memory leaks.
%m specifier on fscanf allocates memory, too, which needs to be freed by
the caller.
This reworks get_task_name() to avoid memory allocation.
- Pass a buffer and its length to the function, similarly to what
get_command_name() does, thus avoiding to allocate memory for
the string to be returned;
- Use snprintf() instead of asprintf();
- Use fgets() instead of fscanf() to limit string length.
Fixes: 81bfd01a4c9e ("lib: move get_task_name() from rdma")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Move bpf syscall wrapper to bpf_glue to make it available to libbpf
based functions.
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
1039135aedfc ("net: ethernet: sun: Remove redundant code")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
7b779cc8846a ("Merge branch 'octeontx2-ptp-updates'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
d8c2858181cc ("net/switchdev: use struct_size over open coded arithmetic")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
One more format attribute needed to resolve clang warnings.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
These headers are referred to by virtio_net but were
not in uapi directory.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
All iproute2 headers should come from sanitized kernel headers
not the local system.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
fe8152b38d3a ("Merge tag 'devprop-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
Update kernel headers to commit:
f85b244ee395 ("xdp: move the if dev statements to the first")
and import virtio_net.h for vdpa.
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
From 5.16-rc5
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Merged from 5.16-rc3
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
bb14bfc7eb92 ("net: lan966x: fix a IS_ERR() vs NULL check in lan966x_create_targets()")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update vdpa headers based on 5.16.0-rc1 and remove redundant
copy.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
vdpa header file is already present in the tree at
vdpa/include/uapi/linux/vdpa.h and used by vdpa/vdpa.c.
As we discussed in thread [1] vdpa header comes from a different
tree, similar to rdma subsystem. Hence remove the duplicate vdpa
UAPI header file.
[1] https://www.spinics.net/lists/netdev/msg748458.html
Fixes: b5a6ed9cc9fc ("uapi: add missing virtio related headers")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Impor amt.h uapi from last kernel sync point
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
cc0356d6a02e ("Merge tag 'x86_core_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
See kernel
Commit 844f7eaaed9 ("include/uapi/linux/xfrm.h: Fix XFRM_MSG_MAPPING ABI breakage")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
295711fa8fec ("Merge branch 'dpaa2-irq-coalescing'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
49ed8dde3715 ("net: usb: use eth_hw_addr_set() for dev->addr_len cases")
Update to linux/mptcp.h is removed because it breaks compilation
of ipmptcp.c in a nontrivial way.
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
ROSE addresses are ten digit numbers, basically like North American
telephone numbers.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
NETROM uses AX.25 addresses so this is a simple wrapper around ax25_ntop1.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
AX.25 addresses are based on Amateur radio callsigns followed by an SSID
like XXXXXX-SS where the callsign is up to 6 characters which are either
letters or digits and the SSID is a decimal number in the range 0..15.
Amateur radio callsigns are assigned by a country's relevant authorities
and are 3..6 characters though a few countries have assigned callsigns
longer than that. AX.25 is not able to handle such longer callsigns.
Being based on HDLC AX.25 encodes addresses by shifting them one bit left
thus zeroing bit 0, the HDLC extension bit for all but the last bit of
a packet's address field but for our purposes here we're not considering
the HDLC extension bit that is it will always be zero.
Linux' internal representation of AX.25 addresses in Linux is very similar
to this on the on-air or on-the-wire format. The callsign is padded to
6 octets by adding spaces, followed by the SSID octet then all 7 octets
are left-shifted by one byte.
This for example turns "LINUX-1" where the callsign is LINUX and SSID is 1
into 98:92:9c:aa:b0:40:02.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Small changes to virtio etc.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Iproute2 has not supported DECnet or IPX since version 5.0.
There were some leftover support in the ip options flags
and parsing, remove these.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
New headers from 5.15 early merge.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Update kernel headers to commit:
88be32634905 ("Merge branch 'dsa-tagger-helpers'")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Import ioam6 uapi headers from kernel headers at last sync commit.
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
1187c8c4642d ("net: phy: mscc: make some arrays static const, makes object smaller")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
We started to use in-kernel filtering feature which allows to get only
needed tables (see iproute_dump_filter()). From the kernel side it's
implemented in net/ipv4/fib_frontend.c (inet_dump_fib), net/ipv6/ip6_fib.c
(inet6_dump_fib). The problem here is that behaviour of "ip route save"
was changed after
c7e6371bc ("ip route: Add protocol, table id and device to dump request").
If filters are used, then kernel returns ENOENT error if requested table
is absent, but in newly created net namespace even RT_TABLE_MAIN table
doesn't exist. It is really allocated, for instance, after issuing
"ip l set lo up".
Reproducer is fairly simple:
$ unshare -n ip route save > dump
Error: ipv4: FIB table does not exist.
Dump terminated
Expected result here is to get empty dump file (as it was before this
change).
v2: reworked, so, now it takes into account NLMSGERR_ATTR_MSG
(see nl_dump_ext_ack_done() function). We want to suppress error messages
in stderr about absent FIB table from kernel too.
v3: reworked to make code clearer. Introduced rtnl_suppressed_errors(),
rtnl_suppress_error() helpers. User may suppress up to 3 errors (may be
easily extended by changing SUPPRESS_ERRORS_INIT macro).
v4: reworked, rtnl_dump_filter_errhndlr() was introduced. Thanks
to Stephen Hemminger for comments and suggestions
v5: space fixes, commit message reformat, empty initializers
Fixes: c7e6371bc ("ip route: Add protocol, table id and device to dump request")
Cc: David Ahern <dsahern@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: Andrei Vagin <avagin@gmail.com>
Cc: Alexander Mikhalitsyn <alexander@mihalicyn.com>
Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn@virtuozzo.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
|
|
devlink and vdpa use BIT() together with 64-bit flag fields. devlink
is already using bit numbers greater than 31 and so does not work
correctly on 32-bit architectures.
Fix this by making BIT() use uint64_t instead of unsigned long.
Signed-off-by: Ben Hutchings <ben.hutchings@mind.be>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Final 5.13 header update
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
Import wwan.h uapi file at version from last kernel headers sync.
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Update kernel headers to commit:
ef2c3ddaa4ed ("ibmvnic: Use strscpy() instead of strncpy()")
Signed-off-by: David Ahern <dsahern@kernel.org>
|
|
Large tc filters can have many arguments. For example the following
filter matches the first 7 MPLS LSEs, pops all of them, then updates
the Ethernet header and redirects the resulting packet to eth1.
filter add dev eth0 ingress handle 44 priority 100 \
protocol mpls_uc flower mpls \
lse depth 1 label 1040076 tc 4 bos 0 ttl 175 \
lse depth 2 label 89648 tc 2 bos 0 ttl 9 \
lse depth 3 label 63417 tc 5 bos 0 ttl 185 \
lse depth 4 label 593135 tc 5 bos 0 ttl 67 \
lse depth 5 label 857021 tc 0 bos 0 ttl 181 \
lse depth 6 label 239239 tc 1 bos 0 ttl 254 \
lse depth 7 label 30 tc 7 bos 1 ttl 237 \
action mpls pop protocol mpls_uc pipe \
action mpls pop protocol mpls_uc pipe \
action mpls pop protocol mpls_uc pipe \
action mpls pop protocol mpls_uc pipe \
action mpls pop protocol mpls_uc pipe \
action mpls pop protocol mpls_uc pipe \
action mpls pop protocol ipv6 pipe \
action vlan pop_eth pipe \
action vlan push_eth \
dst_mac 00:00:5e:00:53:7e \
src_mac 00:00:5e:00:53:03 pipe \
action mirred egress redirect dev eth1
This filter has 149 arguments, so it can't be used with tc -batch
which is limited to a 100.
Let's bump the limit to 512. That should leave a lot of room for big
batch commands.
v2:
-Define the limit in utils.h (Stephen Hemminger)
-Bump the limit even higher (256 -> 512) (Stephen Hemminger)
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
|