GitHub PushEvent at 2014-10-13 05:20:05
Repository: yet-another-mpls-stack-for-freebsd
Actor: hmatyschok
Payload: {"shas":[["d81e67be7c13430b00fffc9793d77e43a0c49b31","fb00cfb91cc69dc4d7c070fa6a89479e8ee0eac8@stud.fh-flensburg.de","Major cleanup, namespace changed.\n\nNamespace changed:\n------------------\n\nLet us consider\n\n  fec     : Forward Equivalence Class\n  ftn     : FEC-to-NHLFE Map\n  ilm     : incoming label map\n  nh      : next-hop or gateway address\n  nhlfe   : Next Hop Label Forwarding Entry\n  op      : MPLS operation\n  rd      : MPLS Route Distinguisher or reserved label value\n  segment : denotes particular Label Switch Path (LSP)\n  seg_in  : defines in-segment, incoming label\n  seg_out : defines out-segment, outgoing label\n  x       : destination, key in fec\n\nthen\n\n  fec = < x, nh >\n  gw = < nh, seg_out, rd, op >\n  ftn = < x, gw >\n  nhlfe = < seg_in, ftn >\n  ilm = < seg_in, gw >\n\nfinally former struct mpls_ftn{} changed in\n\n    struct mpls_xc {\n        struct rtentry    *xc_ilm;        /* ilm */\n        struct llentry    *xc_lle;        /* shortcut */\n        struct ifaddr    *xc_ifa;        /* nhlfe */\n        int    xc_flags;\n        struct sockaddr_ftn    xc_gw;    /* storage, destination */\n\n        struct sockaddr_mpls    xc_iseg;    /* storage, seg_in */\n        struct sockaddr_mpls    xc_oseg;    /* stoage, seg_out */\n\n        struct sockaddr    *xc_fec;    /* key x in fec */\n        struct sockaddr    *xc_nh;       /* nh */\n        struct sockaddr    *xc_dst;    /* gateway */\n        struct rtentry    *xc_rt;    /* fec */\n        struct ifnet    *xc_ifp;    /* interface, tx */\n    };\n    #define rotoxc(ro)        ((struct mpls_xc)(ro))\n    #define xctoro(xc)        ((struct route)(xc))\n\nbecause it was wrong terminology and fibnum moved\nfrom mpls_nhlfe{} to\n\n    struct sockaddr_ftn {\n        uint8_t    sftn_len;\n        sa_family_t sftn_family;    /* address family, gateway address (nh) */\n        uint16_t    sftn_pad0[13];    /* stores nh */\n        uint32_t     sftn_label;    /* stores seg_out */\n        uint32_t     sftn_vprd;    /* route distinguisher */\n        uint32_t     sftn_op;    /* MPLS operation */\n        uint32_t     sftn_fib;    /* forwarding information base */\n    };\n    #define satosftn(sa)        ((struct sockaddr_ftn *)(sa))\n    #define sftntosa(sftn)    ((struct sockaddr *)(sftn))\n\nMisc. bugfixes and major cleanup:\n---------------------------------\n\nSeveral fixes in route(8), ifconfig(8) relying MPLS extensions.\n\nHandling of gateway in rt_addrinfo{} by route(8) and netmpls/mpls_rmx.c\nchanged. Segements for x-connect are encoded by sockaddr_mpls{} maps to\nsockaddr_ftn{}, where in-seg is stored by\n\n (a) satosmpls(gateway)->smpls_label = ...\n\nand out-seg by\n\n (b) satosftn(gateway)->sftn_label = ...\n\nMisc. bugfixes in netmpls/mpls_arp.c, optimized shortcut:\n\n    static __inline void\n    mpls_rtalloc_fib(struct mpls_ftnftn, u_int fibnum)\n    {\n\n        rtalloc_fib((struct route)ftn, fibnum);\n        if (ftn->ftn_ilm != NULL) {\n            ftn->ftn_lle = ftn->ftn_lle = /* XXX: <= maps llentry{} */\n                NHLFE_SHORTCUT(ftn->ftn_ilm->rt_ifa);\n            ftn->ftn_ifa = ftn->ftn_ilm->rt_ifa;\n            ftn->ftn_flags = ftn->ftn_ilm->rt_flags;\n        }\n    }\n\non LSR llentry{} maps to route{} avoids call of mpls_arpresolve\nduring i.e. ether_output, if tx host rx ARP_INVREPLY succesfully.\n\nOID\n\n net.link.ether.mpls.proxy_arp= [01]\n\nintroduced. Let us assume:\n\n 1. Alice performs x-connect such that corrosponding\n     llentry{} is allocated by mpls_arp_ifinit().\n 2. By mpls_output tx Protocol Data Unit (PDU) will\n    be cached by mpls_arpresolve() selected llentry{}\n    and mpls_arprequest() tx PDU containing ARPOP_INVREQUEST\n    Service Primitive (SPI).\n 3. Bob rx ARPOP_INVREQUEST by mpls_arpinput().\n 4. If Bob is label peer, then Bob replies by\n    tx ARPOP_INVREPLY containing linklayer\n    address (lla) maps to for tx used network\n    interface.\n 5. Alice rx ARPOP_INVREPLY, maps lla to corrosponding\n    llentry{} and tx by 2. cached PDU.\n\nIf proxy_arp OID remains in enabled state (default setup),\nBob tx during 4. an ARPOP_INVREQUEST downstream before tx\nARPOP_INVREPLY against Alice takes place.\n\n  +------+       < seg_i >                    < seg_j >\n  |       \\\n  | Alice  +---[req, bcast]--->+------+\n  |       /                    |       \\\n  +------+                     | Bob    +---[req, bcast]--->\n          \\                    |       /\n           +<--[repl, ucast]---+------+\n                                       \\\n                                        +<---[repl, ucast]--\n\n (upstream)                                       (downstream)\n\nThis cascade causes by mpls_output tx PDU is cached only by\nLSR_in during mpls_arpresolve() and not by any intermediary\nLSR until LSR_out in LSP.\n    Maybe, proxy_arp could be used as a starting point for an\nimplementation for a traceroute mechanism or for a MPLS_ARP\npiggybacked label distribution engine.","Henning Matyschok",true]],"size":1,"ref":"refs/heads/master","head":"d81e67be7c13430b00fffc9793d77e43a0c49b31"}