Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: add ndo_fcoe_ddp_target() to support FCoE DDP in target mode

The Fiber Channel over Ethernet (FCoE) Direct Data Placement (DDP) can also be
used for FCoE target, where the DDP used for read I/O on an initiator can be
used on an FCoE target to speed up the write I/O to the target from the initiator.
The added ndo_fcoe_ddp_target() works in the similar way as the existing
ndo_fcoe_ddp_setup() to allow the underlying hardware set up the DDP context
accordingly when it gets called from the FCoE target implementation on top
the existing Open-FCoE fcoe/libfc protocol stack so without losing the ability
to provide DDP for read I/O as an initiator, it can also provide DDP offload
to the write I/O coming from the initiator as a target.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

authored by

Yi Zou and committed by
Jeff Kirsher
6247e086 90827996

+4
+4
include/linux/netdevice.h
··· 871 871 unsigned int sgc); 872 872 int (*ndo_fcoe_ddp_done)(struct net_device *dev, 873 873 u16 xid); 874 + int (*ndo_fcoe_ddp_target)(struct net_device *dev, 875 + u16 xid, 876 + struct scatterlist *sgl, 877 + unsigned int sgc); 874 878 #define NETDEV_FCOE_WWNN 0 875 879 #define NETDEV_FCOE_WWPN 1 876 880 int (*ndo_fcoe_get_wwn)(struct net_device *dev,