search for: extack

Displaying 20 results from an estimated 59 matches for "extack".

2023 Jan 29
3
[Bridge] [PATCH net-next v2] netlink: provide an ability to set default extack message
In netdev common pattern, extack pointer is forwarded to the drivers to be filled with error message. However, the caller can easily overwrite the filled message. Instead of adding multiple "if (!extack->_msg)" checks before any NL_SET_ERR_MSG() call, which appears after call to the driver, let's add new macro to...
2023 Jan 26
1
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
From: Leon Romanovsky <leonro at nvidia.com> In netdev common pattern, xxtack pointer is forwarded to the drivers to be filled with error message. However, the caller can easily overwrite the filled message. Instead of adding multiple "if (!extack->_msg)" checks before any NL_SET_ERR_MSG() call, which appears after call to the driver, let's add this check to common code. [1] https://lore.kernel.org/all/Y9Irgrgf3uxOjwUm at unreal Signed-off-by: Leon Romanovsky <leonro at nvidia.com> --- include/linux/netlink.h | 4 ++--...
2023 Jan 26
2
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
On Thu, Jan 26, 2023 at 09:15:03PM +0200, Leon Romanovsky wrote: > From: Leon Romanovsky <leonro at nvidia.com> > > In netdev common pattern, xxtack pointer is forwarded to the drivers ~~~~~~ extack > to be filled with error message. However, the caller can easily > overwrite the filled message. > > Instead of adding multiple "if (!extack->_msg)" checks before any > NL_SET_ERR_MSG() call, which appears after call to the driver, let's > add this check to com...
2023 Jan 27
1
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
...rote: > On Thu, Jan 26, 2023 at 09:15:03PM +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky <leonro at nvidia.com> > > > > In netdev common pattern, xxtack pointer is forwarded to the drivers > ~~~~~~ > extack > > > to be filled with error message. However, the caller can easily > > overwrite the filled message. > > > > Instead of adding multiple "if (!extack->_msg)" checks before any > > NL_SET_ERR_MSG() call, which appears after call to the driver, let...
2023 Jan 26
2
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
...te: > On Thu, Jan 26, 2023 at 09:15:03PM +0200, Leon Romanovsky wrote: > > From: Leon Romanovsky <leonro at nvidia.com> > > > > In netdev common pattern, xxtack pointer is forwarded to the drivers > ~~~~~~ > extack > > > to be filled with error message. However, the caller can easily > > overwrite the filled message. > > > > Instead of adding multiple "if (!extack->_msg)" checks before any > > NL_SET_ERR_MSG() call, which appears after call to the driver, let...
2023 Mar 13
1
[Bridge] [PATCH net-next 01/11] net: Add MDB net device operations
...,6 +1307,17 @@ struct netdev_net_notifier { * Used to add FDB entries to dump requests. Implementers should add * entries to skb and update idx with the number of entries. * + * int (*ndo_mdb_add)(struct net_device *dev, struct nlattr *tb[], + * u16 nlmsg_flags, struct netlink_ext_ack *extack); + * Adds an MDB entry to dev. + * int (*ndo_mdb_del)(struct net_device *dev, struct nlattr *tb[], + * struct netlink_ext_ack *extack); + * Deletes the MDB entry from dev. + * int (*ndo_mdb_dump)(struct net_device *dev, struct sk_buff *skb, + * struct netlink_callback *cb); + * Dump...
2023 May 09
1
[Bridge] [RFC PATCH net-next 3/5] flow_offload: Reject matching on layer 2 miss
Adjust drivers that support the 'FLOW_DISSECTOR_KEY_META' key to reject filters that try to match on the newly added layer 2 miss option. Add an extack message to clearly communicate the failure reason to user space. Example: # tc filter add dev swp1 egress pref 1 proto all flower skip_sw l2_miss true action drop Error: mlxsw_spectrum: Can't match on "l2_miss". We have an error talking to the kernel Signed-off-by: Ido Schimmel...
2023 Jan 31
1
[Bridge] [PATCH net-next v2] netlink: provide an ability to set default extack message
Hello, On Sun, 2023-01-29 at 18:51 +0200, Leon Romanovsky wrote: > In netdev common pattern, extack pointer is forwarded to the drivers > to be filled with error message. However, the caller can easily > overwrite the filled message. > > Instead of adding multiple "if (!extack->_msg)" checks before any > NL_SET_ERR_MSG() call, which appears after call to the driver, l...
2023 Jan 27
1
[Bridge] [PATCH net-next] netlink: provide an ability to set default extack message
On Fri, 27 Jan 2023 07:26:13 +0200 Leon Romanovsky wrote: > > That'd be my preference too, FWIW. It's only the offload cases which > > need this sort of fallback. > > Of course not, almost any error unwind path which sets extack will need it. I guess we can come up with scenarios where the new behavior would be useful. But the fact is - your patch changes 4 places... > See devlink as an example I don't know what part of devlink you mean at a quick scroll.
2023 Jul 12
2
[Bridge] [PATCH v1 net] bridge: Return an error when enabling STP in netns.
...warned and > awaiting a fix than blocked", which I agree with. The patch has the > potential to cause a lot of regressions, but without actually fixing the > problem. > > How about simply removing the error [1]? Since iproute2 commit > 844c37b42373 ("libnetlink: Handle extack messages for non-error case"), > it can print extack warnings and not only errors. With the diff below: > > # unshare -n > # ip link add name br0 type bridge > # ip link set dev br0 type bridge stp_state 1 > Warning: bridge: STP can't be enabled in non-root netns. &...
2023 Jan 31
1
[PATCH v2 1/7] vdpa: fix improper error message when adding vdpa dev
...4 --- a/drivers/vdpa/vdpa.c +++ b/drivers/vdpa/vdpa.c @@ -622,9 +622,11 @@ static int vdpa_nl_cmd_dev_add_set_doit(struct sk_buff *skb, struct genl_info *i err = PTR_ERR(mdev); goto err; } + if ((config.mask & mdev->config_attr_mask) != config.mask) { - NL_SET_ERR_MSG_MOD(info->extack, - "All provided attributes are not supported"); + NL_SET_ERR_MSG_FMT_MOD(info->extack, + "Some provided attributes are not supported: 0x%llx", + config.mask & ~mdev->config_attr_mask); err = -EOPNOTSUPP; goto err; } -- 1.8.3.1
2023 Jul 11
3
[Bridge] [PATCH v1 net] bridge: Return an error when enabling STP in netns.
...bridge/br_stp_if.c index 75204d36d7f9..a807996ac56b 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -201,6 +201,11 @@ int br_stp_set_enabled(struct net_bridge *br, unsigned long val, { ASSERT_RTNL(); + if (!net_eq(dev_net(br->dev), &init_net)) { + NL_SET_ERR_MSG_MOD(extack, "STP can't be enabled in non-root netns"); + return -EINVAL; + } + if (br_mrp_enabled(br)) { NL_SET_ERR_MSG_MOD(extack, "STP can't be enabled if MRP is already enabled"); -- 2.30.2
2017 Jul 18
2
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > + offloads |= 1ULL << VIRTIO_NET_F_GUEST_CSUM; > + > + return virtnet_set_guest_offloads(vi, offloads); > +} > + > static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > struct netlink_ext_ack *extack) > { > @@ -1898,10 +1947,11 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > u16 xdp_qp = 0, curr_qp; > int i, err; > > - if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO4) || > - virtio_has_feature(vi->vdev, VIRTIO_NET_F_GU...
2017 Jul 18
2
[PATCH net-next 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > + offloads |= 1ULL << VIRTIO_NET_F_GUEST_CSUM; > + > + return virtnet_set_guest_offloads(vi, offloads); > +} > + > static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > struct netlink_ext_ack *extack) > { > @@ -1898,10 +1947,11 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > u16 xdp_qp = 0, curr_qp; > int i, err; > > - if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO4) || > - virtio_has_feature(vi->vdev, VIRTIO_NET_F_GU...
2017 Jul 24
1
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > + offloads |= 1ULL << VIRTIO_NET_F_GUEST_CSUM; > + > + return virtnet_set_guest_offloads(vi, offloads); > +} > + > static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > struct netlink_ext_ack *extack) > { > @@ -1905,10 +1954,11 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > u16 xdp_qp = 0, curr_qp; > int i, err; > > - if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO4) || > - virtio_has_feature(vi->vdev, VIRTIO_NET_F_GU...
2017 Jul 24
1
[PATCH net-next V2 5/5] virtio-net: switch off offloads on demand if possible on XDP set
...feature(vi->vdev, VIRTIO_NET_F_GUEST_CSUM)) > + offloads |= 1ULL << VIRTIO_NET_F_GUEST_CSUM; > + > + return virtnet_set_guest_offloads(vi, offloads); > +} > + > static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > struct netlink_ext_ack *extack) > { > @@ -1905,10 +1954,11 @@ static int virtnet_xdp_set(struct net_device *dev, struct bpf_prog *prog, > u16 xdp_qp = 0, curr_qp; > int i, err; > > - if (virtio_has_feature(vi->vdev, VIRTIO_NET_F_GUEST_TSO4) || > - virtio_has_feature(vi->vdev, VIRTIO_NET_F_GU...
2023 May 09
5
[Bridge] [RFC PATCH net-next 0/5] Add layer 2 miss indication and filtering
tl;dr ===== This patchset adds a single bit to the skb to indicate that a packet encountered a layer 2 miss in the bridge and extends flower to match on this metadata. This is required for non-DF (Designated Forwarder) filtering in EVPN multi-homing which prevents decapsulated BUM packets from being forwarded multiple times to the same multi-homed host. Background ========== In a typical EVPN
2023 May 18
5
[Bridge] [PATCH net-next 0/5] Add layer 2 miss indication and filtering
tl;dr ===== This patchset adds a single bit to the skb to indicate that a packet encountered a layer 2 miss in the bridge and extends flower to match on this metadata. This is required for non-DF (Designated Forwarder) filtering in EVPN multi-homing which prevents decapsulated BUM packets from being forwarded multiple times to the same multi-homed host. Background ========== In a typical EVPN
2023 Jul 27
2
[PATCH net-next V4 2/3] virtio_net: support per queue interrupt coalesce command
...m the version previously acked/reviewed, I'm unsure if all the reviewers are ok with the new one. [...] > static int virtnet_set_coalesce(struct net_device *dev, > struct ethtool_coalesce *ec, > struct kernel_ethtool_coalesce *kernel_coal, > struct netlink_ext_ack *extack) > { > struct virtnet_info *vi = netdev_priv(dev); > - int ret, i, napi_weight; > + int ret, queue_number, napi_weight; > bool update_napi = false; > > /* Can't change NAPI weight if the link is up */ > napi_weight = ec->tx_max_coalesced_frames ? NAPI_POLL_...
2023 Jan 30
6
[PATCH 0/6] features provisioning fixes and mlx5_vdpa support
This patchset is pre-requisite to export and provision device config attributes and features for vdpa live migration, in a way backward and forward compatibility can be retained. The follow up work [1] will need to be built around the new feature provisioning uAPI, with which it's easier to formalize migration compatibility support at the driver level. Thanks, -Siwei [1] [PATCH v3 0/4] vDPA: