Re: [PATCH v2 net 2/2] net: core: generic XDP support for stacked device

2019-05-21 Thread Jiri Pirko
Tue, May 21, 2019 at 04:45:53PM CEST, [email protected] wrote: >On Tue, 21 May 2019 08:15:36 +0200 >Jiri Pirko wrote: > >> +if (static_branch_unlikely(&generic_xdp_needed_key)) { >> +int ret2; >> + >> +preempt_dis

[patch net-next v2] devlink: add warning in case driver does not set port type

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Prevent misbehavior of drivers who would not set port type for longer period of time. Drivers should always set port type. Do WARN if that happens. Note that it is perfectly fine to temporarily not have the type set, during initialization and port type change. Signed-off-by

[patch net-next 2/7] mlx5: Move firmware flash implementation to devlink

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 35

[patch net-next 0/7] expose flash update status to user

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko When user is flashing device using devlink, he currenly does not see any information about what is going on, percentages, etc. Drivers, for example mlxsw and mlx5, have notion about the progress and what is happening. This patchset exposes this progress information to userspace

[patch net-next 1/7] mlxsw: Move firmware flash implementation to devlink

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c| 15 ++ drivers/net/ethernet/mellanox/mlxsw/core.h| 3

[patch net-next 3/7] mlxfw: Propagate error messages through extack

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Currently the error messages are printed to dmesg. Propagate them also to directly to user doing the flashing through extack. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 ++-- .../net/ethernet/mellanox/mlx5/core/main.c| 2

[patch net-next 4/7] devlink: allow driver to update progress of flash update

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Introduce a function to be called from drivers during flash. It sends notification to userspace about flash update progress. Signed-off-by: Jiri Pirko --- include/net/devlink.h| 8 +++ include/uapi/linux/devlink.h | 5 ++ net/core/devlink.c | 102

[patch net-next 6/7] mlxsw: Implement flash update status notifications

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Implement mlxfw status_notify op by passing notification down to devlink. Also notify about flash update begin and end. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff

[patch net-next 5/7] mlxfw: Introduce status_notify op and call it to notify about the status

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Add new op status_notify which is called to update the user about flashing status. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 4 .../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 24 +++ 2 files changed, 28 insertions

[patch net-next 7/7] netdevsim: implement fake flash updating with notifications

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/dev.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/net/netdevsim/dev.c b/drivers/net/netdevsim/dev.c index b509b941d5ca..c15b86f9cd2b 100644 --- a/drivers/net/netdevsim

[patch iproute2 2/3] devlink: implement flash update status monitoring

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Kernel sends notifications about flash update status, so implement these messages for monitoring. Signed-off-by: Jiri Pirko --- devlink/devlink.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/devlink/devlink.c b/devlink

[patch iproute2 3/3] devlink: implement flash status monitoring

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Listen to status notifications coming from kernel during flashing and put them on stdout to inform user about the status. Signed-off-by: Jiri Pirko --- devlink/devlink.c | 209 +- devlink/mnlg.c| 5 ++ devlink/mnlg.h| 1

[patch iproute2 1/3] header update

2019-05-23 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/devlink.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index 3b6a9e6be3ac..6544824a0b97 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux

Re: [patch net-next 3/7] mlxfw: Propagate error messages through extack

2019-05-24 Thread Jiri Pirko
Thu, May 23, 2019 at 05:19:46PM CEST, [email protected] wrote: >On 5/23/19 3:45 AM, Jiri Pirko wrote: >> @@ -57,11 +58,13 @@ static int mlxfw_fsm_state_wait(struct mlxfw_dev >> *mlxfw_dev, u32 fwhandle, >> if (fsm_state_err != MLXFW_FSM_STATE_ERR_OK) { >>

Re: [patch iproute2 3/3] devlink: implement flash status monitoring

2019-05-24 Thread Jiri Pirko
Thu, May 23, 2019 at 07:57:03PM CEST, [email protected] wrote: >On Thu, 23 May 2019 11:47:10 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Listen to status notifications coming from kernel during flashing and >> put them on stdout to inform user abou

Re: [patch net-next 0/7] expose flash update status to user

2019-05-24 Thread Jiri Pirko
Thu, May 23, 2019 at 08:37:28PM CEST, [email protected] wrote: >On Thu, 2019-05-23 at 11:45 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> When user is flashing device using devlink, he currenly does not see >> any >> information about what is going on,

Re: [patch net-next 7/7] netdevsim: implement fake flash updating with notifications

2019-05-24 Thread Jiri Pirko
Thu, May 23, 2019 at 07:47:54PM CEST, [email protected] wrote: >On Thu, 23 May 2019 11:45:10 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Signed-off-by: Jiri Pirko >> --- >> drivers/net/netdevsim/dev.c | 35 +++

Re: [patch net-next 3/7] mlxfw: Propagate error messages through extack

2019-05-24 Thread Jiri Pirko
Fri, May 24, 2019 at 05:54:46PM CEST, [email protected] wrote: >On Fri, 24 May 2019 10:11:10 +0200, Jiri Pirko wrote: >> Thu, May 23, 2019 at 05:19:46PM CEST, [email protected] wrote: >> >On 5/23/19 3:45 AM, Jiri Pirko wrote: >> >> @@ -57,11 +58,13 @@ s

Re: [patch net-next 3/7] mlxfw: Propagate error messages through extack

2019-05-27 Thread Jiri Pirko
Sat, May 25, 2019 at 02:08:52AM CEST, [email protected] wrote: >On Sat, 25 May 2019 00:26:35 +0200, Jiri Pirko wrote: >> Fri, May 24, 2019 at 05:54:46PM CEST, [email protected] wrote: >> >On Fri, 24 May 2019 10:11:10 +0200, Jiri Pirko wrote: >> >&

Re: [patch net-next 0/7] expose flash update status to user

2019-05-28 Thread Jiri Pirko
Mon, May 27, 2019 at 08:14:32PM CEST, [email protected] wrote: > > >On 5/23/2019 2:45 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> When user is flashing device using devlink, he currenly does not see any >> information about what is going on, percentages, e

Re: [PATCH net-next] team: add ethtool get_link_ksettings

2019-05-28 Thread Jiri Pirko
Mon, May 27, 2019 at 05:31:10AM CEST, [email protected] wrote: >Like bond, add ethtool get_link_ksettings to show the total speed. > >Signed-off-by: Hangbin Liu >--- > drivers/net/team/team.c | 25 + > 1 file changed, 25 insertions(+) > >diff --git a/drivers/net/team/team

Re: [PATCH net-next] team: add ethtool get_link_ksettings

2019-05-28 Thread Jiri Pirko
Tue, May 28, 2019 at 12:02:11PM CEST, [email protected] wrote: >On Tue, May 28, 2019 at 11:08:23AM +0200, Jiri Pirko wrote: >> >+static int team_ethtool_get_link_ksettings(struct net_device *dev, >> >+ struct ethtoo

Re: [patch net-next 0/7] expose flash update status to user

2019-05-28 Thread Jiri Pirko
Thu, May 23, 2019 at 08:37:28PM CEST, [email protected] wrote: >On Thu, 2019-05-23 at 11:45 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> When user is flashing device using devlink, he currenly does not see >> any >> information about what is going on,

[patch net-next v2 4/7] devlink: allow driver to update progress of flash update

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Introduce a function to be called from drivers during flash. It sends notification to userspace about flash update progress. Signed-off-by: Jiri Pirko --- include/net/devlink.h| 8 +++ include/uapi/linux/devlink.h | 5 ++ net/core/devlink.c | 102

[patch net-next v2 1/7] mlxsw: Move firmware flash implementation to devlink

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/core.c| 15 ++ drivers/net/ethernet/mellanox/mlxsw/core.h| 3

[patch net-next v2 5/7] mlxfw: Introduce status_notify op and call it to notify about the status

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Add new op status_notify which is called to update the user about flashing status. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 4 .../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 24 +++ 2 files changed, 28 insertions

[patch net-next v2 7/7] netdevsim: implement fake flash updating with notifications

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- v1->v2: - added debugfs toggle to enable/disable flash status notifications --- drivers/net/netdevsim/dev.c | 44 +++ drivers/net/netdevsim/netdevsim.h | 1 + 2 files changed, 45 insertions(+) diff --gi

[patch net-next v2 3/7] mlxfw: Propagate error messages through extack

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Currently the error messages are printed to dmesg. Propagate them also to directly to user doing the flashing through extack. Signed-off-by: Jiri Pirko --- v1->v2: - dropped "is which" from errmsg. --- drivers/net/ethernet/mellanox/mlx5/core/fw.c | 6 ++-- ...

[patch net-next v2 2/7] mlx5: Move firmware flash implementation to devlink

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 35

[patch net-next v2 0/7] expose flash update status to user

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko When user is flashing device using devlink, he currenly does not see any information about what is going on, percentages, etc. Drivers, for example mlxsw and mlx5, have notion about the progress and what is happening. This patchset exposes this progress information to userspace

[patch net-next v2 6/7] mlxsw: Implement flash update status notifications

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Implement mlxfw status_notify op by passing notification down to devlink. Also notify about flash update begin and end. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff

[patch net-next v2 1/3] header update

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/devlink.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index 3b6a9e6be3ac..6544824a0b97 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux

[patch net-next v2 3/3] devlink: implement flash status monitoring

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Listen to status notifications coming from kernel during flashing and put them on stdout to inform user about the status. Signed-off-by: Jiri Pirko --- v1->v2: - fixed endless loop bug in case of no notifications --- devlink/devlink.c |

[patch net-next v2 2/3] devlink: implement flash update status monitoring

2019-05-28 Thread Jiri Pirko
From: Jiri Pirko Kernel sends notifications about flash update status, so implement these messages for monitoring. Signed-off-by: Jiri Pirko --- devlink/devlink.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/devlink/devlink.c b/devlink

Re: [patch net-next v2 7/7] netdevsim: implement fake flash updating with notifications

2019-05-29 Thread Jiri Pirko
Tue, May 28, 2019 at 10:01:15PM CEST, [email protected] wrote: >On Tue, 28 May 2019 13:48:46 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Signed-off-by: Jiri Pirko >> --- >> v1->v2: >> - added debugfs toggle to enable/disable flash stat

Re: [patch net-next v2 7/7] netdevsim: implement fake flash updating with notifications

2019-05-29 Thread Jiri Pirko
Wed, May 29, 2019 at 06:47:54PM CEST, [email protected] wrote: >On Wed, 29 May 2019 10:00:16 +0200, Jiri Pirko wrote: >> Tue, May 28, 2019 at 10:01:15PM CEST, [email protected] wrote: >> >On Tue, 28 May 2019 13:48:46 +0200, Jiri Pirko wrote: >

Re: [PATCH] devlink: fix libc and kernel headers collision

2019-06-02 Thread Jiri Pirko
sysinfo { > ^~~ > >Rely on the kernel header alone to avoid kernel and userspace headers >collision of definitions. > >Cc: Aya Levin >Cc: Moshe Shemesh >Signed-off-by: Baruch Siach Acked-by: Jiri Pirko

[patch net-next v3 0/8] expose flash update status to user

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko When user is flashing device using devlink, he currenly does not see any information about what is going on, percentages, etc. Drivers, for example mlxsw and mlx5, have notion about the progress and what is happening. This patchset exposes this progress information to userspace

[patch net-next v3 1/8] mlxsw: Move firmware flash implementation to devlink

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/core.c| 15 ++ drivers/net/ethernet/mellanox

[patch net-next v3 4/8] devlink: allow driver to update progress of flash update

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Introduce a function to be called from drivers during flash. It sends notification to userspace about flash update progress. Signed-off-by: Jiri Pirko Reviewed-by: Jakub Kicinski Reviewed-by: Ido Schimmel --- include/net/devlink.h| 8 +++ include/uapi/linux

[patch net-next v3 3/8] mlxfw: Propagate error messages through extack

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Currently the error messages are printed to dmesg. Propagate them also to directly to user doing the flashing through extack. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel --- v1->v2: - dropped "is which" from errmsg. --- drivers/net/ethernet/mellanox/m

[patch net-next v3 5/8] mlxfw: Introduce status_notify op and call it to notify about the status

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Add new op status_notify which is called to update the user about flashing status. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxfw/mlxfw.h | 4 .../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 24 +++ 2 files

[patch net-next v3 6/8] mlxsw: Implement flash update status notifications

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Implement mlxfw status_notify op by passing notification down to devlink. Also notify about flash update begin and end. Signed-off-by: Jiri Pirko Reviewed-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 18 +- 1 file changed, 17

[patch net-next v3 7/8] netdevsim: implement fake flash updating with notifications

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- v1->v2: - added debugfs toggle to enable/disable flash status notifications --- drivers/net/netdevsim/dev.c | 44 +++ drivers/net/netdevsim/netdevsim.h | 1 + 2 files changed, 45 insertions(+) diff --gi

[patch net-next v3 2/8] mlx5: Move firmware flash implementation to devlink

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Benefit from the devlink flash update implementation and ethtool fallback to it and move firmware flash implementation there. Signed-off-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 -- .../ethernet/mellanox/mlx5/core/en_ethtool.c | 35

[patch net-next v3 8/8] selftests: add basic netdevsim devlink flash testing

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Utilizes the devlink flash code. Suggested-by: Jakub Kicinski Signed-off-by: Jiri Pirko --- v2->v3: - new patch --- .../drivers/net/netdevsim/devlink.sh | 53 +++ 1 file changed, 53 insertions(+) create mode 100755 tools/testing/selftests/driv

[patch net-next v3 2/3] devlink: implement flash update status monitoring

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Kernel sends notifications about flash update status, so implement these messages for monitoring. Signed-off-by: Jiri Pirko --- devlink/devlink.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/devlink/devlink.c b/devlink

[patch net-next v3 1/3] header update

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/devlink.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index 3b6a9e6be3ac..6544824a0b97 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux

[patch net-next v3 3/3] devlink: implement flash status monitoring

2019-06-04 Thread Jiri Pirko
From: Jiri Pirko Listen to status notifications coming from kernel during flashing and put them on stdout to inform user about the status. Signed-off-by: Jiri Pirko --- v2->v3: - added example in man v1->v2: - fixed endless loop bug in case of no notifications --- devlink/devlink.c

Re: [patch net-next v3 1/3] header update

2019-06-04 Thread Jiri Pirko
This and next 2 patches are aimed at iproute2/net-next. Sorry for messing up the subject prefix.

Re: [PATCH net-next 7/9] mlxsw: spectrum_ptp: Add implementation for physical hardware clock operations

2019-06-04 Thread Jiri Pirko
Tue, Jun 04, 2019 at 04:28:19PM CEST, [email protected] wrote: >On Mon, Jun 03, 2019 at 03:12:42PM +0300, Ido Schimmel wrote: > >> +static int >> +mlxsw_sp1_ptp_update_phc_settime(struct mlxsw_sp_ptp_clock *clock, u64 nsec) > >Six words ^^^ It is aligned with the rest of mlxsw code.

Re: [PATCH net,v4 1/4] net: openvswitch: rename flow_stats to sw_flow_stats

2019-07-19 Thread Jiri Pirko
et/openvswitch/datapath.c:24 > >This definition takes precedence to OVS since it is placed in the >networking core, so rename flow_stats in OVS to sw_flow_stats since >this structure is contained in the sw_flow object. > >Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko

Re: [PATCH net,v4 4/4] net: flow_offload: add flow_block structure and use it

2019-07-19 Thread Jiri Pirko
;net: flow_offload: add list handling functions") >Signed-off-by: Pablo Neira Ayuso Acked-by: Jiri Pirko

[patch net-next rfc 4/7] net: rtnetlink: put alternative names to getlink message

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko Extend exiting getlink info message with list of alternative names. Signed-off-by: Jiri Pirko --- include/uapi/linux/if_link.h | 2 ++ net/core/rtnetlink.c | 41 2 files changed, 43 insertions(+) diff --git a/include/uapi/linux

[patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko Add two commands to add and delete alternative ifnames for net device. Each net device can have multiple alternative names. Signed-off-by: Jiri Pirko --- include/linux/netdevice.h | 4 ++ include/uapi/linux/if.h| 1 + include/uapi/linux/if_link.h | 1

[patch net-next rfc 7/7] net: rtnetlink: add possibility to use alternative names as message handle

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko Extend the basic rtnetlink commands to use alternative interface names as a handle instead of ifindex and ifname. Signed-off-by: Jiri Pirko --- net/core/rtnetlink.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/net

[patch net-next rfc 5/7] net: rtnetlink: unify the code in __rtnl_newlink get dev with the rest

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko __rtnl_newlink() code flow is a bit different around tb[IFLA_IFNAME] processing comparing to the other places. Change that to be unified with the rest. Signed-off-by: Jiri Pirko --- net/core/rtnetlink.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff

[patch net-next rfc 0/7] net: introduce alternative names for network interfaces

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko In the past, there was repeatedly discussed the IFNAMSIZ (16) limit for netdevice name length. Now when we have PF and VF representors with port names like "pfXvfY", it became quite common to hit this limit: 0123456789012345 enp131s0f1npf0vf6 enp131s0f1npf0vf22 U

[patch net-next rfc 2/7] net: introduce name_node struct to be used in hashlist

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/linux/netdevice.h | 10 +++- net/core/dev.c| 96 +++ 2 files changed, 86 insertions(+), 20 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 88292953aa6f

[patch net-next rfc 1/7] net: procfs: use index hashlist instead of name hashlist

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko Name hashlist is going to be used for more than just dev->name, so use rather index hashlist for iteration over net_device instances. Signed-off-by: Jiri Pirko --- net/core/net-procfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/

[patch net-next rfc 6/7] net: rtnetlink: introduce helper to get net_device instance by ifname

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko Introduce helper function rtnl_get_dev() that gets net_device structure instance pointer according to passed ifname or ifname attribute. Signed-off-by: Jiri Pirko --- net/core/rtnetlink.c | 57 ++-- 1 file changed, 29 insertions(+), 28

[patch iproute2 rfc 1/2] ip: add support for alternative name addition/deletion/list

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- include/uapi/linux/if_link.h | 3 ++ include/uapi/linux/rtnetlink.h | 7 +++ include/utils.h| 1 + ip/ipaddress.c | 14 ++ ip/iplink.c| 81 ++ lib/utils.c

[patch iproute2 rfc 2/2] ip: allow to use alternative names as handle

2019-07-19 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- ip/iplink.c | 5 +++-- lib/ll_map.c | 41 - 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/ip/iplink.c b/ip/iplink.c index 45f975f1dce9..ad1e67761dd8 100644 --- a/ip/iplink.c +++ b/ip

Re: [patch net-next rfc 0/7] net: introduce alternative names for network interfaces

2019-07-19 Thread Jiri Pirko
Fri, Jul 19, 2019 at 06:31:35PM CEST, [email protected] wrote: >On Fri, 19 Jul 2019 13:00:22 +0200 >Jiri Pirko wrote: > >> From: Jiri Pirko >> >> In the past, there was repeatedly discussed the IFNAMSIZ (16) limit for >> netdevice name length. Now wh

Re: [patch net-next rfc 2/7] net: introduce name_node struct to be used in hashlist

2019-07-19 Thread Jiri Pirko
Fri, Jul 19, 2019 at 06:29:36PM CEST, [email protected] wrote: >On Fri, 19 Jul 2019 13:00:24 +0200 >Jiri Pirko wrote: > >> From: Jiri Pirko >> >> Signed-off-by: Jiri Pirko >> --- >> include/linux/netdevice.h | 10

Re: [patch net-next rfc 2/7] net: introduce name_node struct to be used in hashlist

2019-07-20 Thread Jiri Pirko
Fri, Jul 19, 2019 at 10:26:49PM CEST, [email protected] wrote: >On Fri, 19 Jul 2019 21:17:40 +0200 >Jiri Pirko wrote: > >> Fri, Jul 19, 2019 at 06:29:36PM CEST, [email protected] wrote: >> >On Fri, 19 Jul 2019 13:00:24 +0200 >> >Jiri Pirko wro

Re: [patch net-next rfc 4/7] net: rtnetlink: put alternative names to getlink message

2019-07-20 Thread Jiri Pirko
Sat, Jul 20, 2019 at 05:59:14AM CEST, [email protected] wrote: >On Fri, 19 Jul 2019 13:00:26 +0200, Jiri Pirko wrote: >> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c >> index 7a2010b16e10..f11a2367037d 100644 >> --- a/net/core/rtnetlink.c >>

Re: [patch net-next rfc 3/7] net: rtnetlink: add commands to add and delete alternative ifnames

2019-07-20 Thread Jiri Pirko
Sat, Jul 20, 2019 at 05:58:49AM CEST, [email protected] wrote: >On Fri, 19 Jul 2019 13:00:25 +0200, Jiri Pirko wrote: >> +int netdev_name_node_alt_destroy(struct net_device *dev, char *name) >> +{ >> +struct netdev_name_node *name_node; >> +st

Re: [patch net-next rfc 7/7] net: rtnetlink: add possibility to use alternative names as message handle

2019-07-20 Thread Jiri Pirko
Sat, Jul 20, 2019 at 05:59:27AM CEST, [email protected] wrote: >On Fri, 19 Jul 2019 13:00:29 +0200, Jiri Pirko wrote: >> diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c >> index 1fa30d514e3f..68ad12a7fc4d 100644 >> --- a/net/core/rtnetlink.c >>

Re: [PATCH net-next] net: sched: verify that q!=NULL before setting q->flags

2019-07-21 Thread Jiri Pirko
bit >drm_vram_helpe >r ttm drm_kms_helper drm mpt3sas raid_class scsi_transport_sas >[ 213.112326] CR2: 0010 >[ 213.117429] ---[ end trace adb58eb0a4ee6283 ]--- > >Verify that q pointer is not NULL before setting the 'flags' field. > >Fixes: 3f05e6886a59 ("net_sched: unset TCQ_F_CAN_BYPASS when adding filters") >Signed-off-by: Vlad Buslov Acked-by: Jiri Pirko Thanks!

[patch iproute2 1/2] tc: action: fix crash caused by incorrect *argv check

2019-07-23 Thread Jiri Pirko
From: Jiri Pirko One cannot depend on *argv being null in case of no arg is left on the command line. For example in batch mode, this is not always true. Check argc instead to prevent crash. Reported-by: Alex Kushnarov Fixes: fd8b3d2c1b9b ("actions: Add support for user cookies") Sig

[patch iproute2 2/2] tc: batch: fix line/line_next processing in batch

2019-07-23 Thread Jiri Pirko
From: Jiri Pirko When getcmdline fails, there is no valid string in line_next. So change the flow and don't process it. Alongside with that, free the previous line buffer and prevent memory leak. Fixes: 485d0c6001c4 ("tc: Add batchsize feature for filter and actions") Signed-off

Re: [patch iproute2 1/2] tc: action: fix crash caused by incorrect *argv check

2019-07-23 Thread Jiri Pirko
Tue, Jul 23, 2019 at 07:54:01PM CEST, [email protected] wrote: >On Tue, 23 Jul 2019 13:25:37 +0200 >Jiri Pirko wrote: > >> From: Jiri Pirko >> >> One cannot depend on *argv being null in case of no arg is left on the >> command line. For example in ba

Re: [RFC PATCH net-next 08/12] drop_monitor: Initialize timer and work item upon tracing enable

2019-07-24 Thread Jiri Pirko
Mon, Jul 22, 2019 at 08:31:30PM CEST, [email protected] wrote: >From: Ido Schimmel > >The timer and work item are currently initialized once during module >init, but subsequent patches will need to associate different functions >with the work item, based on the configured alert mode. > >Allow subs

Re: [RFC PATCH net-next 10/12] drop_monitor: Add packet alert mode

2019-07-24 Thread Jiri Pirko
Mon, Jul 22, 2019 at 08:31:32PM CEST, [email protected] wrote: >From: Ido Schimmel > >So far drop monitor supported only one alert mode in which a summary of >locations in which packets were recently dropped was sent to user space. > >This alert mode is sufficient in order to understand that packe

Re: [RFC PATCH net-next 00/12] drop_monitor: Capture dropped packets and metadata

2019-07-24 Thread Jiri Pirko
Tue, Jul 23, 2019 at 05:14:23PM CEST, [email protected] wrote: >On Tue, Jul 23, 2019 at 02:17:49PM +0200, Toke Høiland-Jørgensen wrote: >> Ido Schimmel writes: >> >> > On Mon, Jul 22, 2019 at 09:43:15PM +0200, Toke Høiland-Jørgensen wrote: >> >> Is there a mechanism for the user to filter the pac

Re: [RFC PATCH net-next 00/12] drop_monitor: Capture dropped packets and metadata

2019-07-24 Thread Jiri Pirko
Mon, Jul 22, 2019 at 08:31:22PM CEST, [email protected] wrote: >From: Ido Schimmel > >So far drop monitor supported only one mode of operation in which a >summary of recent packet drops is periodically sent to user space as a >netlink event. The event only includes the drop location (program >coun

Re: [patch iproute2 1/2] tc: action: fix crash caused by incorrect *argv check

2019-07-27 Thread Jiri Pirko
Fri, Jul 26, 2019 at 09:47:07PM CEST, [email protected] wrote: >On Tue, 23 Jul 2019 13:25:37 +0200 >Jiri Pirko wrote: > >> From: Jiri Pirko >> >> One cannot depend on *argv being null in case of no arg is left on the >> command line. For example in ba

[patch net-next 1/3] net: devlink: allow to change namespaces

2019-07-27 Thread Jiri Pirko
From: Jiri Pirko All devlink instances are created in init_net and stay there for a lifetime. Allow user to be able to move devlink instances into namespaces. Signed-off-by: Jiri Pirko --- include/uapi/linux/devlink.h | 4 ++ net/core/devlink.c | 112

[patch net-next 3/3] netdevsim: create devlink and netdev instances in namespace

2019-07-27 Thread Jiri Pirko
From: Jiri Pirko When user does create new netdevsim instance using sysfs bus file, create the devlink instance and related netdev instance in the namespace of the caller. Signed-off-by: Jiri Pirko --- drivers/net/netdevsim/bus.c | 1 + drivers/net/netdevsim/dev.c | 17

[patch net-next 2/3] net: devlink: export devlink net set/get helpers

2019-07-27 Thread Jiri Pirko
From: Jiri Pirko Allow drivers to set/get net struct for devlink instance. Set is only allowed for newly allocated devlink instance. Signed-off-by: Jiri Pirko --- include/net/devlink.h | 3 +++ net/core/devlink.c| 18 ++ 2 files changed, 17 insertions(+), 4 deletions

[patch net-next 0/3] net: devlink: Finish network namespace support

2019-07-27 Thread Jiri Pirko
From: Jiri Pirko Devlink from the beginning counts with network namespaces, but the instances has been fixed to init_net. The first patch allows user to move existing devlink instances into namespaces: $ devlink dev netdevsim/netdevsim1 $ ip netns add ns1 $ devlink dev set netdevsim/netdevsim1

[patch iproute2 2/2] devlink: add support for network namespace change

2019-07-27 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- devlink/devlink.c| 54 +++- include/uapi/linux/devlink.h | 4 +++ man/man8/devlink-dev.8 | 12 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink

[patch iproute2 1/2] devlink: introduce cmdline option to switch to a different namespace

2019-07-27 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- devlink/devlink.c | 12 ++-- man/man8/devlink.8 | 4 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index d8197ea3a478..9242cc05ad0c 100644 --- a/devlink/devlink.c +++ b/devlink

Re: [patch iproute2 1/2] devlink: introduce cmdline option to switch to a different namespace

2019-07-27 Thread Jiri Pirko
Sat, Jul 27, 2019 at 12:12:48PM CEST, [email protected] wrote: >Jiri Pirko writes: > >> From: Jiri Pirko >> >> Signed-off-by: Jiri Pirko >> --- >> devlink/devlink.c | 12 ++-- >> man/man8/devlink.8 | 4 >> 2 files changed, 14

[patch net] net: fix ifindex collision during namespace removal

2019-07-28 Thread Jiri Pirko
From: Jiri Pirko Commit aca51397d014 ("netns: Fix arbitrary net_device-s corruptions on net_ns stop.") introduced a possibility to hit a BUG in case device is returning back to init_net and two following conditions are met: 1) dev->ifindex value is used in a name of another "d

Re: [PATCH net-next v4 1/3] flow_offload: move tc indirect block to flow offload

2019-07-29 Thread Jiri Pirko
Sun, Jul 28, 2019 at 08:52:47AM CEST, [email protected] wrote: >From: wenxu > >move tc indirect block to flow_offload and rename >it to flow indirect block.The nf_tables can use the >indr block architecture. > >Signed-off-by: wenxu >--- >v3: subsys_initcall for init_flow_indr_rhashtable >v4: no cha

Re: [PATCH net-next v4 1/3] flow_offload: move tc indirect block to flow offload

2019-07-29 Thread Jiri Pirko
Sun, Jul 28, 2019 at 08:52:47AM CEST, [email protected] wrote: >From: wenxu > >move tc indirect block to flow_offload and rename A sentence should start with capital letter. >it to flow indirect block.The nf_tables can use the There should be a space between "." and first letter of the next sens

Re: [PATCH net-next v4 1/3] flow_offload: move tc indirect block to flow offload

2019-07-29 Thread Jiri Pirko
Mon, Jul 29, 2019 at 02:47:07PM CEST, [email protected] wrote: > >在 2019/7/29 19:13, Jiri Pirko 写道: >> Sun, Jul 28, 2019 at 08:52:47AM CEST, [email protected] wrote: >>> From: wenxu >>> >>> move tc indirect block to flow_offload and rename >>> it

Re: [patch net-next 1/3] net: devlink: allow to change namespaces

2019-07-29 Thread Jiri Pirko
Mon, Jul 29, 2019 at 07:52:16PM CEST, [email protected] wrote: >From: Jiri Pirko >Date: Sat, 27 Jul 2019 11:44:57 +0200 > >> +if ((netns_pid_attr && (netns_fd_attr || netns_id_attr)) || >> +(netns_fd_attr && (netns_pid_attr || netns_id

Re: [patch net-next 3/3] netdevsim: create devlink and netdev instances in namespace

2019-07-29 Thread Jiri Pirko
Mon, Jul 29, 2019 at 08:59:06PM CEST, [email protected] wrote: >On Sat, 27 Jul 2019 11:44:59 +0200, Jiri Pirko wrote: >> From: Jiri Pirko >> >> When user does create new netdevsim instance using sysfs bus file, >> create the devlink instance and rel

Re: [patch iproute2 1/2] devlink: introduce cmdline option to switch to a different namespace

2019-07-29 Thread Jiri Pirko
Mon, Jul 29, 2019 at 10:21:11PM CEST, [email protected] wrote: >On 7/27/19 4:21 AM, Jiri Pirko wrote: >>>> diff --git a/devlink/devlink.c b/devlink/devlink.c >>>> index d8197ea3a478..9242cc05ad0c 100644 >>>> --- a/devlink/devlink.c >>>> +++ b/devl

Re: [patch net-next 0/3] net: devlink: Finish network namespace support

2019-07-29 Thread Jiri Pirko
Mon, Jul 29, 2019 at 10:17:25PM CEST, [email protected] wrote: >On 7/27/19 3:44 AM, Jiri Pirko wrote: >> From: Jiri Pirko >> >> Devlink from the beginning counts with network namespaces, but the >> instances has been fixed to init_net. The first patch allows user

[patch net-next v2 0/3] net: devlink: Finish network namespace support

2019-07-30 Thread Jiri Pirko
From: Jiri Pirko Devlink from the beginning counts with network namespaces, but the instances has been fixed to init_net. The first patch allows user to move existing devlink instances into namespaces: $ devlink dev netdevsim/netdevsim1 $ ip netns add ns1 $ devlink dev set netdevsim/netdevsim1

[patch net-next v2 1/3] net: devlink: allow to change namespaces

2019-07-30 Thread Jiri Pirko
From: Jiri Pirko All devlink instances are created in init_net and stay there for a lifetime. Allow user to be able to move devlink instances into namespaces. Signed-off-by: Jiri Pirko --- v1->v2: - change the check for multiple attributes - add warnon in case there is no attribute pas

[patch net-next v2 2/3] net: devlink: export devlink net set/get helpers

2019-07-30 Thread Jiri Pirko
From: Jiri Pirko Allow drivers to set/get net struct for devlink instance. Set is only allowed for newly allocated devlink instance. Signed-off-by: Jiri Pirko --- include/net/devlink.h | 3 +++ net/core/devlink.c| 18 ++ 2 files changed, 17 insertions(+), 4 deletions

[patch net-next v2 3/3] netdevsim: create devlink and netdev instances in namespace

2019-07-30 Thread Jiri Pirko
From: Jiri Pirko When user does create new netdevsim instance using sysfs bus file, create the devlink instance and related netdev instance in the namespace of the caller. Signed-off-by: Jiri Pirko --- v1->v2: - remove net_namespace.h include and forward decralared net struct - add comment

[patch iproute2-next v2 2/2] devlink: add support for network namespace change

2019-07-30 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- devlink/devlink.c| 54 +++- include/uapi/linux/devlink.h | 4 +++ man/man8/devlink-dev.8 | 12 3 files changed, 69 insertions(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink

[patch iproute2-next v2 1/2] devlink: introduce cmdline option to switch to a different namespace

2019-07-30 Thread Jiri Pirko
From: Jiri Pirko Signed-off-by: Jiri Pirko --- devlink/devlink.c | 12 ++-- man/man8/devlink.8 | 4 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index d8197ea3a478..9242cc05ad0c 100644 --- a/devlink/devlink.c +++ b/devlink

Re: [patch net-next 3/3] netdevsim: create devlink and netdev instances in namespace

2019-07-30 Thread Jiri Pirko
Tue, Jul 30, 2019 at 07:14:11PM CEST, [email protected] wrote: >On Tue, 30 Jul 2019 08:06:55 +0200, Jiri Pirko wrote: >> >> diff --git a/drivers/net/netdevsim/netdevsim.h >> >> b/drivers/net/netdevsim/netdevsim.h >> >> index 79c05af2a7c0..cdf5

  1   2   3   4   5   6   7   8   9   10   >