I'm looking at this function:

> void
> dls_ether_soft_ring_fanout(void *rx_handle, void *rx_cookie, mblk_t *mp_chain,
>     mac_header_info_t *mhip)
> {
>         ipha_t          *ipha = (ipha_t *)mp_chain->b_rptr;
>         dls_impl_t      *dip = (dls_impl_t *)rx_handle;
>         int             indx;
>         int             key;
>         int             hdr_len;
>         uint16_t        port1, port2;
> 
>         switch (dip->di_soft_ring_fanout_type) {
>         case SOFT_RING_SRC_HASH:
>                 /*
>                  * We get a chain of packets from the same remote. Make
>                  * sure the same remote goes to same ring.
>                  */
>                 hdr_len = IPH_HDR_LENGTH(ipha);
>                 port1 = *((uint16_t *)(&mp_chain->b_rptr[hdr_len]));
>                 port2 = *((uint16_t *)(&mp_chain->b_rptr[hdr_len+2]));
>                 key = port1 + port2;
>                 indx = COMPUTE_HASH(key, dip->di_soft_ring_size);
>                 soft_ring_process(dip->di_soft_ring_list[indx],
>                     mp_chain, 0);
>                 break;
>         case SOFT_RING_RND_ROBIN:
>         case SOFT_RING_RANDOM:
>                 /*
>                  * Just send it to any possible soft ring
>                  */
>                 soft_ring_process(dip->di_soft_ring_list[
>                         lbolt % dip->di_soft_ring_size], mp_chain, 0);
>                 break;
>         }
> }

It appears that since it does not check the ipha_protocol field, that soft
rings can be used to scatter inbound AH/ESP traffic on a per-SPI basis.

Can someone confirm/deny my assertion?

Thanks,
Dan
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to