svn commit: r218232 - head/sys/netinet
Juli Mallett
jmallett at FreeBSD.org
Thu Feb 3 20:59:26 UTC 2011
On Thu, Feb 3, 2011 at 12:29, John Baldwin <jhb at freebsd.org> wrote:
>> ip = mtod(m, struct ip *);
>> offset = off + sizeof(*sh);
>> if (SCTP_BUF_LEN(m) < offset) {
>> @@ -5944,7 +5947,7 @@ sctp_input(struct mbuf *m, int off)
>> ip = mtod(m, struct ip *);
>> }
>> sh = (struct sctphdr *)((caddr_t)ip + off);
>> - cpu_to_use = ntohl(sh->v_tag) % mp_ncpus;
>> + cpu_to_use = ntohl(sh->v_tag) % mp_maxid;
>
> Hmmm, this is more complicated. Can sctp_queue_to_mcore() handle the fact
> that a cpu_to_use value might not be valid? If not you might want to maintain
> a separate "dense" virtual CPU ID table numbered 0 .. mp_ncpus - 1 that maps
> to "present" FreeBSD CPU IDs. I think Robert has done something similar to
> support RSS in TCP. Does that make sense?
Plus mp_maxid is inclusive, so rrs probably meant (mp_maxid + 1) not
mp_maxid in that modulus.
More information about the svn-src-head
mailing list