On 1/17/2020 11:01 AM, Viacheslav Ovsiienko wrote: > Matcher is flow table related structure providing the flow pattern > to be translated directly in hardware controlling data. Some fields > in this structure might be split (by software) between multiple items. > > For example, the metadata register c0 field in the matcher might be > split into two independent subfields - the source vport index and > META item value. These subfields have no permanent assigned masks, > the actual configuration is queried from the kernel drivers in > runtime. To handle source vport value (the port of e-Switch which > is origin of the packet) the kernel might use the dedicated vport > field in the matcher or the part of register c0 field, depending > on configuration. > > To setup the matcher structure fields the macro MLX5_SET is used. > MLX5_SET configures the specified 32-bit field as whole entity. > For metadata register c0 we should take into account the provided > mask in order to configure the specified subfield bits only, > otherwise setting vport overrides the META values and vice versa. > > Fixes: acfcd5c52f94 ("net/mlx5: update meta register matcher set") > Cc: sta...@dpdk.org > > Signed-off-by: Viacheslav Ovsiienko <viachesl...@mellanox.com> > Acked-by: Matan Azrad <ma...@mellanox.com> > --- > v1: - http://patches.dpdk.org/patch/64068/ > v2: - update commit message > - update headline > "net/mlx5: fix matcher metadata register c0 field setup"
Applied to dpdk-next-net/master, thanks.