c***2 发帖数: 838 | 1 What data strucutre to use for passing 1MB of data to OS for network packet
delivering?
Confused about this question: it's just a buffer, using shared memory to
avoid copy, what else? |
c***2 发帖数: 838 | 2 I suspect that the interviewer intentionally gives the interviewee a hard
time for this kind of question? |
z***e 发帖数: 5393 | 3 If you know the implementing for net buffer list (either for linux/bsd or
windows), it's an easy question and you can show off your understanding for
network protocol implementing details---- but it seems you don't.
Passing data for network packets is ususally done using a list of buffers (
considering fragmentation). Check NetBufferList on MSDN.
packet
【在 c***2 的大作中提到】 : What data strucutre to use for passing 1MB of data to OS for network packet : delivering? : Confused about this question: it's just a buffer, using shared memory to : avoid copy, what else?
|
c***2 发帖数: 838 | 4 The interviewer said that's not what he is asking.
Of course, it's awkward to pack 1MB of data into one single buffer since
eventually you need to pack packets according to MTU.
That's why I am confused.
for
【在 z***e 的大作中提到】 : If you know the implementing for net buffer list (either for linux/bsd or : windows), it's an easy question and you can show off your understanding for : network protocol implementing details---- but it seems you don't. : Passing data for network packets is ususally done using a list of buffers ( : considering fragmentation). Check NetBufferList on MSDN. : : packet
|
z***e 发帖数: 5393 | 5 NBL is not just for fragmentation and MTU purpose.
anyway, if you don't know what the interviewer is asking, then ask him. DON'
T answer unless you know what the interviewer is aksing. It's OK to take 10
mins to figure out what he is asking (this is very important and indicate if
you can be a good co-worker) than spending 1 mins to "guess" what he is
asking and 9 mins to give an inaccurate answer.
【在 c***2 的大作中提到】 : The interviewer said that's not what he is asking. : Of course, it's awkward to pack 1MB of data into one single buffer since : eventually you need to pack packets according to MTU. : That's why I am confused. : : for
|
c***2 发帖数: 838 | 6 You are right. I'll take the lesson.
DON'
10
if
【在 z***e 的大作中提到】 : NBL is not just for fragmentation and MTU purpose. : anyway, if you don't know what the interviewer is asking, then ask him. DON' : T answer unless you know what the interviewer is aksing. It's OK to take 10 : mins to figure out what he is asking (this is very important and indicate if : you can be a good co-worker) than spending 1 mins to "guess" what he is : asking and 9 mins to give an inaccurate answer.
|