From: Jesse Brandeburg <jesse.brandeburg@intel.com>
To: Ivan Vecera <ivecera@redhat.com>, <netdev@vger.kernel.org>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
Catherine Sullivan <catherine.sullivan@intel.com>,
Greg Rose <gregory.v.rose@intel.com>,
"moderated list:INTEL ETHERNET DRIVERS"
<intel-wired-lan@lists.osuosl.org>,
open list <linux-kernel@vger.kernel.org>,
Ahmed Zaki <ahmed.zaki@intel.com>,
Madhu Chittim <madhu.chittim@intel.com>
Subject: Re: [PATCH net] i40e: Fix VF VLAN offloading when port VLAN is configured
Date: Thu, 7 Sep 2023 11:52:40 -0700 [thread overview]
Message-ID: <26c81971-70eb-ed0d-749f-6d910ad786f8@intel.com> (raw)
In-Reply-To: <20230907154457.3861711-1-ivecera@redhat.com>
On 9/7/2023 8:44 AM, Ivan Vecera wrote:
> If port VLAN is configured on a VF then any other VLANs on top of this VF
> are broken.
>
> During i40e_ndo_set_vf_port_vlan() call the i40e driver reset the VF and
> iavf driver asks PF (using VIRTCHNL_OP_GET_VF_RESOURCES) for VF capabilities
> but this reset occurs too early, prior setting of vf->info.pvid field
> and because this field can be zero during i40e_vc_get_vf_resources_msg()
> then VIRTCHNL_VF_OFFLOAD_VLAN capability is reported to iavf driver.
>
> This is wrong because iavf driver should not report VLAN offloading
> capability when port VLAN is configured as i40e does not support QinQ
> offloading.
>
> Fix the issue by moving VF reset after setting of vf->port_vlan_id
> field.
>
> Without this patch:
> $ echo 1 > /sys/class/net/enp2s0f0/device/sriov_numvfs
> $ ip link set enp2s0f0 vf 0 vlan 3
> $ ip link set enp2s0f0v0 up
> $ ip link add link enp2s0f0v0 name vlan4 type vlan id 4
> $ ip link set vlan4 up
> ...
> $ ethtool -k enp2s0f0v0 | grep vlan-offload
> rx-vlan-offload: on
> tx-vlan-offload: on
> $ dmesg -l err | grep iavf
> [1292500.742914] iavf 0000:02:02.0: Failed to add VLAN filter, error IAVF_ERR_INVALID_QP_ID
>
> With this patch:
> $ echo 1 > /sys/class/net/enp2s0f0/device/sriov_numvfs
> $ ip link set enp2s0f0 vf 0 vlan 3
> $ ip link set enp2s0f0v0 up
> $ ip link add link enp2s0f0v0 name vlan4 type vlan id 4
> $ ip link set vlan4 up
> ...
> $ ethtool -k enp2s0f0v0 | grep vlan-offload
> rx-vlan-offload: off [requested on]
> tx-vlan-offload: off [requested on]
> $ dmesg -l err | grep iavf
>
> Fixes: f9b4b6278d51ff ("i40e: Reset the VF upon conflicting VLAN configuration")
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Change looks reasonable to me and since it fixes your reproducer above,
then excellent! Thank you!
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
next prev parent reply other threads:[~2023-09-07 18:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 15:44 Ivan Vecera
2023-09-07 18:52 ` Jesse Brandeburg [this message]
2023-09-15 8:42 ` [Intel-wired-lan] " Romanowski, Rafal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26c81971-70eb-ed0d-749f-6d910ad786f8@intel.com \
--to=jesse.brandeburg@intel.com \
--cc=ahmed.zaki@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=catherine.sullivan@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregory.v.rose@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=ivecera@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madhu.chittim@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®