NetSys / bess

BESS: Berkeley Extensible Software Switch
Other
311 stars 174 forks source link

About batch mechanism in Bess #752

Open btlcmr0702 opened 6 years ago

btlcmr0702 commented 6 years ago

Hi I wonder when will the receiver get a batch of packets(batch->cnt() > 1) instead of just one packet(batch->cnt() =1)? And what will influence the value of cnt of batch? Expected your reply. Thanks a lot

sangjinhan commented 6 years ago

(I am sorry for this late response)

You can/should assume that the batch will contain more than 1 packet. For example, suppose your NIC port receives packets at 100kpps, but it is polled by BESS only at 20k/s for some reason. Then we can expect the average batch size will be 5 packets / batch. In general, the polling rate of a TC will be low (thus batch size becomes larger) when: