Peter Memishian wrote:
> With respect to ire_t's and ill_t's, how does (if it does) the IPMP
> refactoring project change the way these can be used?
It relies extensively on the split between ire_ipif and ire_stq/irq_rfq.
As with the current bits, ire_ipif (and the ipif's associated ill) refers
to the IRE's source address, and ire_stq/ire_rfq refer to the queue the
packets will be sent and received on.
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)
And the attached patches should be applied to IP...
The problem as it exists today shouldn't impact the delivery
of packets (ip_xmit_v4 will send them out the right interface)
but various other things, including which interface a packet is
associated with for filtering, could possibly be incorrect.
Darren
------- 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);
@@ -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);
@@ -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);
_______________________________________________
networking-discuss mailing list
[email protected]