Changeset f5837524 in mainline for uspace/srv/net


Ignore:
Timestamp:
2018-10-29T17:15:02Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Children:
eec201d
Parents:
184f2f8a
git-author:
Jakub Jermar <jakub@…> (2018-10-28 12:42:35)
git-committer:
Jakub Jermar <jakub@…> (2018-10-29 17:15:02)
Message:

Use user-defined labels instead of phone hashes

This commit changes the way how the async framework maps incomming calls
to connections. Instead of abusing the kernel addresses of attached
phones as identifiers, the IPC_M_CONNECT_TO_ME and IPC_M_CONNECT_ME_TO
messages allow the server to specify an arbitrary label which is
remembered in the connected phone and consequently imprinted on each
call which is routed through this phone.

The async framework uses the address of the connection structure as the
label. This removes the need for a connection hash table because each
incoming call already remembers the connection in its label.

To disambiguate this new label and the other user-defined label used for
answers, the call structure now has the request_label member for the
former and answer_label member for the latter.

This commit also moves the kernel definition of ipc_data_t to abi/ and
removes the uspace redefinition thereof. Finally, when forwarding the
IPC_M_CONNECT_TO_ME call, the phone capability and the kernel object
allocated in request_process are now correctly disposed of.

Location:
uspace/srv/net
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/dhcp/main.c

    r184f2f8a rf5837524  
    128128
    129129        /* Accept the connection */
    130         async_answer_0(icall, EOK);
     130        async_answer_5(icall, EOK, 0, 0, 0, 0, async_get_label());
    131131
    132132        while (true) {
  • uspace/srv/net/dnsrsrv/dnsrsrv.c

    r184f2f8a rf5837524  
    213213
    214214        /* Accept the connection */
    215         async_answer_0(icall, EOK);
     215        async_answer_5(icall, EOK, 0, 0, 0, 0, async_get_label());
    216216
    217217        while (true) {
  • uspace/srv/net/inetsrv/inetcfg.c

    r184f2f8a rf5837524  
    742742
    743743        /* Accept the connection */
    744         async_answer_0(icall, EOK);
     744        async_answer_5(icall, EOK, 0, 0, 0, 0, async_get_label());
    745745
    746746        while (true) {
  • uspace/srv/net/inetsrv/inetping.c

    r184f2f8a rf5837524  
    284284
    285285        /* Accept the connection */
    286         async_answer_0(icall, EOK);
     286        async_answer_5(icall, EOK, 0, 0, 0, 0, async_get_label());
    287287
    288288        inetping_client_t client;
  • uspace/srv/net/inetsrv/inetsrv.c

    r184f2f8a rf5837524  
    390390
    391391        /* Accept the connection */
    392         async_answer_0(icall, EOK);
     392        async_answer_5(icall, EOK, 0, 0, 0, 0, async_get_label());
    393393
    394394        inet_client_init(&client);
  • uspace/srv/net/tcp/service.c

    r184f2f8a rf5837524  
    11691169
    11701170        /* Accept the connection */
    1171         async_answer_0(icall, EOK);
     1171        async_answer_5(icall, EOK, 0, 0, 0, 0, async_get_label());
    11721172
    11731173        log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_client_conn() - client=%p",
  • uspace/srv/net/udp/service.c

    r184f2f8a rf5837524  
    667667
    668668        /* Accept the connection */
    669         async_answer_0(icall, EOK);
     669        async_answer_5(icall, EOK, 0, 0, 0, 0, async_get_label());
    670670
    671671        log_msg(LOG_DEFAULT, LVL_DEBUG, "udp_client_conn()");
Note: See TracChangeset for help on using the changeset viewer.