On 02/02/2014 09:34, Or Gerlitz wrote:
On 02/02/2014 06:12, Mike Christie wrote:
On 2/1/14 2:42 PM, Or Gerlitz wrote:
At this time (e.g after bind and before sending login) I need only the
session discovery yes/no set param, this goes down to different buffer
management strategy for discovery vs. normal sessions in iser. I
understand that your patch should replace both patches I sent, right?

Yes.


Hi Mike,

I applied the patch and tested... for the full half of the glass it works with iser :) but for the other half, it breaks with iscsi-tcp :( see below logs of iscsiadm and iscsid

here are stack listings from gdb

gdb) bt
#0 0x000000000042de2f in kset_param (transport_handle=18446744072099416544, sid=1, cid=0, param=ISCSI_PARAM_TARGET_NAME, value=0x165df58, type=1) at netlink.c:706 #1 0x0000000000429a83 in iscsi_session_set_params (conn=0x165fa78) at initiator_common.c:603 #2 0x000000000043488b in iscsi_create_session (fndata=0x7fff5c1835c0, iface=<value optimized out>, rec_list=0x7fff5c1806b0) at discovery.c:1410 #3 discovery_sendtargets (fndata=0x7fff5c1835c0, iface=<value optimized out>, rec_list=0x7fff5c1806b0) at discovery.c:1607 #4 0x0000000000412429 in idbm_bind_iface_to_nodes (disc_node_fn=<value optimized out>, data=<value optimized out>, iface=0x7fff5c180710, bound_recs=0x7fff5c183550)
    at idbm.c:2360
#5 0x0000000000414643 in idbm_bind_ifaces_to_nodes (disc_node_fn=0x4342c0 <discovery_sendtargets>, data=0x7fff5c1835c0, ifaces=<value optimized out>,
    bound_recs=0x7fff5c183550) at idbm.c:2428
#6 0x0000000000437e38 in do_software_sendtargets (drec=0x7fff5c1835c0, ifaces=0x0, info_level=-1, do_login=0, op=<value optimized out>, sync_drec=1)
    at iscsiadm.c:1121
#7 do_target_discovery (drec=0x7fff5c1835c0, ifaces=0x0, info_level=-1, do_login=0, op=<value optimized out>, sync_drec=1) at iscsiadm.c:1238 #8 0x000000000043868a in exec_disc_op (disc_type=<value optimized out>, ip=0x7fff5c1857a7 "192.168.20.17", port=<value optimized out>, ifaces=0x7fff5c184590, info_level=-1, do_login=0, do_discover=0, op=0, params=0x7fff5c184580, do_show=0) at iscsiadm.c:3010 #9 0x000000000043b4ab in main (argc=9, argv=0x7fff5c1846d8) at iscsiadm.c:3537



(gdb) bt full
#0 0x000000000042de2f in kset_param (transport_handle=18446744072099416544, sid=1, cid=0, param=ISCSI_PARAM_TARGET_NAME, value=0x165df58, type=1) at netlink.c:706
        ev = <value optimized out>
        param_str = <value optimized out>
        rc = <value optimized out>
        len = <value optimized out>
iov = {{iov_base = 0x0, iov_len = 140734738465632}, {iov_base = 0x37f9e03c48, iov_len = 240415444368}}
        __FUNCTION__ = "kset_param"
#1 0x0000000000429a83 in iscsi_session_set_params (conn=0x165fa78) at initiator_common.c:603
        session = 0x165a010
        i = <value optimized out>
        rc = <value optimized out>
conntbl = {{param = 15, type = 1, value = 0x165df58, conn_only = 0}, {param = 17, type = 1, value = 0x165a8ec, conn_only = 1}, {param = 18, type = 0, value = 0x165acf0, conn_only = 1}, {param = 19, type = 0, value = 0x1666aa4, conn_only = 0}, {param = 22, type = 1, value = 0x165f66c, conn_only = 0}, { param = 23, type = 1, value = 0x165f870, conn_only = 0}, {param = 24, type = 1, value = 0x165f76c, conn_only = 0}, {param = 25, type = 1, value = 0x165f970, conn_only = 0}, {param = 26, type = 0, value = 0x165df2c, conn_only = 0}, {param = 27, type = 0, value = 0x1666ab4, conn_only = 0}, { param = 28, type = 0, value = 0x1666ab0, conn_only = 0}, {param = 35, type = 0, value = 0x1666aac, conn_only = 0}, {param = 30, type = 0, value = 0x16621f0, conn_only = 1}, {param = 31, type = 0, value = 0x16621ec, conn_only = 1}, {param = 32, type = 1, value = 0x165ad40, conn_only = 0}, { param = 34, type = 1, value = 0x6c0bc0, conn_only = 0}, {param = 39, type = 1, value = 0x165a5e5, conn_only = 0}, {param = 40, type = 1, value = 0x165a6e5, conn_only = 0}, {param = 41, type = 1, value = 0x165a7e5, conn_only = 0}, {param = 43, type = 0, value = 0x165df48, conn_only = 0}} #2 0x000000000043488b in iscsi_create_session (fndata=0x7fff5c1835c0, iface=<value optimized out>, rec_list=0x7fff5c1806b0) at discovery.c:1410
        conn = 0x165fa78
        login_status = <value optimized out>
        status_class = 0 '\000'
        t = 0x1667160
        login_failures = 0
        rc = 0
        login_delay = <value optimized out>
        status_detail = 0 '\000'
serv = "3260\000\177\000\000\214\006\030\\\377\177\000\000\000\000\000\000\000\000\000\000\320\337`\371\067\000\000" #3 discovery_sendtargets (fndata=0x7fff5c1835c0, iface=<value optimized out>, rec_list=0x7fff5c1806b0) at discovery.c:1607
        drec = 0x7fff5c1835c0
        pfd = {fd = 1545078412, events = 32767, revents = 0}
pdu_buffer = {opcode = 0 '\000', flags = 0 '\000', rsvd2 = "\000", hlength = 0 '\000', dlength = "\000\000", lun = "\000\000\000\000\000\000\000", itt = 0, ttt = 0, statsn = 0, exp_statsn = 0, max_statsn = 0, other = '\000' <repeats 11 times>}
        pdu = 0x7fff5c1805d0
        data = 0x16677f0 "\330\336\030\372\067"
        active = <value optimized out>
        valid_text = <value optimized out>
        connection_timer = {tv_sec = 0, tv_usec = 0}
        timeout = <value optimized out>
        rc = <value optimized out>
        sendtargets = {allocated_length = 0, data_length = 0, buffer = 0x0}
        data_len = 32768
        config = 0x7fff5c1839d0
---Type <return> to continue, or q <return> to quit---
#4 0x0000000000412429 in idbm_bind_iface_to_nodes (disc_node_fn=<value optimized out>, data=<value optimized out>, iface=0x7fff5c180710, bound_recs=0x7fff5c183550)
    at idbm.c:2360
        rec = <value optimized out>
        tmp = <value optimized out>
        new_recs = {next = 0x7fff5c1806b0, prev = 0x7fff5c1806b0}
        rc = <value optimized out>
#5 0x0000000000414643 in idbm_bind_ifaces_to_nodes (disc_node_fn=0x4342c0 <discovery_sendtargets>, data=0x7fff5c1835c0, ifaces=<value optimized out>,
    bound_recs=0x7fff5c183550) at idbm.c:2428
def_iface = {list = {next = 0x0, prev = 0x0}, name = "default", '\000' <repeats 57 times>, iface_num = 0, netdev = '\000' <repeats 15 times>, ipaddress = '\000' <repeats 1024 times>, subnet_mask = '\000' <repeats 1024 times>, gateway = '\000' <repeats 1024 times>, bootproto = '\000' <repeats 79 times>, ipv6_linklocal = '\000' <repeats 1024 times>, ipv6_router = '\000' <repeats 1024 times>, ipv6_autocfg = '\000' <repeats 1024 times>, linklocal_autocfg = '\000' <repeats 1024 times>, router_autocfg = '\000' <repeats 1024 times>, vlan_id = 0, vlan_priority = 0 '\000', vlan_state = '\000' <repeats 79 times>, state = '\000' <repeats 79 times>, mtu = 0, port = 0, delayed_ack = '\000' <repeats 79 times>, nagle = '\000' <repeats 79 times>, tcp_wsf_state = '\000' <repeats 79 times>, tcp_wsf = 0 '\000', tcp_timer_scale = 0 '\000', tcp_timestamp = '\000' <repeats 79 times>, dhcp_dns = '\000' <repeats 79 times>, dhcp_slp_da = '\000' <repeats 79 times>, tos_state = '\000' <repeats 79 times>, tos = 0 '\000', gratuitous_arp = '\000' <repeats 79 times>, dhcp_alt_client_id_state = '\000' <repeats 79 times>, dhcp_alt_client_id = '\000' <repeats 79 times>, dhcp_req_vendor_id_state = '\000' <repeats 79 times>, dhcp_vendor_id_state = '\000' <repeats 79 times>, dhcp_vendor_id = '\000' <repeats 79 times>, dhcp_learn_iqn = '\000' <repeats 79 times>, fragmentation = '\000' <repeats 79 times>, incoming_forwarding = '\000' <repeats 79 times>, ttl = 0 '\000', gratuitous_neighbor_adv = '\000' <repeats 79 times>, redirect = '\000' <repeats 79 times>, mld = '\000' <repeats 79 times>, flow_label = 0, traffic_class = 0, hop_limit = 0 '\000', nd_reachable_tmo = 0, nd_rexmit_time = 0, nd_stale_tmo = 0, dup_addr_detect_cnt = 0 '\000', router_adv_link_mtu = 0, def_task_mgmt_tmo = 0, header_digest = '\000' <repeats 79 times>, data_digest = '\000' <repeats 79 times>, immediate_data = '\000' <repeats 79 times>, initial_r2t = '\000' <repeats 79 times>, data_seq_inorder = '\000' <repeats 79 times>, data_pdu_inorder = '\000' <repeats 79 times>, erl = 0 '\000', max_recv_dlength = 0, first_burst_len = 0, max_out_r2t = 0, max_burst_len = 0, chap_auth = '\000' <repeats 79 times>, bidi_chap = '\000' <repeats 79 times>, strict_login_comp = '\000' <repeats 79 times>, discovery_auth = '\000' <repeats 79 times>, discovery_logout = '\000' <repeats 79 times>, port_state = '\000' <repeats 79 times>, port_speed = '\000' <repeats 79 times>, hwaddress = '\000' <repeats 17 times>, transport_name = "tcp", '\000' <repeats 12 times>, alias = '\000' <repeats 255 times>,
          iname = '\000' <repeats 255 times>}
        def_ifaces = {next = 0x7fff5c1834e0, prev = 0x7fff5c1834e0}
        rec = <value optimized out>
        tmp_rec = <value optimized out>
        iface = <value optimized out>
        tmp_iface = <value optimized out>
        t = <value optimized out>
        rc = <value optimized out>
        found = <value optimized out>
#6 0x0000000000437e38 in do_software_sendtargets (drec=0x7fff5c1835c0, ifaces=0x0, info_level=-1, do_login=0, op=<value optimized out>, sync_drec=1)
    at iscsiadm.c:1121
        rec_list = {next = 0x7fff5c183550, prev = 0x7fff5c183550}
        rec = <value optimized out>
        tmp = <value optimized out>
        rc = <value optimized out>
#7 do_target_discovery (drec=0x7fff5c1835c0, ifaces=0x0, info_level=-1, do_login=0, op=<value optimized out>, sync_drec=1) at iscsiadm.c:1238
        tmp = <value optimized out>
---Type <return> to continue, or q <return> to quit---
        iface = <value optimized out>
        rc = 0
        host_no = <value optimized out>
        t = <value optimized out>
#8 0x000000000043868a in exec_disc_op (disc_type=<value optimized out>, ip=0x7fff5c1857a7 "192.168.20.17", port=<value optimized out>, ifaces=0x7fff5c184590, info_level=-1, do_login=0, do_discover=0, op=0, params=0x7fff5c184580, do_show=0) at iscsiadm.c:3010 drec = {startup = ISCSI_STARTUP_MANUAL, type = DISCOVERY_TYPE_SENDTARGETS, address = "192.168.20.17", '\000' <repeats 1011 times>, port = 3260, u = { sendtargets = {reopen_max = 5, use_discoveryd = 0, discoveryd_poll_inval = 30, auth = {authmethod = 0, username = '\000' <repeats 255 times>, password = '\000' <repeats 255 times>, password_length = 0, username_in = '\000' <repeats 255 times>, password_in = '\000' <repeats 255 times>, password_in_length = 0}, conn_timeo = {login_timeout = 15, logout_timeout = 0, auth_timeout = 45, active_timeout = 30, noop_out_interval = 0, noop_out_timeout = 0}, conn_conf = {MaxRecvDataSegmentLength = 32768, MaxXmitDataSegmentLength = 0, HeaderDigest = 0, DataDigest = 0, IFMarker = 0, OFMarker = 0}, session_conf = {DataPDUInOrder = 0, DataSequenceInOrder = 0, protocol = 0, InitialR2T = 0, ImmediateData = 1, FirstBurstLength = 262144, MaxBurstLength = 16776192, DefaultTime2Wait = 2, DefaultTime2Retain = 0, MaxConnections = 1, MaxOutstandingR2T = 1, ERL = 0, FastAbort = 1}}, slp = {scopes = 0x5 <Address 0x5 out of bounds>, interfaces = 0x1e <Address 0x1e out of bounds>, poll_interval = 0, auth = {authmethod = 0, username = '\000' <repeats 255 times>, password = '\000' <repeats 255 times>, password_length = 0, username_in = '\000' <repeats 255 times>, password_in = '\000' <repeats 252 times>, "\017\000\000", password_in_length = 0}}, isns = {
              use_discoveryd = 5, discoveryd_poll_inval = 0}}}
        rc = 0
#9 0x000000000043b4ab in main (argc=9, argv=0x7fff5c1846d8) at iscsiadm.c:3537
        ip = 0x7fff5c1857a7 "192.168.20.17"
        name = 0x0
        value = 0x0
        targetname = 0x0
        group_session_mgmt_mode = 0x0
        ch = <value optimized out>
        longindex = 1
        mode = 0
        port = 3260
        do_login = 0
        do_rescan = 0
        rc = 0
        sid = -1
        op = 0
        type = 0
        do_logout = 0
        do_stats = 0
        do_login_all = 0
        do_logout_all = 0
        info_level = -1
        num_ifaces = 0
        tpgt = -1
        killiscsid = -1
        do_show = 0
        packet_size = 32
---Type <return> to continue, or q <return> to quit---
        ping_count = 1
        ping_interval = 0
        do_discover = 0
        sub_mode = -1
        portal_type = -1
sa_old = {__sigaction_handler = {sa_handler = 0, sa_sigaction = 0}, sa_mask = {__val = {0, 1918016, 4096, 3760, 1391262002, 0, 1334771152, 240415460496, 140592751146584, 0, 4294967295, 0, 1, 6784312, 0, 140734738482620}}, sa_flags = 0, sa_restorer = 0} sa_new = {__sigaction_handler = {sa_handler = 0x436760 <catch_sigint>, sa_sigaction = 0x436760 <catch_sigint>}, sa_mask = {__val = {0 <repeats 16 times>}},
          sa_flags = 0, sa_restorer = 0}
        ifaces = {next = 0x7fff5c184590, prev = 0x7fff5c184590}
        iface = 0x0
        tmp = <value optimized out>
        rec = 0x0
        host_no = 4294967296
        index = 18446744073709551615
        param = <value optimized out>
        params = {next = 0x7fff5c184580, prev = 0x7fff5c184580}

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to open-iscsi@googlegroups.com.
Visit this group at http://groups.google.com/group/open-iscsi.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to