On 2009-05-28, Anton Maksimenkov <anton...@gmail.com> wrote: > 2009/5/28 SJP Lists <sjp.li...@flashbsd.net>: >> In other words, doing it on the incoming is pointless. Thus, as in >> your examples, the logic behind shaping only on the outbound. >> >> i.e.You can easily delay sending something you have, but you have >> little to no control over the ingress traffic of a link where only the >> local host you have control of. > > Partially agree... Shaping incoming packets is useless. But _dropping_ > incoming packets (when they reach some rate limit) seemed meaningful. > My opinion is that we can save some power (performance) when we drop > packets early instead of allowing them to go through full stack > (routing, and pf also, as I think). > Just think about DOS. And all interrupts processed on one cpu. They > can put down your machine to it's knees, while others processors will > stay cold.
we already do some mitigation for that in certain drivers. $ cd /sys/dev; grep MCLGETI pci/* ic/* pci/if_bge.c: MCLGETI(m, M_DONTWAIT, &sc->arpcom.ac_if, MCLBYTES); pci/if_bge.c: MCLGETI(m, M_DONTWAIT, &sc->arpcom.ac_if, BGE_JLEN); pci/if_bnx.c: MCLGETI(m, M_DONTWAIT, &sc->arpcom.ac_if, MCLBYTES); pci/if_em.c: MCLGETI(m, M_DONTWAIT, &sc->interface_data.ac_if, MCLBYTES); pci/if_iwn.c: MCLGETI(data->m, M_DONTWAIT, NULL, IWN_RBUF_SIZE); pci/if_iwn.c: MCLGETI(m1, M_DONTWAIT, NULL, IWN_RBUF_SIZE); pci/if_ix.c: MCLGETI(m, M_DONTWAIT, &sc->arpcom.ac_if, size); pci/if_msk.c: MCLGETI(m, M_DONTWAIT, &sc_if->arpcom.ac_if, sc_if->sk_pktlen); pci/if_sis.c: MCLGETI(m_new, M_DONTWAIT, &sc->arpcom.ac_if, MCLBYTES); pci/if_sk.c: MCLGETI(m, M_DONTWAIT, &sc_if->arpcom.ac_if, SK_JLEN); pci/if_vic.c: MCLGETI(m0, M_DONTWAIT, NULL, m->m_pkthdr.len); pci/if_vic.c: MCLGETI(m, M_DONTWAIT, &sc->sc_ac.ac_if, pktlen); pci/if_wpi.c: MCLGETI(data->m, M_DONTWAIT, NULL, WPI_RBUF_SIZE); pci/if_wpi.c: MCLGETI(m1, M_DONTWAIT, NULL, WPI_RBUF_SIZE); ic/gem.c: MCLGETI(m, M_DONTWAIT, &sc->sc_arpcom.ac_if, MCLBYTES); ic/hme.c: MCLGETI(m, M_DONTWAIT, &sc->sc_arpcom.ac_if, MCLBYTES);