mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-22 17:49:43 +07:00
ixgbe: fix wrong offset to fc_frame_header in ixgbe_fcoe_ddp
Make sure we point to the right offset of the fc_frame_header when VLAN header exists and HW has VLAN stripping disabled. Signed-off-by: Yi Zou <yi.zou@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0b746e08cd
commit
be5d507d9a
@ -32,6 +32,7 @@
|
|||||||
#endif /* CONFIG_IXGBE_DCB */
|
#endif /* CONFIG_IXGBE_DCB */
|
||||||
#include <linux/if_ether.h>
|
#include <linux/if_ether.h>
|
||||||
#include <linux/gfp.h>
|
#include <linux/gfp.h>
|
||||||
|
#include <linux/if_vlan.h>
|
||||||
#include <scsi/scsi_cmnd.h>
|
#include <scsi/scsi_cmnd.h>
|
||||||
#include <scsi/scsi_device.h>
|
#include <scsi/scsi_device.h>
|
||||||
#include <scsi/fc/fc_fs.h>
|
#include <scsi/fc/fc_fs.h>
|
||||||
@ -312,10 +313,12 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
|
|||||||
if (fcerr == IXGBE_FCERR_BADCRC)
|
if (fcerr == IXGBE_FCERR_BADCRC)
|
||||||
skb->ip_summed = CHECKSUM_NONE;
|
skb->ip_summed = CHECKSUM_NONE;
|
||||||
|
|
||||||
skb_reset_network_header(skb);
|
if (eth_hdr(skb)->h_proto == htons(ETH_P_8021Q))
|
||||||
skb_set_transport_header(skb, skb_network_offset(skb) +
|
fh = (struct fc_frame_header *)(skb->data +
|
||||||
sizeof(struct fcoe_hdr));
|
sizeof(struct vlan_hdr) + sizeof(struct fcoe_hdr));
|
||||||
fh = (struct fc_frame_header *)skb_transport_header(skb);
|
else
|
||||||
|
fh = (struct fc_frame_header *)(skb->data +
|
||||||
|
sizeof(struct fcoe_hdr));
|
||||||
fctl = ntoh24(fh->fh_f_ctl);
|
fctl = ntoh24(fh->fh_f_ctl);
|
||||||
if (fctl & FC_FC_EX_CTX)
|
if (fctl & FC_FC_EX_CTX)
|
||||||
xid = be16_to_cpu(fh->fh_ox_id);
|
xid = be16_to_cpu(fh->fh_ox_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user