On (08/02/07 11:04), Darren Reed wrote:
>
> This implies that existing code that does something like this:
> out_ill = ire->ire_ipif->ipif_ill
> is incorrect and should in fact be:
> out_ill = ire_to_ill(ire)
>
yes, but this is already the case (should use ire_to_ill()).
See CR 6474802.
> And the attached patches should be applied to IP...
many of the diffs below are misleading: they come from the mrtunnel
code which Sebastien is working on cleaning up. (See CR 6511070)
>
> ------- usr/src/uts/common/inet/ip/ip.c -------
>
> --- - Thu Aug 2 01:50:44 2007
> +++ usr/src/uts/common/inet/ip/ip.c Thu Aug 2 01:46:27 2007
> @@ -7618,7 +7618,8 @@
> /*
> * Don't forward if the interface is down
> */
> - if (ire->ire_ipif->ipif_ill->ill_ipif_up_count == 0) {
> + out_ill = ire_to_ill(ire);
> + if (out_ill->ill_ipif_up_count == 0) {
> goto discard_pkt;
> }
>
> @@ -7646,7 +7647,7 @@
> }
>
> /* Get the ill_index of the ILL */
> - ill_index = ire->ire_ipif->ipif_ill->ill_phyint->phyint_ifindex;
> + ill_index = out_ill->ill_phyint->phyint_ifindex;
>
> /*
> * This location is chosen for the placement of the forwarding hook
> @@ -7654,8 +7655,6 @@
> * packet but haven't yet applied any logic (such as fragmenting)
> * that happen as part of transmitting the packet out.
> */
> - out_ill = ire->ire_ipif->ipif_ill;
> -
> DTRACE_PROBE4(ip4__forwarding__start,
> ill_t *, in_ill, ill_t *, out_ill, ipha_t *, ipha, mblk_t *, mp);
>
I believe all of the above apply to ip_mrtun_forward().
> @@ -16668,20 +16667,17 @@
> return;
> }
>
> + out_ill = ire_to_ill(ire);
> +
> /*
> * Don't forward if the interface is down
> */
> - if (ire->ire_ipif->ipif_ill->ill_ipif_up_count == 0) {
> + if (out_ill->ill_ipif_up_count == 0) {
> BUMP_MIB(mibptr, ipIfStatsInDiscards);
> ip2dbg(("ip_rput_forward:interface is down\n"));
> goto drop_pkt;
> }
>
> - /* Get the ill_index of the outgoing ILL */
> - ill_index = ire->ire_ipif->ipif_ill->ill_phyint->phyint_ifindex;
> -
> - out_ill = ire->ire_ipif->ipif_ill;
> -
> DTRACE_PROBE4(ip4__forwarding__start,
> ill_t *, in_ill, ill_t *, out_ill, ipha_t *, ipha, mblk_t *, mp);
>
These diffs look right.. I believe you can establish the broken-ness
by setting up an IRE_CACHE entry whose source is set via vni/setsrc.
> @@ -16737,6 +16733,9 @@
> }
> /* Initiate Write side IPPF processing */
> if (IPP_ENABLED(IPP_FWD_OUT, ipst)) {
> + /* Get the ill_index of the outgoing ILL */
> + ill_index = out_ill->ill_phyint->phyint_ifindex;
> +
> ip_process(IPP_FWD_OUT, &mp, ill_index);
> if (mp == NULL) {
> ip2dbg(("ip_rput_forward: pkt dropped/deferred"\
> @@ -30077,7 +30076,7 @@
> mp->b_prev = NULL;
>
> /* set up ill index for outbound qos processing */
> - out_ill = ire->ire_ipif->ipif_ill;
> + out_ill = ire_to_ill(ire);
> ill_index = out_ill->ill_phyint->phyint_ifindex;
> first_mp = ip_wput_attach_llhdr(mp, ire, proc,
> ill_index);
Depends on whether qos wants the ire_ipif or the ire_stq for these cases.
--Sowmini
_______________________________________________
networking-discuss mailing list
[email protected]