Yuichiro NAITO:

> +static void
> +ixv_set_multi(struct ix_softc *sc)
> +{
[...]
> +     if ((ifp->if_flags & IFF_PROMISC) == 0 && ac->ac_multirangecnt <= 0 &&
> +           ac->ac_multicnt <= MAX_NUM_MULTICAST_ADDRESSES) {
> +             ETHER_FIRST_MULTI(step, &sc->arpcom, enm);
> +             while (enm != NULL) {
> +                     bcopy(enm->enm_addrlo,
> +                           &mta[mcnt * IXGBE_ETH_LENGTH_OF_ADDRESS],
> +                           IXGBE_ETH_LENGTH_OF_ADDRESS);
> +                     mcnt++;
> +
> +                     ETHER_NEXT_MULTI(step, enm);
> +             }
> +
> +             update_ptr = mta;
> +             sc->hw.mac.ops.update_mc_addr_list(&sc->hw, update_ptr, mcnt,
> +                                                ixv_mc_array_itr, TRUE);
> +     }
> +
> +} /* ixv_set_multi */

This doesn't look right.
There is no handling of ac->ac_multirangecnt > 0 or
mcnt >= MAX_NUM_MULTICAST_ADDRESSES.

Compare ixgb_set_multi() in if_ixgb.c.

> +int32_t ixgbe_update_mc_addr_list_vf(struct ixgbe_hw *hw, uint8_t 
> *mc_addr_list,
> +                                  uint32_t mc_addr_count, ixgbe_mc_addr_itr 
> next,
> +                                  bool clear)
> +{
[...]
> +     /* Each entry in the list uses 1 16 bit word.  We have 30
> +      * 16 bit words available in our HW msg buffer (minus 1 for the
> +      * msg type).  That's 30 hash values if we pack 'em right.  If
> +      * there are more than 30 MC addresses to add then punt the
> +      * extras for now and then add code to handle more than 30 later.
> +      * It would be unusual for a server to request that many multi-cast
> +      * addresses except for in large enterprise network environments.
> +      */
> +
> +     DEBUGOUT1("MC Addr Count = %d\n", mc_addr_count);
> +
> +     cnt = (mc_addr_count > 30) ? 30 : mc_addr_count;

Should MAX_NUM_MULTICAST_ADDRESSES simply be set to 30?

-- 
Christian "naddy" Weisgerber                          [email protected]

Reply via email to