Brad Smith <brad <at> comstyle.com> writes:
> 
> Index: if_em.c
> ===================================================================
> RCS file: /home/cvs/src/sys/dev/pci/if_em.c,v
> retrieving revision 1.295
> diff -u -p -u -p -r1.295 if_em.c
> --- if_em.c   11 Feb 2015 23:21:47 -0000      1.295
> +++ if_em.c   3 May 2015 11:17:49 -0000
>  <at>  <at>  -2597,6 +2597,7  <at>  <at>  int
>  em_setup_receive_structures(struct em_softc *sc)
>  {
>       struct ifnet *ifp = &sc->interface_data.ac_if;
> +     u_int lwm;
> 
>       memset(sc->rx_desc_base, 0,
>           sizeof(struct em_rx_desc) * sc->num_rx_desc);
>  <at>  <at>  -2608,8 +2609,12  <at>  <at> 
em_setup_receive_structures(struct em_so
>       sc->next_rx_desc_to_check = 0;
>       sc->last_rx_desc_filled = sc->num_rx_desc - 1;
> 
> -     if_rxr_init(&sc->rx_ring, 2 * ((ifp->if_hardmtu / MCLBYTES) + 1),
> -         sc->num_rx_desc);
> +     if (sc->hw.max_frame_size == ETHER_MAX_LEN)
> +             lwm = 4;
> +     else
> +             lwm = 2 * ((ifp->if_hardmtu / MCLBYTES) + 1);
> +
> +     if_rxr_init(&sc->rx_ring, lwm, sc->num_rx_desc);
> 
>       if (em_rxfill(sc) == 0) {
>               printf("%s: unable to fill any rx descriptors\n",
> 

Running with this patch applied

$ uptime
 3:17PM  up 5 days,  2:04, 4 users, load averages: 0.68, 0.38, 0.20

without the need to restart the network. This wouldn't have been possible
without the patch.

Regards,
-- 
Christian


Reply via email to