Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp603387rwi; Tue, 18 Oct 2022 23:54:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6y1FfQ3rUvxhd2WHIMr3xW6qs6VcLY7wTAjYWbvQpbnEs2MVVO165TUVi99VgrqUzKhSF1 X-Received: by 2002:a65:4585:0:b0:464:4538:c0bc with SMTP id o5-20020a654585000000b004644538c0bcmr6044329pgq.455.1666162472365; Tue, 18 Oct 2022 23:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666162472; cv=none; d=google.com; s=arc-20160816; b=UVBixSr6uchhzj86/RL1J+pczuYAYOWFa4d9b0Ye/Hib8dMN+t+zQ7EcGUU54aLV/z H+rZca1OyilpoD8fHtTXOwB4Z7fzhCkWpo9MAbzcZz6gND3pAsFFFMGHeOq/cRZZ2+V1 /dY0FxTVm2MPQ9SbQ+kiyEBJhbswUkgdjca5CYdj1D/mLd+YWwhF+bnMVUHPI1n5H7he zfDhTaxgNH69aZgKcygYwJLWuiS6z2QvSPN+SjJpQ2ziRFJFS05ze24EvuBBUgYuNFsd FABnSbUH5J5zz8mxGp0eE/O5pREcfSd2NxoTlhIgQiYjsl2jCt9PyQYvqzguSgeaohkE vPHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=TkKMuh+55DvT4EGTiPQiYJq9SDhwxssmhp76qd3oqnI=; b=S4iZax96vyLsyB4TW6t28PnwTFpcOSW+qM9cciyI4+1d7lCO9lVNQbcj6d+MtHD9ec l38kmDgW8H6C5ww0dU1wgi7pzKTU7cc4nVF/TkQcUO2lwlC5+0YG89+Xwe64ex13b+eD SjgfjKVfY0jMq9qQdfRPAjLMqGHNGTSv62eksGHGzqFhTV42KLnD0sZEzQeBTkyu3gN1 i8KtIk9lVoG+cyrkB6utRW5OIPv6niskI5M1fwoHm5eHsBtXvAL+nz9zf74ORwMHjIfi kW/t5g8tBJDMQFOnuRxUOmTWIPA1wE53fW/fpNiGBxGVczZd0qAr/hp5XggBPrhsXHRR uUxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BOIIu+wk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p30-20020a056a000a1e00b00565adc8a5f7si19997566pfh.1.2022.10.18.23.54.20; Tue, 18 Oct 2022 23:54:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BOIIu+wk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229891AbiJSFjb (ORCPT + 99 others); Wed, 19 Oct 2022 01:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229890AbiJSFj3 (ORCPT ); Wed, 19 Oct 2022 01:39:29 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99B2638B5 for ; Tue, 18 Oct 2022 22:39:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666157964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TkKMuh+55DvT4EGTiPQiYJq9SDhwxssmhp76qd3oqnI=; b=BOIIu+wkDe4PuLk8/Na1TyibYDu4ZaQG6BBD7tpZ5O08BVItXdtAzHeD/c3m3EsGDyvopE s37xiGIJh3s0QItV5DSxwfoVK9mbOXzxKf6XMWn5ooFHUCkoOicSz0hpYkOSDwuyfn9/ew f/S5gQR6Nx74q+sIGqqQ3Te315+ZAmw= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-446-tAc94c3JNBq-9De3pTDLGg-1; Wed, 19 Oct 2022 01:39:23 -0400 X-MC-Unique: tAc94c3JNBq-9De3pTDLGg-1 Received: by mail-ej1-f71.google.com with SMTP id qf25-20020a1709077f1900b0078c02a23da3so7398161ejc.0 for ; Tue, 18 Oct 2022 22:39:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TkKMuh+55DvT4EGTiPQiYJq9SDhwxssmhp76qd3oqnI=; b=YXD/hJCeO+KDNNoWHXZG7aaJsx7AInutjYTzQveuPN+EfLeaKuZBeIBRNJA9qLX1Ai uDrjmq4/+bhLNZJE/h4ia0lsrQ/SkA4QOJdc25+2i/qP57kqDGqYSecPzU42klhTuI57 I9pSlnuU0l/DhMCIhjx7LTNeulreQdecwt1gvjgQH5md8CWRwgDeztzrmYEFC8vY/MI5 M99vdfGIBin2i5q5xUd4rFQlXOsH2R6ceXZ4as+xzLm3akn7V9S9WXjPssaLfIaorc2z vAHJWg3xvYm+v1yE9INLZfQX4eSDItCCekXJFzRYGgPmWS3GNVypVrdWzobebI04Am8x 04WA== X-Gm-Message-State: ACrzQf2lgPmz9Uxs1MCFH5F18Z6cHN7pguMteHbh4BmqbtRe8JXjrgAz 2CeMHI4CvdHp2SEDwP12PtxkPlJAg0yexC0hFtvYr04/zoopcT+zL/32IiS95wfktbBt5XXRAnD 8dcD24OnZeWVu5bdNOPIrXg9o X-Received: by 2002:a17:907:970b:b0:78d:8d70:e4e8 with SMTP id jg11-20020a170907970b00b0078d8d70e4e8mr5096290ejc.614.1666157961862; Tue, 18 Oct 2022 22:39:21 -0700 (PDT) X-Received: by 2002:a17:907:970b:b0:78d:8d70:e4e8 with SMTP id jg11-20020a170907970b00b0078d8d70e4e8mr5096282ejc.614.1666157961674; Tue, 18 Oct 2022 22:39:21 -0700 (PDT) Received: from redhat.com ([2.54.191.184]) by smtp.gmail.com with ESMTPSA id c21-20020a17090603d500b00764a76d5888sm8346925eja.27.2022.10.18.22.39.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 22:39:21 -0700 (PDT) Date: Wed, 19 Oct 2022 01:39:17 -0400 From: "Michael S. Tsirkin" To: Eli Cohen Cc: Si-Wei Liu , "jasowang@redhat.com" , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "eperezma@redhat.com" , "lulu@redhat.com" Subject: Re: [PATCH 1/4] vdpa/mlx5: Fix rule forwarding VLAN to TIR Message-ID: <20221019013733-mutt-send-email-mst@kernel.org> References: <20221018111232.4021-1-elic@nvidia.com> <20221018111232.4021-2-elic@nvidia.com> <7eceaaf2-753a-8ff8-4014-39314b31d47a@oracle.com> <20221019013402-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 19, 2022 at 05:36:17AM +0000, Eli Cohen wrote: > > From: Michael S. Tsirkin > > Sent: Wednesday, 19 October 2022 8:34 > > To: Eli Cohen > > Cc: Si-Wei Liu ; jasowang@redhat.com; linux- > > kernel@vger.kernel.org; virtualization@lists.linux-foundation.org; > > eperezma@redhat.com; lulu@redhat.com > > Subject: Re: [PATCH 1/4] vdpa/mlx5: Fix rule forwarding VLAN to TIR > > > > On Wed, Oct 19, 2022 at 05:31:48AM +0000, Eli Cohen wrote: > > > > From: Si-Wei Liu > > > > Sent: Tuesday, 18 October 2022 22:21 > > > > To: Eli Cohen ; mst@redhat.com; jasowang@redhat.com; > > > > linux-kernel@vger.kernel.org; virtualization@lists.linux-foundation.org > > > > Cc: eperezma@redhat.com; lulu@redhat.com > > > > Subject: Re: [PATCH 1/4] vdpa/mlx5: Fix rule forwarding VLAN to TIR > > > > > > > > Hi Eli, > > > > > > > > It's not for this patch but something related, so just a friendly > > > > heads-up. I haven't validated the VLAN tagging behavior yet for mlx5 > > > > vdpa, but from my quick read of the code it doesn't seem it > > > > differentiates the case with and without VIRTIO_NET_F_CTRL_VLAN, to be > > > > compatible/compliant with what's been implemented in QEMU software (a > > > > spec addendum was filed as requested by Michael): > > > > > > > > https://github.com/oasis-tcs/virtio-spec/issues/147 > > > > > > > > - when VIRTIO_NET_F_CTRL_VLAN is negotiated, the device starts with > > > > all VLANs filtered (meaning only untagged traffic can be received, > > > > and traffic with VLAN tag will be dropped). > > > > > > > > - when VIRTIO_NET_F_CTRL_VLAN is not negotiated, all traffic including > > > > untagged and tagged can be received. > > > > > > > > Can you please help check if we need further fix in terms of VLAN tagging? > > > > > > > > > > Sure. It's broken today. I will fix this to conform to the above requirements > > and send V1. > > > > Did you mean v2? > > > > I count from 0 and have been following this scheme but I can make it v2 if that's the norm. Yes, most people seem to count patches from 1 so [PATCH] is followed by [PATCH v2]. I don't know why. But it doesn't matter much - I just wanted to understand whether you will be sending a new version of this patchset. I know now. > > > > Thanks, > > > > -Siwei > > > > > > > > > > > > On 10/18/2022 4:12 AM, Eli Cohen wrote: > > > > > Set the VLAN id to the header values field instead of overwriting the > > > > > headers criteria field. > > > > > > > > > > Before this fix, VLAN filtering would not really work and tagged packets > > > > > would be forwarded unfiltered to the TIR. > > > > > > > > > > Fixes: baf2ad3f6a98 ("vdpa/mlx5: Add RX MAC VLAN filter support") > > > > > > > > > > Signed-off-by: Eli Cohen > > > > Reviewed-by: Si-Wei Liu > > > > > > > > > --- > > > > > drivers/vdpa/mlx5/net/mlx5_vnet.c | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > > b/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > > > index 90913365def4..dd29fdfc24ed 100644 > > > > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > > > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c > > > > > @@ -1472,7 +1472,7 @@ static int > > mlx5_vdpa_add_mac_vlan_rules(struct > > > > mlx5_vdpa_net *ndev, u8 *mac, > > > > > if (tagged) { > > > > > MLX5_SET(fte_match_set_lyr_2_4, headers_v, cvlan_tag, 1); > > > > > MLX5_SET_TO_ONES(fte_match_set_lyr_2_4, headers_c, > > > > first_vid); > > > > > - MLX5_SET(fte_match_set_lyr_2_4, headers_c, first_vid, vid); > > > > > + MLX5_SET(fte_match_set_lyr_2_4, headers_v, first_vid, vid); > > > > > } > > > > > flow_act.action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; > > > > > dest.type = MLX5_FLOW_DESTINATION_TYPE_TIR; > > > >