diff --git a/doc/internals/muxes.fig b/doc/internals/muxes.fig index 2c190154d..babdd55f1 100644 --- a/doc/internals/muxes.fig +++ b/doc/internals/muxes.fig @@ -1,4 +1,4 @@ -#FIG 3.2 Produced by xfig version 2.4 +#FIG 3.2 Produced by xfig version 3.2.8b Landscape Center Inches @@ -79,7 +79,7 @@ Single 6 11925 10725 13875 11475 2 4 0 3 0 35 50 -1 20 0.000 1 0 7 0 0 5 13800 11400 12000 11400 12000 10800 13800 10800 13800 11400 -4 1 0 49 -1 4 18 0.0000 4 270 1410 12900 11175 Transport\001 +4 1 0 49 -1 4 18 0.0000 4 285 1335 12900 11175 Transport\001 -6 6 6600 1200 10050 1800 2 1 0 4 35 -1 48 -1 -1 0.000 0 0 -1 0 0 4 @@ -92,7 +92,7 @@ Single 9525 1261 9525 1761 2 1 0 2 35 -1 47 -1 -1 0.000 0 0 -1 0 0 2 9300 1261 9300 1761 -4 1 0 46 -1 4 16 0.0000 4 210 1620 8025 1575 channel buf\001 +4 1 0 46 -1 4 16 0.0000 4 210 1605 8025 1575 channel buf\001 -6 6 12375 8100 12900 8700 2 1 0 2 35 -1 47 -1 -1 0.000 0 0 -1 0 0 2 @@ -168,7 +168,7 @@ Single -6 6 11100 11700 13050 12150 1 1 0 4 20 40 49 -1 20 0.000 1 0.0000 11400 11925 225 150 11400 11925 11625 12075 -4 0 0 49 -1 4 12 0.0000 4 180 1170 11850 12000 I/O tasklet\001 +4 0 0 49 -1 4 12 0.0000 4 165 960 11850 12000 I/O tasklet\001 -6 6 11100 12300 11700 12600 2 1 0 2 35 -1 47 -1 -1 0.000 0 0 -1 0 0 2 @@ -199,12 +199,12 @@ Single 1 1 0 4 37 36 49 -1 20 0.000 1 0.0000 1719 5173 583 250 1719 5173 2302 4923 1 1 0 4 37 36 49 -1 20 0.000 1 0.0000 5325 5175 583 250 5325 5175 5908 4925 1 1 0 4 10 11 45 -1 20 0.000 1 0.0000 4488 8082 612 250 4488 8082 5100 8082 -1 1 0 4 20 40 49 -1 20 0.000 1 0.0000 8400 600 900 210 8400 600 9300 600 1 1 0 4 10 11 49 -1 20 0.000 1 0.0000 12333 7025 417 250 12333 7025 12750 7025 1 1 0 4 20 40 49 -1 20 0.000 1 0.0000 12392 9240 808 210 12392 9240 13200 9240 1 1 0 4 20 40 49 -1 20 0.000 1 0.0000 3167 9240 808 210 3167 9240 3975 9240 1 1 0 4 37 36 49 -1 20 0.000 1 0.0000 1800 11925 225 150 1800 11925 2025 12075 1 1 0 4 10 11 45 -1 20 0.000 1 0.0000 6600 11925 225 150 6600 11925 6825 12075 +1 1 0 4 20 40 49 -1 20 0.000 1 0.0000 8400 600 900 210 8400 600 9300 600 2 1 1 1 0 7 49 -1 -1 4.000 1 0 -1 0 0 2 2550 3300 2550 6150 2 1 1 1 0 7 49 -1 -1 4.000 1 0 -1 0 0 2 @@ -213,7 +213,7 @@ Single 6300 3300 6300 6150 2 1 0 3 0 7 49 -1 -1 8.000 1 0 -1 1 0 2 1 1 1.00 90.00 180.00 - 600 8025 600 11700 + 600 8025 600 12225 2 1 0 3 0 7 49 -1 -1 8.000 1 0 -1 1 0 2 1 1 1.00 90.00 180.00 600 3150 600 1800 @@ -345,58 +345,57 @@ Single 2100 12600 1575 12600 1575 12300 2100 12300 2100 12600 2 4 0 3 33 32 50 -1 20 0.000 1 0 7 0 0 5 6900 12600 6375 12600 6375 12300 6900 12300 6900 12600 -4 1 0 49 -1 4 14 1.5708 4 225 1365 450 825 application\001 -4 1 0 49 -1 4 14 1.5708 4 180 2820 450 9450 connection = cs->conn\001 -4 1 38 48 -1 4 12 0.0000 4 180 1230 8409 657 si_cs_io_cb\001 -4 0 0 49 -1 4 12 1.5708 4 180 2820 2850 3225 mux->subscribe(SUB_RECV)\001 -4 1 0 46 -1 4 16 1.5708 4 210 750 3600 4200 rxbuf\001 -4 1 0 46 -1 4 16 1.5708 4 210 645 4575 9375 dbuf\001 -4 1 0 49 -1 4 12 1.5708 4 195 1185 900 825 (eg: checks,\001 -4 1 0 49 -1 4 12 1.5708 4 180 1200 1125 750 stream-int)\001 -4 1 0 49 -1 4 16 0.0000 4 195 600 12300 7125 MUX\001 -4 1 0 44 -1 4 16 0.0000 4 195 960 4500 8175 DEMUX\001 -4 2 0 49 -1 4 12 0.0000 4 150 1080 3600 8100 Stream ID\001 -4 0 0 49 -1 4 12 0.0000 4 150 1080 12825 7125 Stream ID\001 -4 2 0 49 -1 4 12 0.0000 4 195 1845 3300 10125 tasklet_wakeup()\001 -4 2 0 49 -1 4 12 0.0000 4 195 1845 12150 10125 tasklet_wakeup()\001 -4 2 0 49 -1 4 12 0.0000 4 180 1590 11175 3150 mux->snd_buf()\001 -4 0 0 49 -1 4 12 0.0000 4 180 1605 3675 3225 mux->rcv_buf()\001 -4 0 0 49 -1 4 12 0.0000 4 195 2130 13425 10575 xprt->snd_buf(mbuf)\001 -4 0 0 49 -1 4 12 0.0000 4 195 2070 4725 10500 xprt->rcv_buf(dbuf)\001 -4 1 0 49 -1 4 12 0.0000 4 165 3465 8400 2100 HTX contents when mode==HTTP\001 -4 0 0 49 -1 4 12 0.0000 4 180 2430 13125 675 snd_buf() will move the\001 -4 0 0 49 -1 4 12 0.0000 4 195 2490 13125 975 buffer (zero-copy) when\001 -4 0 0 49 -1 4 12 0.0000 4 195 2595 13125 1275 the destination is empty.\001 -4 2 0 49 -1 4 12 0.0000 4 195 1845 7500 450 tasklet_wakeup()\001 -4 0 0 49 -1 4 12 0.0000 4 195 1845 9300 450 tasklet_wakeup()\001 -4 1 38 48 -1 4 12 0.0000 4 165 735 9534 4200 encode\001 -4 1 38 48 -1 4 12 0.0000 4 165 735 11325 4200 encode\001 -4 1 38 48 -1 4 12 0.0000 4 165 735 13134 4200 encode\001 -4 1 38 48 -1 4 12 0.0000 4 165 735 15009 4200 encode\001 -4 1 38 48 -1 4 12 0.0000 4 165 735 1725 5250 decode\001 -4 1 38 48 -1 4 12 0.0000 4 165 735 3525 5250 decode\001 -4 1 38 48 -1 4 12 0.0000 4 165 735 5325 5250 decode\001 -4 1 38 48 -1 4 12 0.0000 4 165 735 7200 5250 decode\001 -4 1 38 48 -1 4 12 0.0000 4 180 1155 12375 9300 mux_io_cb\001 -4 0 0 49 -1 4 12 1.5708 4 180 2835 12075 3225 mux->subscribe(SUB_SEND)\001 -4 1 0 49 -1 4 14 1.5708 4 165 1605 450 4500 mux streams\001 -4 1 0 49 -1 4 14 1.5708 4 150 2145 450 6750 mux=conn->mux\001 -4 1 0 49 -1 4 14 1.5708 4 180 1590 450 2550 conn_stream\001 -4 0 0 49 -1 4 12 0.0000 4 150 660 12900 75 Notes:\001 -4 0 0 49 -1 4 12 0.0000 4 180 2175 12975 375 - mux->rcv_buf() and\001 -4 0 0 49 -1 4 12 0.0000 4 195 2475 12975 1650 - the application is also\001 -4 0 0 49 -1 4 12 0.0000 4 195 2655 13125 1950 called the data layer and\001 -4 0 0 49 -1 4 12 0.0000 4 180 2925 13125 2250 is cs->data and cs->data_cb\001 -4 0 0 49 -1 4 12 0.0000 4 195 2940 12975 2550 - transport layers (xprt) are\001 -4 0 0 49 -1 4 12 0.0000 4 195 2520 13125 2775 stackable. conn->xprt is\001 -4 0 0 49 -1 4 12 0.0000 4 195 1770 13125 3000 the topmost one.\001 -4 1 0 49 -1 4 18 0.0000 4 270 1410 4500 11175 Transport\001 -4 1 0 46 -1 4 16 0.0000 4 210 735 14625 8175 mbuf\001 -4 1 38 48 -1 4 12 0.0000 4 180 1155 3159 9300 mux_io_cb\001 -4 0 0 49 -1 4 12 0.0000 4 195 2910 2250 12000 encoding/decoding function\001 -4 0 0 49 -1 4 12 0.0000 4 195 1635 2250 12525 transport layer\001 -4 0 0 49 -1 4 12 0.0000 4 195 2730 7050 12525 multiplexer (MUX/DEMUX)\001 -4 0 0 49 -1 4 12 0.0000 4 195 2895 7050 12000 general processing function\001 -4 0 0 49 -1 4 12 0.0000 4 195 3255 11775 12525 stream buffer (byte-level FIFO)\001 -4 2 0 49 -1 4 12 0.0000 4 195 2835 3675 10725 xprt->subscribe(SUB_RECV)\001 -4 2 0 49 -1 4 12 0.0000 4 195 2850 12225 10725 xprt->subscribe(SUB_SEND)\001 +4 1 0 49 -1 4 14 1.5708 4 225 1335 450 825 application\001 +4 0 0 49 -1 4 12 1.5708 4 180 2595 2850 3225 mux->subscribe(SUB_RECV)\001 +4 1 0 46 -1 4 16 1.5708 4 210 645 3600 4200 rxbuf\001 +4 1 0 46 -1 4 16 1.5708 4 210 615 4575 9375 dbuf\001 +4 1 0 49 -1 4 16 0.0000 4 210 600 12300 7125 MUX\001 +4 1 0 44 -1 4 16 0.0000 4 210 945 4500 8175 DEMUX\001 +4 2 0 49 -1 4 12 0.0000 4 150 915 3600 8100 Stream ID\001 +4 0 0 49 -1 4 12 0.0000 4 150 915 12825 7125 Stream ID\001 +4 2 0 49 -1 4 12 0.0000 4 180 1635 3300 10125 tasklet_wakeup()\001 +4 2 0 49 -1 4 12 0.0000 4 180 1635 12150 10125 tasklet_wakeup()\001 +4 2 0 49 -1 4 12 0.0000 4 180 1470 11175 3150 mux->snd_buf()\001 +4 0 0 49 -1 4 12 0.0000 4 180 1425 3675 3225 mux->rcv_buf()\001 +4 0 0 49 -1 4 12 0.0000 4 180 1920 13425 10575 xprt->snd_buf(mbuf)\001 +4 0 0 49 -1 4 12 0.0000 4 180 1830 4725 10500 xprt->rcv_buf(dbuf)\001 +4 1 0 49 -1 4 12 0.0000 4 150 3105 8400 2100 HTX contents when mode==HTTP\001 +4 2 0 49 -1 4 12 0.0000 4 180 1635 7500 450 tasklet_wakeup()\001 +4 0 0 49 -1 4 12 0.0000 4 180 1635 9300 450 tasklet_wakeup()\001 +4 1 38 48 -1 4 12 0.0000 4 150 750 9534 4200 encode\001 +4 1 38 48 -1 4 12 0.0000 4 150 750 11325 4200 encode\001 +4 1 38 48 -1 4 12 0.0000 4 150 750 13134 4200 encode\001 +4 1 38 48 -1 4 12 0.0000 4 150 750 15009 4200 encode\001 +4 1 38 48 -1 4 12 0.0000 4 150 765 1725 5250 decode\001 +4 1 38 48 -1 4 12 0.0000 4 150 765 3525 5250 decode\001 +4 1 38 48 -1 4 12 0.0000 4 150 765 5325 5250 decode\001 +4 1 38 48 -1 4 12 0.0000 4 150 765 7200 5250 decode\001 +4 1 38 48 -1 4 12 0.0000 4 180 1035 12375 9300 mux_io_cb\001 +4 0 0 49 -1 4 12 1.5708 4 180 2580 12075 3225 mux->subscribe(SUB_SEND)\001 +4 1 0 49 -1 4 14 1.5708 4 180 1425 450 4500 mux streams\001 +4 1 0 49 -1 4 14 1.5708 4 135 1980 450 6750 mux=conn->mux\001 +4 1 0 49 -1 4 18 0.0000 4 285 1335 4500 11175 Transport\001 +4 1 0 46 -1 4 16 0.0000 4 210 690 14625 8175 mbuf\001 +4 1 38 48 -1 4 12 0.0000 4 180 1035 3159 9300 mux_io_cb\001 +4 0 0 49 -1 4 12 0.0000 4 195 2805 2250 12000 encoding/decoding function\001 +4 0 0 49 -1 4 12 0.0000 4 180 1365 2250 12525 transport layer\001 +4 0 0 49 -1 4 12 0.0000 4 180 2445 7050 12525 multiplexer (MUX/DEMUX)\001 +4 0 0 49 -1 4 12 0.0000 4 195 2655 7050 12000 general processing function\001 +4 0 0 49 -1 4 12 0.0000 4 180 2820 11775 12525 stream buffer (byte-level FIFO)\001 +4 2 0 49 -1 4 12 0.0000 4 180 2550 3675 10725 xprt->subscribe(SUB_RECV)\001 +4 2 0 49 -1 4 12 0.0000 4 180 2535 12225 10725 xprt->subscribe(SUB_SEND)\001 +4 1 0 49 -1 4 14 1.5708 4 180 780 450 2550 stconn\001 +4 1 0 49 -1 4 12 1.5708 4 195 2010 900 1125 (eg: checks, streams)\001 +4 1 0 49 -1 4 14 1.5708 4 180 3720 450 10125 connection = sc->sedesc->conn\001 +4 0 0 49 -1 4 12 0.0000 4 150 600 12225 225 Notes:\001 +4 0 0 49 -1 4 12 0.0000 4 180 2220 12975 675 snd_buf() will move the\001 +4 0 0 49 -1 4 12 0.0000 4 180 2310 12975 975 buffer (zero-copy) when\001 +4 0 0 49 -1 4 12 0.0000 4 180 2310 12975 1275 the destination is empty.\001 +4 0 0 49 -1 4 12 0.0000 4 180 2220 12825 1650 - the application is also\001 +4 0 0 49 -1 4 12 0.0000 4 180 2700 12975 2250 is sc->app with sc->app_ops\001 +4 0 0 49 -1 4 12 0.0000 4 180 2490 12825 2550 - transport layers (xprt) are\001 +4 0 0 49 -1 4 12 0.0000 4 180 2250 12975 2775 stackable. conn->xprt is\001 +4 0 0 49 -1 4 12 0.0000 4 180 1635 12975 3000 the topmost one.\001 +4 0 0 49 -1 4 12 0.0000 4 180 2400 12975 1950 called the app layer and\001 +4 0 0 49 -1 4 12 0.0000 4 180 1995 12825 375 - mux->rcv_buf() and\001 +4 1 38 48 -1 4 12 0.0000 4 180 1440 8409 657 sc_conn_io_cb\001 diff --git a/doc/internals/muxes.pdf b/doc/internals/muxes.pdf index d0c6432f8..54f8cc77f 100644 Binary files a/doc/internals/muxes.pdf and b/doc/internals/muxes.pdf differ diff --git a/doc/internals/muxes.png b/doc/internals/muxes.png index a5a0102b6..a58f42f44 100644 Binary files a/doc/internals/muxes.png and b/doc/internals/muxes.png differ diff --git a/doc/internals/muxes.svg b/doc/internals/muxes.svg index 091c5b066..3feaa4dcb 100644 --- a/doc/internals/muxes.svg +++ b/doc/internals/muxes.svg @@ -1,11 +1,11 @@ - - + + + width="942pt" height="755pt" + viewBox="254 60 15690 12573"> - - @@ -121,6 +118,9 @@ + + @@ -133,19 +133,19 @@ - + - - - + - @@ -157,7 +157,7 @@ - @@ -169,7 +169,7 @@ - @@ -185,7 +185,7 @@ - @@ -198,7 +198,7 @@ - @@ -211,7 +211,7 @@ - @@ -224,7 +224,7 @@ - @@ -237,7 +237,7 @@ - @@ -250,7 +250,7 @@ - @@ -263,7 +263,7 @@ - @@ -276,7 +276,7 @@ - @@ -289,7 +289,7 @@ - @@ -302,7 +302,7 @@ - @@ -318,7 +318,7 @@ - @@ -331,7 +331,7 @@ - @@ -344,7 +344,7 @@ - @@ -357,7 +357,7 @@ - @@ -370,7 +370,7 @@ - @@ -383,7 +383,7 @@ - @@ -396,7 +396,7 @@ - @@ -409,7 +409,7 @@ - @@ -422,7 +422,7 @@ - @@ -438,7 +438,7 @@ - @@ -454,7 +454,7 @@ - @@ -467,7 +467,7 @@ - @@ -492,7 +492,7 @@ - @@ -505,7 +505,7 @@ - @@ -521,7 +521,7 @@ - @@ -534,7 +534,7 @@ - @@ -547,7 +547,7 @@ - @@ -563,7 +563,7 @@ - @@ -576,7 +576,7 @@ - @@ -589,7 +589,7 @@ - @@ -602,7 +602,7 @@ - @@ -615,7 +615,7 @@ - @@ -629,18 +629,9 @@ application - -connection = cs->conn - mux->subscribe(SUB_RECV) - -(eg: checks, - - -stream-int) - MUX Stream ID @@ -661,12 +652,6 @@ HTX contents when mode==HTTP -snd_buf() will move the - -buffer (zero-copy) when - -the destination is empty. - tasklet_wakeup() tasklet_wakeup() @@ -680,25 +665,6 @@ mux=conn->mux - -conn_stream - -Notes: - -- mux->rcv_buf() and - -- the application is also - -called the data layer and - -is cs->data and cs->data_cb - -- transport layers (xprt) are - -stackable. conn->xprt is - -the topmost one. - Transport encoding/decoding function @@ -714,6 +680,37 @@ xprt->subscribe(SUB_RECV) xprt->subscribe(SUB_SEND) + + +stconn + + +(eg: checks, streams) + + +connection = sc->sedesc->conn + +Notes: + +snd_buf() will move the + +buffer (zero-copy) when + +the destination is empty. + +- the application is also + +is sc->app with sc->app_ops + +- transport layers (xprt) are + +stackable. conn->xprt is + +the topmost one. + +called the app layer and + +- mux->rcv_buf() and @@ -754,8 +751,6 @@ -si_cs_io_cb - encode encode @@ -775,6 +770,8 @@ mux_io_cb mux_io_cb + +sc_conn_io_cb