RE: [PATCH 5/7] vdpa/mlx5: Add RX counters to debugfs

From: Eli Cohen
Date: Mon Nov 14 2022 - 03:52:03 EST


> From: Jason Wang <jasowang@xxxxxxxxxx>
> Sent: Monday, 14 November 2022 9:27
> To: Eli Cohen <elic@xxxxxxxxxx>
> Cc: mst@xxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; virtualization@lists.linux-
> foundation.org; si-wei.liu@xxxxxxxxxx; eperezma@xxxxxxxxxx;
> lulu@xxxxxxxxxx
> Subject: Re: [PATCH 5/7] vdpa/mlx5: Add RX counters to debugfs
>
> On Sun, Nov 13, 2022 at 9:45 PM Eli Cohen <elic@xxxxxxxxxx> wrote:
> >
> > For each interface, either VLAN tagged or untagged, add two hardware
> > counters: one for unicast and another for multicast. The counters count
> > RX packets and bytes and can be read through debugfs:
> >
> > $ cat /sys/kernel/debug/mlx5/mlx5_core.sf.1/vdpa-
> 0/rx/untagged/mcast/packets
> > $ cat /sys/kernel/debug/mlx5/mlx5_core.sf.1/vdpa-
> 0/rx/untagged/ucast/bytes
> >
> > This feature is controlled via the config option
> > MLX5_VDPA_STEERING_DEBUG. It is off by default as it may have some
> > impact on performance.
> >
> > Signed-off-by: Eli Cohen <elic@xxxxxxxxxx>
> > ---
> > drivers/vdpa/Kconfig | 12 +++
> > drivers/vdpa/mlx5/net/debug.c | 86 ++++++++++++++++++++++
> > drivers/vdpa/mlx5/net/mlx5_vnet.c | 118 +++++++++++++++++++++++-------
> > drivers/vdpa/mlx5/net/mlx5_vnet.h | 30 ++++++++
> > 4 files changed, 218 insertions(+), 28 deletions(-)
> >
>
> [...]
>
> > + vid = key2vid(node->macvlan);
> > spec->match_criteria_enable = MLX5_MATCH_OUTER_HEADERS;
> > headers_c = MLX5_ADDR_OF(fte_match_param, spec->match_criteria,
> outer_headers);
> > headers_v = MLX5_ADDR_OF(fte_match_param, spec->match_value,
> outer_headers);
> > @@ -1430,48 +1475,62 @@ static int mlx5_vdpa_add_mac_vlan_rules(struct
> mlx5_vdpa_net *ndev, u8 *mac,
> > dmac_v = MLX5_ADDR_OF(fte_match_param, headers_v,
> outer_headers.dmac_47_16);
> > eth_broadcast_addr(dmac_c);
> > ether_addr_copy(dmac_v, mac);
> > - if (ndev->mvdev.actual_features & VIRTIO_NET_F_CTRL_VLAN) {
> > + if (ndev->mvdev.actual_features &
> BIT_ULL(VIRTIO_NET_F_CTRL_VLAN)) {
>
>
> This seems like a fix for patch 1? If yes, let's just squash this.
Sure, thanks.
>
> Thanks