Enable iSCSI offload drivers to use information from iface.
Subsystems (7)
cover Enable iSCSI offload drivers to use information from iface.
This patchset enables iSCSI offload drivers to have access to the iface information provided by iscsid. This allows users to have more control of how the driver connects to the iSCSI target. iSER is updated to use iface.ipaddress to set the source IP address if configured. This allows iSER to use multiple ports on the same network or in more complicated routed configurations.
Since there is already a change to the function parameters, dst_addr is upgraded to sockaddr_storage so that it is more future proof and makes the size of the struct static and not dependent on checking the SA_FAMILY.
This is dependent on updates to Open-iSCSI.
Robert LeBlanc (7):
scsi/scsi_transport_iscsi: Add iface struct to kernel. scsi/scsi_transport_iscsi: Update ep_connect to include iface. ib/iSER: Add binding to source IP address. scsi/be2iscsi: Update beiscsi_ep_connect to accept iface and
sockaddr_storage.
scsi/bnx2i: Update bnx2i_ep_connect to accept iface and
sockaddr_storage.
scsi/cxgbi: Update cxgbi_ep_connect to accept iface and
sockaddr_storage.
scsi/qla4xxx: Update qla4xxx_ep_connect to accept iface and
sockaddr_storage.
drivers/infiniband/ulp/iser/iscsi_iser.c | 33 +++++++-- drivers/infiniband/ulp/iser/iscsi_iser.h | 4 +- drivers/infiniband/ulp/iser/iser_initiator.c | 1 + drivers/infiniband/ulp/iser/iser_memory.c | 1 + drivers/infiniband/ulp/iser/iser_verbs.c | 8 ++- drivers/scsi/be2iscsi/be_cmds.c | 1 + drivers/scsi/be2iscsi/be_iscsi.c | 8 ++- drivers/scsi/be2iscsi/be_iscsi.h | 5 +- drivers/scsi/be2iscsi/be_main.c | 1 + drivers/scsi/be2iscsi/be_mgmt.c | 1 + drivers/scsi/bnx2i/bnx2i_hwi.c | 1 + drivers/scsi/bnx2i/bnx2i_iscsi.c | 13 ++-- drivers/scsi/cxgbi/libcxgbi.c | 15 ++-- drivers/scsi/cxgbi/libcxgbi.h | 2 +- drivers/scsi/qla4xxx/ql4_os.c | 15 ++-- drivers/scsi/scsi_transport_iscsi.c | 9 ++- include/scsi/scsi_transport_iscsi.h | 100 ++++++++++++++++++++++++++- 17 files changed, 179 insertions(+), 39 deletions(-)
Signature · 8 lines
2.11.0 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
PATCH 1/7 scsi/scsi_transport_iscsi: Add iface struct to kernel.
Allow the userspace iscsiadm to pass the iface struct of the connection so that the underlying driver can use what is most appropriate to create the iSCSI connection.
--- include/scsi/scsi_transport_iscsi.h | 95 +++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+)
include/scsi/scsi_transport_iscsi.h +95 -0
@@ -37,6 +37,7 @@ struct iscsi_cls_conn;struct iscsi_conn ;struct iscsi_task ;struct sockaddr ; +struct iface_rec ;struct iscsi_iface ;struct bsg_job ;struct iscsi_bus_flash_session ;
@@ -291,6 +292,100 @@ struct iscsi_endpoint {struct iscsi_cls_conn *conn; }; +/* max len of interface */ +#define ISCSI_MAX_IFACE_LEN 65 +#define NI_MAXHOST 1025 +#define ISCSI_HWADDRESS_BUF_SIZE 18 +#define ISCSI_TRANSPORT_NAME_MAXLEN 16 +#define ISCSI_MAX_STR_LEN 80 + +struct iface_rec { +struct list_head list; +/* iscsi iface record name */ +char name[ISCSI_MAX_IFACE_LEN ]; +uint32_t iface_num; +/* network layer iface name (eth0) */ +char netdev[IFNAMSIZ ]; +char ipaddress[NI_MAXHOST ]; +char subnet_mask[NI_MAXHOST ]; +char gateway[NI_MAXHOST ]; +char bootproto[ISCSI_MAX_STR_LEN ]; +char ipv6_linklocal[NI_MAXHOST ]; +char ipv6_router[NI_MAXHOST ]; +char ipv6_autocfg[NI_MAXHOST ]; +char linklocal_autocfg[NI_MAXHOST ]; +char router_autocfg[NI_MAXHOST ]; +uint16_t vlan_id; +uint8_t vlan_priority; +char vlan_state[ISCSI_MAX_STR_LEN ]; +char state[ISCSI_MAX_STR_LEN ];/* 0 = disable, +* 1 = enable */ +uint16_t mtu; +uint16_t port; +char delayed_ack[ISCSI_MAX_STR_LEN ]; +char nagle[ISCSI_MAX_STR_LEN ]; +char tcp_wsf_state[ISCSI_MAX_STR_LEN ]; +uint8_t tcp_wsf; +uint8_t tcp_timer_scale; +char tcp_timestamp[ISCSI_MAX_STR_LEN ]; +char dhcp_dns[ISCSI_MAX_STR_LEN ]; +char dhcp_slp_da[ISCSI_MAX_STR_LEN ]; +char tos_state[ISCSI_MAX_STR_LEN ]; +uint8_t tos; +char gratuitous_arp[ISCSI_MAX_STR_LEN ]; +char dhcp_alt_client_id_state[ISCSI_MAX_STR_LEN ]; +char dhcp_alt_client_id[ISCSI_MAX_STR_LEN ]; +char dhcp_req_vendor_id_state[ISCSI_MAX_STR_LEN ]; +char dhcp_vendor_id_state[ISCSI_MAX_STR_LEN ]; +char dhcp_vendor_id[ISCSI_MAX_STR_LEN ]; +char dhcp_learn_iqn[ISCSI_MAX_STR_LEN ]; +char fragmentation[ISCSI_MAX_STR_LEN ]; +char incoming_forwarding[ISCSI_MAX_STR_LEN ]; +uint8_t ttl; +char gratuitous_neighbor_adv[ISCSI_MAX_STR_LEN ]; +char redirect[ISCSI_MAX_STR_LEN ]; +char mld[ISCSI_MAX_STR_LEN ]; +uint32_t flow_label; +uint32_t traffic_class; +uint8_t hop_limit; +uint32_t nd_reachable_tmo; +uint32_t nd_rexmit_time; +uint32_t nd_stale_tmo; +uint8_t dup_addr_detect_cnt; +uint32_t router_adv_link_mtu; +uint16_t def_task_mgmt_tmo; +char header_digest[ISCSI_MAX_STR_LEN ]; +char data_digest[ISCSI_MAX_STR_LEN ]; +char immediate_data[ISCSI_MAX_STR_LEN ]; +char initial_r2t[ISCSI_MAX_STR_LEN ]; +char data_seq_inorder[ISCSI_MAX_STR_LEN ]; +char data_pdu_inorder[ISCSI_MAX_STR_LEN ]; +uint8_t erl; +uint32_t max_recv_dlength; +uint32_t first_burst_len; +uint16_t max_out_r2t; +uint32_t max_burst_len; +char chap_auth[ISCSI_MAX_STR_LEN ]; +char bidi_chap[ISCSI_MAX_STR_LEN ]; +char strict_login_comp[ISCSI_MAX_STR_LEN ]; +char discovery_auth[ISCSI_MAX_STR_LEN ]; +char discovery_logout[ISCSI_MAX_STR_LEN ]; +char port_state[ISCSI_MAX_STR_LEN ]; +char port_speed[ISCSI_MAX_STR_LEN ]; +/* +* TODO: we may have to make this bigger and interconnect +* specific for infiniband +*/ +char hwaddress[ISCSI_HWADDRESS_BUF_SIZE ]; +char transport_name[ISCSI_TRANSPORT_NAME_MAXLEN ]; +/* +* This is only used for boot now, but the iser guys +* can use this for their virtualization idea. +*/ +char alias[TARGET_NAME_MAXLEN +1 ]; +char iname[TARGET_NAME_MAXLEN +1 ]; +}; +struct iscsi_iface {struct device dev;struct iscsi_transport *transport;
Signature · 6 lines
2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
kbuild test robot
build botRe: [PATCH 1/7] scsi/scsi_transport_iscsi: Add iface struct to kernel.
reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…
Hi Robert,
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.12-rc4 next-20170608]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Robert-LeBlanc/Enable-iSCSI-offload-drivers-to-use-information-from-iface/20170607-211934 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64
All errors (new ones prefixed by >>):
In file included from include/scsi/libiscsi.h:35:0,
from drivers/scsi/be2iscsi/be_iscsi.c:15:
>> include/scsi/scsi_transport_iscsi.h:308:16: error: 'IFNAMSIZ' undeclared here (not in a function)
char netdev[IFNAMSIZ];
^~~~~~~~vim +/IFNAMSIZ +308 include/scsi/scsi_transport_iscsi.h
302 struct iface_rec {
303 struct list_head list;
304 /* iscsi iface record name */
305 char name[ISCSI_MAX_IFACE_LEN];
306 uint32_t iface_num;
307 /* network layer iface name (eth0) */
> 308 char netdev[IFNAMSIZ];
309 char ipaddress[NI_MAXHOST];
310 char subnet_mask[NI_MAXHOST];
311 char gateway[NI_MAXHOST];
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Signature · 5 lines
You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
PATCH 2/7 scsi/scsi_transport_iscsi: Update ep_connect to include iface.
In reply to Robert LeBlancUpdate the ep_connect function to include the iface in the parameters passed to the driver. Since we have to make a change, also change the dst_addr to sockaddr_storage so that it is future proof and a static size.
--- drivers/scsi/scsi_transport_iscsi.c | 9 ++++++--- include/scsi/scsi_transport_iscsi.h | 5 +++-- 2 files changed, 9 insertions(+), 5 deletions(-)
drivers/scsi/scsi_transport_iscsi.c +6 -3
@@ -34,6 +34,7 @@#include <scsi/iscsi_if.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_bsg_iscsi.h> +#include <linux/inet.h> #define ISCSI_TRANSPORT_VERSION "2.0-870"
@@ -2794,7 +2795,8 @@ static int iscsi_if_ep_connect(struct iscsi_transport *transport, struct iscsi_uevent *ev, int msg_type) {struct iscsi_endpoint *ep; -struct sockaddr *dst_addr; +struct sockaddr_storage *dst_addr; +struct iface_rec *iface;struct Scsi_Host *shost =NULL ;int non_blocking, err =0 ;
@@ -2813,8 +2815,9 @@ static int iscsi_if_ep_connect(struct iscsi_transport *transport, }else non_blocking = ev->u.ep_connect.non_blocking; - dst_addr = (struct sockaddr *)((char *)ev +sizeof (*ev)); - ep = transport->ep_connect (shost, dst_addr, non_blocking); + dst_addr = (struct sockaddr_storage *)((char *)ev +sizeof (*ev)); + iface = (struct iface_rec *)((char *)ev +sizeof (*ev) +sizeof (*dst_addr)); + ep = transport->ep_connect (shost, dst_addr, non_blocking, iface);if (IS_ERR (ep)) { err =PTR_ERR (ep); goto release_host;
include/scsi/scsi_transport_iscsi.h +3 -2
@@ -133,8 +133,9 @@ struct iscsi_transport {void (*session_recovery_timedout) (struct iscsi_cls_session *session);struct iscsi_endpoint *(*ep_connect) (struct Scsi_Host *shost, -struct sockaddr *dst_addr, -int non_blocking); +struct sockaddr_storage *dst_addr, +int non_blocking, +struct iface_rec *iface);int (*ep_poll) (struct iscsi_endpoint *ep,int timeout_ms);void (*ep_disconnect) (struct iscsi_endpoint *ep); int (*tgt_dscvr) (struct Scsi_Host *shost, enum iscsi_tgt_dscvr type,
Signature · 8 lines
2.11.0 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
kbuild test robot
build botRe: [PATCH 2/7] scsi/scsi_transport_iscsi: Update ep_connect to include iface.
reproduce:
Hi Robert,
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.12-rc4 next-20170608]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Robert-LeBlanc/Enable-iSCSI-offload-drivers-to-use-information-from-iface/20170607-211934 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next config: x86_64-kexec (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64
Note: the linux-review/Robert-LeBlanc/Enable-iSCSI-offload-drivers-to-use-information-from-iface/20170607-211934 HEAD 9d84638ec1dd56cf18d796045165770d741fe422 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
>> drivers/scsi/qla4xxx/ql4_os.c:236:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ep_connect = qla4xxx_ep_connect,
^~~~~~~~~~~~~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:236:17: note: (near initialization for 'qla4xxx_iscsi_transport.ep_connect')
cc1: some warnings being treated as errors
vim +236 drivers/scsi/qla4xxx/ql4_os.c
b3a271a9 Manish Rangankar 2011-07-25 220 .caps = CAP_TEXT_NEGO | b3a271a9 Manish Rangankar 2011-07-25 221 CAP_DATA_PATH_OFFLOAD | CAP_HDRDGST | b3a271a9 Manish Rangankar 2011-07-25 222 CAP_DATADGST | CAP_LOGIN_OFFLOAD | b3a271a9 Manish Rangankar 2011-07-25 223 CAP_MULTI_R2T, 5e9bcec7 Vikas Chaudhary 2012-08-22 224 .attr_is_visible = qla4_attr_is_visible, b3a271a9 Manish Rangankar 2011-07-25 225 .create_session = qla4xxx_session_create, b3a271a9 Manish Rangankar 2011-07-25 226 .destroy_session = qla4xxx_session_destroy, b3a271a9 Manish Rangankar 2011-07-25 227 .start_conn = qla4xxx_conn_start, b3a271a9 Manish Rangankar 2011-07-25 228 .create_conn = qla4xxx_conn_create, b3a271a9 Manish Rangankar 2011-07-25 229 .bind_conn = qla4xxx_conn_bind, b3a271a9 Manish Rangankar 2011-07-25 230 .stop_conn = iscsi_conn_stop, b3a271a9 Manish Rangankar 2011-07-25 231 .destroy_conn = qla4xxx_conn_destroy, b3a271a9 Manish Rangankar 2011-07-25 232 .set_param = iscsi_set_param, afaf5a2d David Somayajulu 2006-09-19 233 .get_conn_param = qla4xxx_conn_get_param, fca9f04d Mike Christie 2012-02-27 234 .get_session_param = qla4xxx_session_get_param, b3a271a9 Manish Rangankar 2011-07-25 235 .get_ep_param = qla4xxx_get_ep_param, b3a271a9 Manish Rangankar 2011-07-25 @236 .ep_connect = qla4xxx_ep_connect, b3a271a9 Manish Rangankar 2011-07-25 237 .ep_poll = qla4xxx_ep_poll, b3a271a9 Manish Rangankar 2011-07-25 238 .ep_disconnect = qla4xxx_ep_disconnect, b3a271a9 Manish Rangankar 2011-07-25 239 .get_stats = qla4xxx_conn_get_stats, b3a271a9 Manish Rangankar 2011-07-25 240 .send_pdu = iscsi_conn_send_pdu, b3a271a9 Manish Rangankar 2011-07-25 241 .xmit_task = qla4xxx_task_xmit, b3a271a9 Manish Rangankar 2011-07-25 242 .cleanup_task = qla4xxx_task_cleanup, b3a271a9 Manish Rangankar 2011-07-25 243 .alloc_pdu = qla4xxx_alloc_pdu,
b3a271a9 Manish Rangankar 2011-07-25 244
:::::: The code at line 236 was first introduced by commit
:::::: b3a271a94d0034dd3bab10b8d8cd432843be629e [SCSI] qla4xxx: support iscsiadm session mgmt
:::::: TO: Manish Rangankar <[email protected]> :::::: CC: James Bottomley <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
kbuild test robot
build botRe: [PATCH 2/7] scsi/scsi_transport_iscsi: Update ep_connect to include iface.
In reply to Robert LeBlancreproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross…
Hi Robert,
[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.12-rc4 next-20170608]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Robert-LeBlanc/Enable-iSCSI-offload-drivers-to-use-information-from-iface/20170607-211934 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next config: ia64-allmodconfig (attached as .config) compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=ia64
All errors (new ones prefixed by >>):
>> drivers/scsi//qedi/qedi_iscsi.c:1402:16: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ep_connect = qedi_ep_connect,
^~~~~~~~~~~~~~~
drivers/scsi//qedi/qedi_iscsi.c:1402:16: note: (near initialization for 'qedi_iscsi_transport.ep_connect')
cc1: some warnings being treated as errors
vim +1402 drivers/scsi//qedi/qedi_iscsi.c
ace7f46b Manish Rangankar 2016-12-01 1386 .destroy_session = qedi_session_destroy, ace7f46b Manish Rangankar 2016-12-01 1387 .create_conn = qedi_conn_create, ace7f46b Manish Rangankar 2016-12-01 1388 .bind_conn = qedi_conn_bind, ace7f46b Manish Rangankar 2016-12-01 1389 .start_conn = qedi_conn_start, ace7f46b Manish Rangankar 2016-12-01 1390 .stop_conn = iscsi_conn_stop, ace7f46b Manish Rangankar 2016-12-01 1391 .destroy_conn = qedi_conn_destroy, ace7f46b Manish Rangankar 2016-12-01 1392 .set_param = iscsi_set_param, ace7f46b Manish Rangankar 2016-12-01 1393 .get_ep_param = qedi_ep_get_param, ace7f46b Manish Rangankar 2016-12-01 1394 .get_conn_param = iscsi_conn_get_param, ace7f46b Manish Rangankar 2016-12-01 1395 .get_session_param = iscsi_session_get_param, ace7f46b Manish Rangankar 2016-12-01 1396 .get_host_param = qedi_host_get_param, ace7f46b Manish Rangankar 2016-12-01 1397 .send_pdu = iscsi_conn_send_pdu, ace7f46b Manish Rangankar 2016-12-01 1398 .get_stats = qedi_conn_get_stats, ace7f46b Manish Rangankar 2016-12-01 1399 .xmit_task = qedi_task_xmit, ace7f46b Manish Rangankar 2016-12-01 1400 .cleanup_task = qedi_cleanup_task, ace7f46b Manish Rangankar 2016-12-01 1401 .session_recovery_timedout = iscsi_session_recovery_timedout, ace7f46b Manish Rangankar 2016-12-01 @1402 .ep_connect = qedi_ep_connect, ace7f46b Manish Rangankar 2016-12-01 1403 .ep_poll = qedi_ep_poll, ace7f46b Manish Rangankar 2016-12-01 1404 .ep_disconnect = qedi_ep_disconnect, ace7f46b Manish Rangankar 2016-12-01 1405 .set_path = qedi_set_path, ace7f46b Manish Rangankar 2016-12-01 1406 .attr_is_visible = qedi_attr_is_visible, ace7f46b Manish Rangankar 2016-12-01 1407 }; ace7f46b Manish Rangankar 2016-12-01 1408 ace7f46b Manish Rangankar 2016-12-01 1409 void qedi_start_conn_recovery(struct qedi_ctx *qedi, ace7f46b Manish Rangankar 2016-12-01 1410 struct qedi_conn *qedi_conn)
:::::: The code at line 1402 was first introduced by commit
:::::: ace7f46ba5fde7273207c7122b0650ceb72510e0 scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.
:::::: TO: Manish Rangankar <manish.rangankar-YGCgFSpz5w/[email protected]> :::::: CC: Martin K. Petersen <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
PATCH 3/7 ib/iSER: Add binding to source IP address.
In reply to Robert LeBlancIf the iface passed in has ip address set, then attept to create an RDMA connection using it as the source IP address. This allows iSER to use multiple ports on the same network or in more complex routing configurations. Also update to accepting sockaddr_storage.
--- drivers/infiniband/ulp/iser/iscsi_iser.c | 33 ++++++++++++++++++++++++---- drivers/infiniband/ulp/iser/iscsi_iser.h | 4 ++-- drivers/infiniband/ulp/iser/iser_initiator.c | 1 + drivers/infiniband/ulp/iser/iser_memory.c | 1 + drivers/infiniband/ulp/iser/iser_verbs.c | 8 ++++--- 5 files changed, 38 insertions(+), 9 deletions(-)
drivers/infiniband/ulp/iser/iscsi_iser.c +29 -4
@@ -59,6 +59,7 @@#include <linux/delay.h> #include <linux/slab.h> #include <linux/module.h> +#include <linux/inet.h> #include <net/sock.h>
@@ -808,12 +809,16 @@ static int iscsi_iser_get_ep_param(struct iscsi_endpoint *ep,* if fails. */ static struct iscsi_endpoint * -iscsi_iser_ep_connect (struct Scsi_Host *shost,struct sockaddr *dst_addr, -int non_blocking) +iscsi_iser_ep_connect (struct Scsi_Host *shost,struct sockaddr_storage *dst_addr, +int non_blocking,struct iface_rec *iface) {int err;struct iser_conn *iser_conn;struct iscsi_endpoint *ep; +struct sockaddr_storage src_addr; +struct sockaddr_in *tmp_addr; +struct sockaddr_in6 *tmp_addr6; +memset (&src_addr,0 ,sizeof (src_addr)); ep =iscsi_create_endpoint (0 );if (!ep)
@@ -828,8 +833,28 @@ iscsi_iser_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, ep->dd_data = iser_conn; iser_conn->ep = ep;iser_conn_init (iser_conn); - - err =iser_connect (iser_conn,NULL , dst_addr, non_blocking); +if (iface && iface->ipaddress[0 ]) { +if (strchr (iface->ipaddress,':' )) { + tmp_addr6 = (struct sockaddr_in6 *)&src_addr; + tmp_addr6->sin6_family =AF_INET6 ; +if (!in6_pton (iface->ipaddress,-1 , + tmp_addr6->sin6_addr.s6_addr, +-1 ,NULL )) { + err = -EINVAL ; + goto failure; + } + }else { + tmp_addr = (struct sockaddr_in *)&src_addr; + tmp_addr->sin_family =AF_INET ; +if (!in4_pton (iface->ipaddress,-1 , + (u8 *)&tmp_addr->sin_addr.s_addr, +-1 ,NULL )) { + err = -EINVAL ; + goto failure; + } + } + } + err =iser_connect (iser_conn, &src_addr, dst_addr, non_blocking);if (err) goto failure;
drivers/infiniband/ulp/iser/iscsi_iser.h +2 -2
@@ -628,8 +628,8 @@ void iser_unreg_rdma_mem(struct iscsi_iser_task *task, enum iser_data_dir dir);int iser_connect (struct iser_conn *iser_conn, -struct sockaddr *src_addr, -struct sockaddr *dst_addr, +struct sockaddr_storage *src_addr, +struct sockaddr_storage *dst_addr,int non_blocking); void iser_unreg_mem_fmr(struct iscsi_iser_task *iser_task,
drivers/infiniband/ulp/iser/iser_initiator.c +1 -0
@@ -35,6 +35,7 @@#include <linux/mm.h> #include <linux/scatterlist.h> #include <linux/kfifo.h> +#include <linux/if.h> #include <scsi/scsi_cmnd.h> #include <scsi/scsi_host.h>
drivers/infiniband/ulp/iser/iser_memory.c +1 -0
@@ -36,6 +36,7 @@#include <linux/mm.h> #include <linux/highmem.h> #include <linux/scatterlist.h> +#include <linux/if.h> #include "iscsi_iser.h" static
drivers/infiniband/ulp/iser/iser_verbs.c +5 -3
@@ -35,6 +35,7 @@#include <linux/module.h> #include <linux/slab.h> #include <linux/delay.h> +#include <linux/if.h> #include "iscsi_iser.h"
@@ -941,8 +942,8 @@ void iser_conn_init(struct iser_conn *iser_conn)* sleeps until the connection is established or rejected */ int iser_connect (struct iser_conn *iser_conn, -struct sockaddr *src_addr, -struct sockaddr *dst_addr, +struct sockaddr_storage *src_addr, +struct sockaddr_storage *dst_addr,int non_blocking) {struct ib_conn *ib_conn = &iser_conn->ib_conn;
@@ -968,7 +969,8 @@ int iser_connect(struct iser_conn *iser_conn, goto id_failure; } - err =rdma_resolve_addr (ib_conn->cma_id, src_addr, dst_addr,1000 ); + err =rdma_resolve_addr (ib_conn->cma_id, (struct sockaddr *)src_addr, + (struct sockaddr *)dst_addr,1000 );if (err) {iser_err ("rdma_resolve_addr failed: %d\n" , err); goto addr_failure;
Signature · 8 lines
2.11.0 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
PATCH 4/7 scsi/be2iscsi: Update beiscsi_ep_connect to accept iface and sockaddr_storage.
In reply to Robert LeBlancUpdate Emulex BladeEngine driver to accept the session iface for creating the iSCSI connection. Also accept dst_addr as sockaddr_storage instead of sockaddr.
--- drivers/scsi/be2iscsi/be_cmds.c | 1 + drivers/scsi/be2iscsi/be_iscsi.c | 8 +++++--- drivers/scsi/be2iscsi/be_iscsi.h | 5 +++-- drivers/scsi/be2iscsi/be_main.c | 1 + drivers/scsi/be2iscsi/be_mgmt.c | 1 + 5 files changed, 11 insertions(+), 5 deletions(-)
drivers/scsi/be2iscsi/be_cmds.c +1 -0
@@ -13,6 +13,7 @@*/ #include <scsi/iscsi_proto.h> +#include <linux/if.h> #include "be_main.h" #include "be.h"
drivers/scsi/be2iscsi/be_iscsi.c +5 -3
@@ -12,6 +12,7 @@* */ +#include <linux/if.h> #include <scsi/libiscsi.h> #include <scsi/scsi_transport_iscsi.h> #include <scsi/scsi_transport.h>
@@ -1161,8 +1162,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep,* This routines first asks chip to create a connection and then allocates an EP */ struct iscsi_endpoint * -beiscsi_ep_connect (struct Scsi_Host *shost,struct sockaddr *dst_addr, -int non_blocking) +beiscsi_ep_connect (struct Scsi_Host *shost,struct sockaddr_storage *dst_addr, +int non_blocking,struct iface_rec *iface) {struct beiscsi_hba *phba;struct beiscsi_endpoint *beiscsi_ep;
@@ -1198,7 +1199,8 @@ beiscsi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, beiscsi_ep = ep->dd_data; beiscsi_ep->phba = phba; beiscsi_ep->openiscsi_ep = ep; - ret =beiscsi_open_conn (ep,NULL , dst_addr, non_blocking); + ret =beiscsi_open_conn (ep,NULL , (struct sockaddr *)dst_addr, + non_blocking);if (ret) {beiscsi_log (phba,KERN_ERR ,BEISCSI_LOG_CONFIG ,"BS_%d : Failed in beiscsi_open_conn\n" );
drivers/scsi/be2iscsi/be_iscsi.h +3 -2
@@ -68,8 +68,9 @@ int beiscsi_set_param(struct iscsi_cls_conn *cls_conn,int beiscsi_conn_start (struct iscsi_cls_conn *cls_conn);struct iscsi_endpoint *beiscsi_ep_connect (struct Scsi_Host *shost, -struct sockaddr *dst_addr, -int non_blocking); +struct sockaddr_storage *dst_addr, +int non_blocking, +struct iface_rec *iface);int beiscsi_ep_poll (struct iscsi_endpoint *ep,int timeout_ms);
drivers/scsi/be2iscsi/be_main.c +1 -0
@@ -25,6 +25,7 @@#include <linux/module.h> #include <linux/bsg-lib.h> #include <linux/irq_poll.h> +#include <linux/if.h> #include <scsi/libiscsi.h> #include <scsi/scsi_bsg_iscsi.h>
drivers/scsi/be2iscsi/be_mgmt.c +1 -0
@@ -13,6 +13,7 @@*/ #include <linux/bsg-lib.h> +#include <linux/if.h> #include <scsi/scsi_transport_iscsi.h> #include <scsi/scsi_bsg_iscsi.h> #include "be_mgmt.h"
Signature · 8 lines
2.11.0 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
PATCH 5/7 scsi/bnx2i: Update bnx2i_ep_connect to accept iface and sockaddr_storage.
In reply to Robert LeBlancUpdate QLogic NetXtreme II driver to accept the session iface for creating the iSCSI connection. Also accept dst_addr as sockaddr_storage instead of sockaddr.
--- drivers/scsi/bnx2i/bnx2i_hwi.c | 1 + drivers/scsi/bnx2i/bnx2i_iscsi.c | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-)
drivers/scsi/bnx2i/bnx2i_hwi.c +1 -0
@@ -15,6 +15,7 @@*/ #include <linux/gfp.h> +#include <linux/if.h> #include <scsi/scsi_tcq.h> #include <scsi/libiscsi.h> #include "bnx2i.h"
drivers/scsi/bnx2i/bnx2i_iscsi.c +8 -5
@@ -16,8 +16,10 @@*/ #include <linux/slab.h> +#include <linux/if.h> #include <scsi/scsi_tcq.h> #include <scsi/libiscsi.h> +#include <scsi/scsi_transport_iscsi.h> #include "bnx2i.h" struct scsi_transport_template *bnx2i_scsi_xport_template;
@@ -1771,8 +1773,9 @@ static int bnx2i_tear_down_conn(struct bnx2i_hba *hba,* sending down option-2 request to complete TCP 3-way handshake */ static struct iscsi_endpoint *bnx2i_ep_connect (struct Scsi_Host *shost, -struct sockaddr *dst_addr, -int non_blocking) +struct sockaddr_storage *dst_addr, +int non_blocking, +struct iface_rec *iface) {u32 iscsi_cid =BNX2I_CID_RESERVED ;struct sockaddr_in *desti = (struct sockaddr_in *) dst_addr;
@@ -1792,7 +1795,7 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost,* check if the given destination can be reached through * a iscsi capable NetXtreme2 device */ - hba =bnx2i_check_route (dst_addr); + hba =bnx2i_check_route ((struct sockaddr *)dst_addr);if (!hba) { rc = -EINVAL ;
@@ -1887,11 +1890,11 @@ static struct iscsi_endpoint *bnx2i_ep_connect(struct Scsi_Host *shost,clear_bit (SK_TCP_TIMESTAMP , &bnx2i_ep->cm_sk->tcp_flags);memset (&saddr,0 ,sizeof (saddr)); -if (dst_addr->sa_family ==AF_INET ) { +if (dst_addr->ss_family ==AF_INET ) { desti = (struct sockaddr_in *) dst_addr; saddr.remote.v4 = *desti; saddr.local.v4.sin_family = desti->sin_family; - }else if (dst_addr->sa_family ==AF_INET6 ) { + }else if (dst_addr->ss_family ==AF_INET6 ) { desti6 = (struct sockaddr_in6 *) dst_addr; saddr.remote.v6 = *desti6; saddr.local.v6.sin6_family = desti6->sin6_family;
Signature · 8 lines
2.11.0 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
PATCH 6/7 scsi/cxgbi: Update cxgbi_ep_connect to accept iface and sockaddr_storage.
In reply to Robert LeBlancUpdate Chelsio iSCSI driver to accept the session iface for creating the iSCSI connection. Also accept dst_addr as sockaddr_storage instead of sockaddr.
--- drivers/scsi/cxgbi/libcxgbi.c | 15 ++++++++------- drivers/scsi/cxgbi/libcxgbi.h | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-)
drivers/scsi/cxgbi/libcxgbi.c +8 -7
@@ -2499,8 +2499,9 @@ int cxgbi_get_host_param(struct Scsi_Host *shost, enum iscsi_host_param param,EXPORT_SYMBOL_GPL (cxgbi_get_host_param);struct iscsi_endpoint *cxgbi_ep_connect (struct Scsi_Host *shost, -struct sockaddr *dst_addr, -int non_blocking) +struct sockaddr_storage *dst_addr, +int non_blocking, +struct iface_rec *iface) {struct iscsi_endpoint *ep;struct cxgbi_endpoint *cep;
@@ -2520,15 +2521,15 @@ struct iscsi_endpoint *cxgbi_ep_connect(struct Scsi_Host *shost, } } -if (dst_addr->sa_family ==AF_INET ) { - csk =cxgbi_check_route (dst_addr); +if (dst_addr->ss_family ==AF_INET ) { + csk =cxgbi_check_route ((struct sockaddr *)dst_addr);#if IS_ENABLED (CONFIG_IPV6 ) - } else if (dst_addr->sa_family == AF_INET6) { - csk =cxgbi_check_route6 (dst_addr); + } else if (dst_addr->ss_family == AF_INET6) { + csk =cxgbi_check_route6 ((struct sockaddr *)dst_addr);#endif }else {pr_info ("address family 0x%x NOT supported.\n" , - dst_addr->sa_family); + dst_addr->ss_family); err = -EAFNOSUPPORT ;return (struct iscsi_endpoint *)ERR_PTR (err); }
drivers/scsi/cxgbi/libcxgbi.h +1 -1
@@ -596,7 +596,7 @@ int cxgbi_set_host_param(struct Scsi_Host *, enum iscsi_host_param, char *, int);int cxgbi_get_host_param (struct Scsi_Host *,enum iscsi_host_param ,char *);struct iscsi_endpoint *cxgbi_ep_connect (struct Scsi_Host *, -struct sockaddr *,int ); +struct sockaddr_storage *,int ,struct iface_rec *);int cxgbi_ep_poll (struct iscsi_endpoint *,int );void cxgbi_ep_disconnect (struct iscsi_endpoint *);
Signature · 8 lines
2.11.0 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
PATCH 7/7 scsi/qla4xxx: Update qla4xxx_ep_connect to accept iface and sockaddr_storage.
In reply to Robert LeBlancUpdate QLogic ISP4XXX and ISP82XX drivers to accept the session iface for creating the iSCSI connection. Also accept dst_addr as sockaddr_storage instead of sockaddr.
--- drivers/scsi/qla4xxx/ql4_os.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/scsi/qla4xxx/ql4_os.c +8 -7
@@ -119,8 +119,9 @@ static int qla4xxx_get_iface_param(struct iscsi_iface *iface, int param, char *buf);static enum blk_eh_timer_return qla4xxx_eh_cmd_timed_out (struct scsi_cmnd *sc);static struct iscsi_endpoint *qla4xxx_ep_connect (struct Scsi_Host *shost, -struct sockaddr *dst_addr, -int non_blocking); +struct sockaddr_storage *dst_addr, +int non_blocking, +struct iface_rec *iface);static int qla4xxx_ep_poll (struct iscsi_endpoint *ep,int timeout_ms);static void qla4xxx_ep_disconnect (struct iscsi_endpoint *ep); static int qla4xxx_get_ep_param(struct iscsi_endpoint *ep,
@@ -1656,8 +1657,8 @@ static int qla4xxx_get_iface_param(struct iscsi_iface *iface, }static struct iscsi_endpoint * -qla4xxx_ep_connect (struct Scsi_Host *shost,struct sockaddr *dst_addr, -int non_blocking) +qla4xxx_ep_connect (struct Scsi_Host *shost,struct sockaddr_storage *dst_addr, +int non_blocking,struct iface_rec *iface) {int ret;struct iscsi_endpoint *ep;
@@ -1681,12 +1682,12 @@ qla4xxx_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr, qla_ep = ep->dd_data;memset (qla_ep,0 ,sizeof (struct qla_endpoint )); -if (dst_addr->sa_family ==AF_INET ) { +if (dst_addr->ss_family ==AF_INET ) {memcpy (&qla_ep->dst_addr, dst_addr,sizeof (struct sockaddr_in )); addr = (struct sockaddr_in *)&qla_ep->dst_addr;DEBUG2 (ql4_printk (KERN_INFO , ha,"%s: %pI4\n" , __func__, (char *)&addr->sin_addr)); - }else if (dst_addr->sa_family ==AF_INET6 ) { + }else if (dst_addr->ss_family ==AF_INET6 ) {memcpy (&qla_ep->dst_addr, dst_addr,sizeof (struct sockaddr_in6 )); addr6 = (struct sockaddr_in6 *)&qla_ep->dst_addr;
@@ -6569,7 +6570,7 @@ static struct iscsi_endpoint *qla4xxx_get_ep_fwdb(struct scsi_qla_host *ha, addr->sin_port =htons (le16_to_cpu (fw_ddb_entry->port)); } - ep =qla4xxx_ep_connect (ha->host, (struct sockaddr *)dst_addr,0 ); + ep =qla4xxx_ep_connect (ha->host, dst_addr,0 ,NULL );vfree (dst_addr);return ep; }
Signature · 8 lines
2.11.0 -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
Quoted 36 lines · Robert LeBlanc
This patchset enables iSCSI offload drivers to have access to the iface information provided by iscsid. This allows users to have more control of how the driver connects to the iSCSI target. iSER is updated to use iface.ipaddress to set the source IP address if configured. This allows iSER to use multiple ports on the same network or in more complicated routed configurations.
Since there is already a change to the function parameters,
dst_addris upgraded tosockaddr_storageso that it is more future proof and makes the size of the struct static and not dependent on checking theSA_FAMILY.This is dependent on updates to Open-iSCSI.
Robert LeBlanc (7):
scsi/scsi_transport_iscsi: Add iface struct to kernel. scsi/scsi_transport_iscsi: Updateep_connectto include iface. ib/iSER: Add binding to source IP address. scsi/be2iscsi: Updatebeiscsi_ep_connectto accept iface and
sockaddr_storage.
scsi/bnx2i: Updatebnx2i_ep_connectto accept iface and
sockaddr_storage.
scsi/cxgbi: Updatecxgbi_ep_connectto accept iface and
sockaddr_storage.
scsi/qla4xxx: Updateqla4xxx_ep_connectto accept iface and
sockaddr_storage.drivers/infiniband/ulp/iser/iscsi_iser.c | 33 +++++++-- drivers/infiniband/ulp/iser/iscsi_iser.h | 4 +- drivers/infiniband/ulp/iser/iser_initiator.c | 1 + drivers/infiniband/ulp/iser/iser_memory.c | 1 + drivers/infiniband/ulp/iser/iser_verbs.c | 8 ++- drivers/scsi/be2iscsi/be_cmds.c | 1 + drivers/scsi/be2iscsi/be_iscsi.c | 8 ++- drivers/scsi/be2iscsi/be_iscsi.h | 5 +- drivers/scsi/be2iscsi/be_main.c | 1 + drivers/scsi/be2iscsi/be_mgmt.c | 1 +
Quoted 9 lines
drivers/scsi/bnx2i/bnx2i_hwi.c | 1 + drivers/scsi/bnx2i/bnx2i_iscsi.c | 13 ++-- drivers/scsi/cxgbi/libcxgbi.c | 15 ++-- drivers/scsi/cxgbi/libcxgbi.h | 2 +- drivers/scsi/qla4xxx/ql4_os.c | 15 ++-- drivers/scsi/scsi_transport_iscsi.c | 9 ++- include/scsi/scsi_transport_iscsi.h | 100 ++++++++++++++++++++++++++- 17 files changed, 179 insertions(+), 39 deletions(-)
Hmm.
That it rather large, just for passing information from userspace into the kernel.
What is the actual benefit here?
Personally, I would rather see iscsid creating tap interfaces associated with each iSCSI offload interface, and having the kernel accessing the information from _that_.
Then each connection would have a network interface attached to it, and could retrieve the information from there.
Plus we could use 'normal' userspace tools like 'ip' to configure the iSCSI offload network.
Cheers,
Hannes
Signature · 12 lines
Dr. Hannes Reinecke Teamlead Storage & Networking [email protected] +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
Chris Leech
maintainerQuoted 7 lines · Robert LeBlanc
This patchset enables iSCSI offload drivers to have access to the iface information provided by iscsid. This allows users to have more control of how the driver connects to the iSCSI target. iSER is updated to use iface.ipaddress to set the source IP address if configured. This allows iSER to use multiple ports on the same network or in more complicated routed configurations.
Quoted 5 lines
Since there is already a change to the function parameters,
dst_addris upgraded tosockaddr_storageso that it is more future proof and makes the size of the struct static and not dependent on checking theSA_FAMILY.This is dependent on updates to Open-iSCSI.
Hi Robert,
I don't think that passing the iface_rec structure directly from the iscsid internals into a netlink message is a good way to go about this. It's really big, there's an embedded list_head with user address pointers that needs to be left out, and there are 32/64-bit layout differences.
Let me take a look at how you're proposing using this info for iSER, if it makes sense I think we should come up with a better designed structure for passing the information.
Thanks,
Chris
Quoted 35 lines
Robert LeBlanc (7):
scsi/scsi_transport_iscsi: Add iface struct to kernel. scsi/scsi_transport_iscsi: Updateep_connectto include iface. ib/iSER: Add binding to source IP address. scsi/be2iscsi: Updatebeiscsi_ep_connectto accept iface and
sockaddr_storage.
scsi/bnx2i: Updatebnx2i_ep_connectto accept iface and
sockaddr_storage.
scsi/cxgbi: Updatecxgbi_ep_connectto accept iface and
sockaddr_storage.
scsi/qla4xxx: Updateqla4xxx_ep_connectto accept iface and
sockaddr_storage.drivers/infiniband/ulp/iser/iscsi_iser.c | 33 +++++++-- drivers/infiniband/ulp/iser/iscsi_iser.h | 4 +- drivers/infiniband/ulp/iser/iser_initiator.c | 1 + drivers/infiniband/ulp/iser/iser_memory.c | 1 + drivers/infiniband/ulp/iser/iser_verbs.c | 8 ++- drivers/scsi/be2iscsi/be_cmds.c | 1 + drivers/scsi/be2iscsi/be_iscsi.c | 8 ++- drivers/scsi/be2iscsi/be_iscsi.h | 5 +- drivers/scsi/be2iscsi/be_main.c | 1 + drivers/scsi/be2iscsi/be_mgmt.c | 1 + drivers/scsi/bnx2i/bnx2i_hwi.c | 1 + drivers/scsi/bnx2i/bnx2i_iscsi.c | 13 ++-- drivers/scsi/cxgbi/libcxgbi.c | 15 ++-- drivers/scsi/cxgbi/libcxgbi.h | 2 +- drivers/scsi/qla4xxx/ql4_os.c | 15 ++-- drivers/scsi/scsi_transport_iscsi.c | 9 ++- include/scsi/scsi_transport_iscsi.h | 100 ++++++++++++++++++++++++++- 17 files changed, 179 insertions(+), 39 deletions(-)Signature · 1 line
2.11.0
Signature · 5 lines
You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
Quoted 22 lines · Chris Leech
Quoted 7 lines · Robert LeBlanc
This patchset enables iSCSI offload drivers to have access to the iface information provided by iscsid. This allows users to have more control of how the driver connects to the iSCSI target. iSER is updated to use iface.ipaddress to set the source IP address if configured. This allows iSER to use multiple ports on the same network or in more complicated routed configurations.
Quoted 5 lines
Since there is already a change to the function parameters,
dst_addris upgraded tosockaddr_storageso that it is more future proof and makes the size of the struct static and not dependent on checking theSA_FAMILY.This is dependent on updates to Open-iSCSI.
Hi Robert,
I don't think that passing the
iface_recstructure directly from the iscsid internals into a netlink message is a good way to go about this. It's really big, there's an embeddedlist_headwith user address pointers that needs to be left out, and there are 32/64-bit layout differences.
Quoted 7 lines
Let me take a look at how you're proposing using this info for iSER, if it makes sense I think we should come up with a better designed structure for passing the information.
Thanks,
Chris
Chris,
Thank you for your feedback. I agree that the entire iface is probably overkill, it was more of a proof of concept. We are only using the ipaddress in the iface for iSER (in my patch), but I could see other drivers benefiting from some of the other data in the iface (mac, interface_name, vlan, etc) so I didn't want to be too restrictive so that it wouldn't have to be extended later. I've not worked on userspace/kernel interaction before so I need some guidance to make the transition between userspace and kernel versions smoother.
This patchset works for what we need and it is very important for us (and I'm sure others once the feature is available) and I'm happy to put in the time to get it accepted upstream, I'm just new to kernel development and need some guidance.
Thanks,
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1
Quoted 42 lines · Robert LeBlanc
Quoted 22 lines · Chris Leech
Quoted 7 lines · Robert LeBlanc
This patchset enables iSCSI offload drivers to have access to the iface information provided by iscsid. This allows users to have more control of how the driver connects to the iSCSI target. iSER is updated to use iface.ipaddress to set the source IP address if configured. This allows iSER to use multiple ports on the same network or in more complicated routed configurations.
Quoted 5 lines
Since there is already a change to the function parameters,
dst_addris upgraded tosockaddr_storageso that it is more future proof and makes the size of the struct static and not dependent on checking theSA_FAMILY.This is dependent on updates to Open-iSCSI.
Hi Robert,
I don't think that passing the
iface_recstructure directly from the iscsid internals into a netlink message is a good way to go about this. It's really big, there's an embeddedlist_headwith user address pointers that needs to be left out, and there are 32/64-bit layout differences.Quoted 7 lines
Let me take a look at how you're proposing using this info for iSER, if it makes sense I think we should come up with a better designed structure for passing the information.
Thanks,
ChrisChris,
Thank you for your feedback. I agree that the entire iface is probably overkill, it was more of a proof of concept. We are only using the ipaddress in the iface for iSER (in my patch), but I could see other drivers benefiting from some of the other data in the iface (mac,
interface_name, vlan, etc) so I didn't want to be too restrictive so that it wouldn't have to be extended later. I've not worked on userspace/kernel interaction before so I need some guidance to make the transition between userspace and kernel versions smoother.
Quoted 4 lines
This patchset works for what we need and it is very important for us (and I'm sure others once the feature is available) and I'm happy to put in the time to get it accepted upstream, I'm just new to kernel development and need some guidance.
Are there other comments/ideas/suggestions specifically from the iSCSI/iSER guys? I'd like to keep this patch moving.
Thanks.
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1 --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 48 lines · Robert LeBlanc
Quoted 46 lines · Robert LeBlanc
Quoted 26 lines · Chris Leech
Quoted 9 lines · Robert LeBlanc
This patchset enables iSCSI offload drivers to have access to the iface
information provided by iscsid. This allows users to have more control of how the driver connects to the iSCSI target. iSER is updated to use iface.ipaddress to set the source IP address if configured. This allows
iSER to use multiple ports on the same network or in more complicated routed configurations.Quoted 7 lines
Since there is already a change to the function parameters,
dst_addris upgraded tosockaddr_storageso that it is more future proof and makes
the size of the struct static and not dependent on checking theSA_FAMILY.This is dependent on updates to Open-iSCSI.
Hi Robert,
I don't think that passing the
iface_recstructure directly from the iscsid internals into a netlink message is a good way to go about this. It's really big, there's an embeddedlist_headwith user address pointers that needs to be left out, and there are 32/64-bit layout differences.Quoted 7 lines
Let me take a look at how you're proposing using this info for iSER, if it makes sense I think we should come up with a better designed structure for passing the information.
Thanks,
ChrisChris,
Thank you for your feedback. I agree that the entire iface is probably overkill, it was more of a proof of concept. We are only using the ipaddress in the iface for iSER (in my patch), but I could see other drivers benefiting from some of the other data in the iface (mac,
interface_name, vlan, etc) so I didn't want to be too restrictive so that it wouldn't have to be extended later. I've not worked on userspace/kernel interaction before so I need some guidance to make the transition between userspace and kernel versions smoother.
Quoted 7 lines
Quoted 4 lines
This patchset works for what we need and it is very important for us (and I'm sure others once the feature is available) and I'm happy to put in the time to get it accepted upstream, I'm just new to kernel development and need some guidance.
Are there other comments/ideas/suggestions specifically from the iSCSI/iSER guys? I'd like to keep this patch moving.
Considering partial iSCSI offload solution (like bnx2i and qedi) point of view, we liked the idea from Hannes to create TAP interface to associate with each iSCSI offload interface, which will allow us to use userspace tools for configuration. I haven't dig into its details yet, but at higher level it looks like this will help us to move away from our dependency over iscsiuio.
Thanks,
Manish R.
Quoted 59 lines · Manish
Quoted 48 lines · Robert LeBlanc
Quoted 46 lines · Robert LeBlanc
Quoted 26 lines · Chris Leech
Quoted 9 lines · Robert LeBlanc
This patchset enables iSCSI offload drivers to have access to the iface
information provided by iscsid. This allows users to have more control of how the driver connects to the iSCSI target. iSER is updated to use iface.ipaddress to set the source IP address if configured. This allows
iSER to use multiple ports on the same network or in more complicated routed configurations.Quoted 7 lines
Since there is already a change to the function parameters,
dst_addris upgraded tosockaddr_storageso that it is more future proof and makes
the size of the struct static and not dependent on checking theSA_FAMILY.This is dependent on updates to Open-iSCSI.
Hi Robert,
I don't think that passing the
iface_recstructure directly from the iscsid internals into a netlink message is a good way to go about this. It's really big, there's an embeddedlist_headwith user address pointers that needs to be left out, and there are 32/64-bit layout differences.Quoted 7 lines
Let me take a look at how you're proposing using this info for iSER, if it makes sense I think we should come up with a better designed structure for passing the information.
Thanks,
ChrisChris,
Thank you for your feedback. I agree that the entire iface is probably overkill, it was more of a proof of concept. We are only using the ipaddress in the iface for iSER (in my patch), but I could see other drivers benefiting from some of the other data in the iface (mac,
interface_name, vlan, etc) so I didn't want to be too restrictive so that it wouldn't have to be extended later. I've not worked on userspace/kernel interaction before so I need some guidance to make the transition between userspace and kernel versions smoother.Quoted 7 lines
Quoted 4 lines
This patchset works for what we need and it is very important for us (and I'm sure others once the feature is available) and I'm happy to put in the time to get it accepted upstream, I'm just new to kernel development and need some guidance.
Are there other comments/ideas/suggestions specifically from the iSCSI/iSER guys? I'd like to keep this patch moving.
Quoted 6 lines
Considering partial iSCSI offload solution (like bnx2i and qedi) point of view, we liked the idea from Hannes to create TAP interface to associate with each iSCSI offload interface, which will allow us to use userspace tools for configuration. I haven't dig into its details yet, but at higher level it looks like this will help us to move away from our dependency over iscsiuio.
I'm having a hard time wrapping my head around this idea. How can configuring a TAP (separate Ethernet device) affect the offload NIC. I don't see how you can bind to the right interface with the IP address or how that is passed to rdma_connect() using a TAP. Is TAP used instead of netlink for communicating between userspace and the kernel? Obviously by my questions, at the moment I'm not sure how to approach this at all and would be the wrong person to make this happen.
If someone can explain how this would work and point to some code that does something like this (examples are good for me), I can try to create a patch with TAPs. As I mentioned before, this is important for us and I'm willing to put in the time to learn and code, but I'm really lost at this point.
Thank you,
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1
Signature · 5 lines
You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/[email protected] Visit this group at https://groups.google.com/group/open-iscsi. For more options, visit https://groups.google.com/d/optout.
Quoted 82 lines · Robert LeBlanc
Quoted 59 lines · Manish
Quoted 48 lines · Robert LeBlanc
Quoted 46 lines · Robert LeBlanc
Quoted 26 lines · Chris Leech
Quoted 9 lines · Robert LeBlanc
This patchset enables iSCSI offload drivers to have access to the iface
information provided by iscsid. This allows users to have more control of how the driver connects to the iSCSI target. iSER is updated to use iface.ipaddress to set the source IP address if configured. This allows
iSER to use multiple ports on the same network or in more complicated routed configurations.Quoted 7 lines
Since there is already a change to the function parameters,
dst_addris upgraded tosockaddr_storageso that it is more future proof and makes
the size of the struct static and not dependent on checking theSA_FAMILY.This is dependent on updates to Open-iSCSI.
Hi Robert,
I don't think that passing the
iface_recstructure directly from the iscsid internals into a netlink message is a good way to go about this. It's really big, there's an embeddedlist_headwith user address pointers that needs to be left out, and there are 32/64-bit layout differences.Quoted 7 lines
Let me take a look at how you're proposing using this info for iSER, if it makes sense I think we should come up with a better designed structure for passing the information.
Thanks,
ChrisChris,
Thank you for your feedback. I agree that the entire iface is probably overkill, it was more of a proof of concept. We are only using the ipaddress in the iface for iSER (in my patch), but I could see other drivers benefiting from some of the other data in the iface (mac,
interface_name, vlan, etc) so I didn't want to be too restrictive so that it wouldn't have to be extended later. I've not worked on userspace/kernel interaction before so I need some guidance to make the transition between userspace and kernel versions smoother.Quoted 7 lines
Quoted 4 lines
This patchset works for what we need and it is very important for us (and I'm sure others once the feature is available) and I'm happy to put in the time to get it accepted upstream, I'm just new to kernel development and need some guidance.
Are there other comments/ideas/suggestions specifically from the iSCSI/iSER guys? I'd like to keep this patch moving.
Quoted 6 lines
Considering partial iSCSI offload solution (like bnx2i and qedi) point of view, we liked the idea from Hannes to create TAP interface to associate with each iSCSI offload interface, which will allow us to use userspace tools for configuration. I haven't dig into its details yet, but at higher level it looks like this will help us to move away from our dependency over iscsiuio.
I'm having a hard time wrapping my head around this idea. How can configuring a TAP (separate Ethernet device) affect the offload NIC. I don't see how you can bind to the right interface with the IP address or how that is passed to
rdma_connect()using a TAP. Is TAP used instead of netlink for communicating between userspace and the kernel? Obviously by my questions, at the moment I'm not sure how to approach this at all and would be the wrong person to make this happen.If someone can explain how this would work and point to some code that does something like this (examples are good for me), I can try to create a patch with TAPs. As I mentioned before, this is important for us and I'm willing to put in the time to learn and code, but I'm really lost at this point.
Quoted 5 lines
Thank you,
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1
Can we get some more discussion/enlightenment on this? It would be really nice to have this in 4.14 and time is getting short.
Thanks.
----------------
Robert LeBlanc
PGP Fingerprint 79A2 9CA4 6CC4 45DD A904 C70E E654 3BB2 FA62 B9F1