Commit Graph

18 Commits

Author SHA1 Message Date
Gleb Natapov
12bce3f4fc net: make interface get packets from l3
Instead of l3 (arp/ipv4) pushing packets into interface's queue, make
them register functions that interface can use to ask l3 for packets.
2015-01-06 15:24:10 +02:00
Avi Kivity
3e4c53300d Merge branch 'mq' of ssh://github.com/cloudius-systems/seastar-dev
Multiqueue support for #cpu != #q, from Gleb.
2014-12-16 11:11:22 +02:00
Gleb Natapov
7ac3ba901c net: rework packet forwarding logic
Instead of forward() deciding packet destination make it collect input
for RSS hash function depending on packet type. After data is collected
use toeplitz hash function to calculate packet's destination.
2014-12-16 10:53:41 +02:00
Gleb Natapov
055fbb9430 net: broadcast arp reply on arp protocol level
Instead of returning special value from forward() to broadcast arm reply
call arp.learn() on all cpus at arp protocol lever. The ability of
forward() to return special value will be removed by later patches.
2014-12-15 17:36:14 +02:00
Asias He
62fff15e54 timer: Make timer a template 2014-12-15 19:39:33 +08:00
Gleb Natapov
d698811bdd fix smp broadcast packet handling
Some packets, like arp replies, are broadcast to all cpus for handling,
but only packet structure is copied for each cpu, the actual packet data
is the same for all of them. Currently networking stack mangles a
packet data during its travel up the stack while doing ntoh()
translations which cannot obviously work for broadcaster packets. This
patches fixes the code to not modify packet data while doing ntoh(), but
do it in a stack allocated copy of a data instead.
2014-11-06 10:30:30 +02:00
Avi Kivity
7a1f84a556 reactor: replace references to reactor::_id by its accessor cpu_id() 2014-11-01 17:34:43 +02:00
Gleb Natapov
2a662af092 Forward received packet according to classification 2014-10-07 11:04:05 +03:00
Gleb Natapov
4e7d8a8506 Introduce packet classification mechanism
Classifier returns what cpu a packets should be processed on. It may
return special broadcast identifier. The patch includes classifier for
tcp, udp and arp. Arp classifier broadcasts arp reply to all cpus. Default
classifier does not forward packet.
2014-10-07 11:03:57 +03:00
Tomasz Grabiec
73413748a7 arp: limit the number of waiting requests
Currently the waiters queue can grow to infinity pretty quickly.
2014-10-01 13:45:29 +02:00
Tomasz Grabiec
a435a0561d arp: fail requests on timeout 2014-10-01 13:45:29 +02:00
Tomasz Grabiec
281d986c34 arp: retry lookup requests every second
Bridges with forwarding delay ignore requests for some time. We should
retry the request so that we eventually get the response.
2014-10-01 13:45:29 +02:00
Tomasz Grabiec
ec616d7ae5 arp: add missing host-to-network conversion
Caused ARP requests from seastar to be dropped.
2014-09-25 17:54:29 +03:00
Avi Kivity
313768654a net: remove queuing from l2->l3 rx path
Use a subscription instead.  Queueing should be implemented at the highest
possible level (e.g. tcp), to avoid double-queueing.
2014-09-22 11:28:35 +03:00
Tomasz Grabiec
791797669f net: make offset == 0 by default in packet::get_header() to simplify call sites 2014-09-16 18:48:13 +03:00
Avi Kivity
ef0c3dcc7d arp: reduce console chatter 2014-09-11 11:51:16 +03:00
Avi Kivity
001616f7e4 arp: fix build error 2014-09-01 15:16:53 +03:00
Avi Kivity
c77f77ee3f build: organize files into a directory structure 2014-08-31 21:29:13 +03:00