]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
scsi: qedf: Corrent VLAN tag insertion in fallback VLAN case.
authorChad Dupuis <chad.dupuis@cavium.com>
Tue, 15 Aug 2017 17:08:18 +0000 (10:08 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:29:03 +0000 (22:29 -0400)
commitcf29116375b7868aabe826ceda6fbe3f2451f8a7
treecbe47af0f9bbd0034db6b3658d223a864ef7ea74
parenta3cd42a9d627fd7c472664e454108829886e123f
scsi: qedf: Corrent VLAN tag insertion in fallback VLAN case.

Currently in the driver the qedf_ctx attribute vlan_hw_insert is used to
which whether to insert a VLAN tag in FIP frames (except for FIP VLAN
request which is explicitly sent out untagged at least from the driver's
point of view).

When we receive a FIP VLAN response, we set qedf->vlan_hw_insert to 0 which
makes the qedf_fip_send function insert the VLAN.  However when we exhaust
our FIP VLAN retries, we do not set qedf->vlan_hw_insert to 0 which means
that the driver will not tag the FIP frame with the correct VLAN ID.  The
result that was observed on the wire is that some entity either in the LL2
or L2 firmware is adding a NULL VLAN tag which can cause FIP solicitation
to fail.

The offload FCoE frame function, qedf_xmit, does not use the vlan_hw_insert
attribute to decide whether to tag frames with the FIP/FCoE VLAN.  Instead
it unilaterially tags the offload frames with the VLAN ID stored in
qedf->vlan_id. This is the correct behavior so the driver can guarantee
that non-offload FIP frames go out with the correct VLAN ID.

Also use the Linux network layer helpers instead of doing the VLAN insert
manually.

Also fix setting the fallback VLAN so that it used the module parameter and
is not hardcoded to 1002 (though 1002 is the default).

[mkp: fixed typo]

Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedf/qedf.h
drivers/scsi/qedf/qedf_fip.c
drivers/scsi/qedf/qedf_main.c