Demystifying Network Cards

Video in TIB AV-Portal: Demystifying Network Cards

Formal Metadata

Demystifying Network Cards
Things you always wanted to know about NIC drivers
Title of Series
CC Attribution 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Release Date

Content Metadata

Subject Area
Network cards are often seen as black boxes: you put data in a socket on one side and packets come out at the other end - or the other way around. Let's have a deeper look at how a network card actually works at the lower levels by writing a simple user space driver from scratch for a 10 Gbit/s NIC.
Keywords Hardware & Making

Related Material

The following resource is accompanying material for the video
Video is cited by the following resource
Service (economics) Installation art Memory card Electronic mailing list Plastikkarte Computer network Chaos (cosmogony) Bit Student's t-test Black box Architecture Software Ecoinformatics
Memory card Gender Multiplication sign Translation (relic) Plastikkarte Computer network Student's t-test Modulare Programmierung Student's t-test Particle system Process (computing) Film editing Software System programming Interface (computing) Electric generator Mathematical optimization Physical system
Dataflow Greatest element Memory card Cellular automaton Computer network Volume (thermodynamics) Mereology IP address Film editing Interface (computing) Right angle Computer-assisted translation Communications protocol
Open source Memory card Firewall (computing) Quantification Black box Streaming media Mereology Twitter Hypothesis Software Visualization (computer graphics) Cuboid Task (computing) Service (economics) Demo (music) Firewall (computing) Computer network Staff (military) Cartesian coordinate system Chaining Software Personal digital assistant Computer hardware Function (mathematics) Speech synthesis Physical system Router (computing)
Computer program Socket-Schnittstelle Overhead (computing) Memory card Computer network Basis <Mathematik> Cartesian coordinate system Variable (mathematics) Connected space Film editing Integrated development environment Internetworking Personal digital assistant Network socket Physical system Operating system Spacetime God
Overhead (computing) Divisor Memory card ACID Translation (relic) Befehlsprozessor Network socket Core dump Boundary value problem Spacetime Extension (kinesiology) Tunis God Link (knot theory) Scaling (geometry) Computer network Core dump Cartesian coordinate system Connected space Single-precision floating-point format Message passing Uniform resource locator Befehlsprozessor Order (biology) Figurate number Boundary value problem
Computer program Memory card Planning Computer network Open set Cartesian coordinate system Formal language Crash (computing) Personal digital assistant Kernel (computing) Boundary value problem Physical system Spacetime
Ocean current Dataflow Computer program Module (mathematics) Overhead (computing) Confidence interval Memory card Multiplication sign Device driver Mereology 2 (number) Population density Read-only memory Average Semiconductor memory Befehlsprozessor Kernel (computing) Cuboid Spacetime Office suite Data structure Library (computing) Module (mathematics) Structural load Content (media) Core dump Computer network Bit Maxima and minima Cartesian coordinate system Measurement Open set Exergie Process (computing) Resource allocation Personal digital assistant Escape character Cycle (graph theory) Operating system Spacetime Library (computing)
Module (mathematics) Standard deviation Module (mathematics) Digital electronics Mapping Memory card Patch (Unix) Disintegration Computer network Device driver Cartesian coordinate system Mereology Exclusive or Arithmetic mean Kernel (computing) Film editing Software Kernel (computing) Computer hardware Software framework Spacetime Family
Point (geometry) Decision tree learning Memory card Multiplication sign Projective plane Execution unit Device driver Computer network Device driver Cartesian coordinate system Formal language Software Semiconductor memory Term (mathematics) Software framework Spacetime Software framework Spacetime
Building Implementation Statistics Group action Overhead (computing) State of matter Memory card Multiplication sign Source code Device driver Stack (abstract data type) Product (business) Data model Hypermedia Different (Kate Ryan album) Kernel (computing) Spacetime Software framework Interrupt <Informatik> Communications protocol Exception handling Structural load Projective plane Computer network Line (geometry) Device driver Cartesian coordinate system Limit (category theory) Exclusive or Process (computing) Software Network topology Order (biology) Interrupt <Informatik> Software framework Game theory Communications protocol
Overhead (computing) Memory card 1 (number) Device driver Open set Food energy 2 (number) Number Read-only memory Semiconductor memory Term (mathematics) Befehlsprozessor Single-precision floating-point format Core dump Spacetime Software testing Software framework Data structure Overhead (computing) Memory management Sound effect Core dump Computer network Open set Single-precision floating-point format Arithmetic mean Befehlsprozessor Process (computing) Software framework Figurate number Cycle (graph theory) Spacetime
Web page Intel Functional (mathematics) Code Line (geometry) Memory card Source code Device driver Black box Whiteboard Logic Cuboid Spacetime Software framework Decision tree learning Server (computing) Projective plane Plastikkarte Computer network Denial-of-service attack Line (geometry) Device driver Cartesian coordinate system Transmitter Connected space Arithmetic mean Message passing Befehlsprozessor Software Logic Personal digital assistant Computer hardware Software framework Whiteboard Family Probability density function Firmware
Server (computing) Service (economics) Computer file Structural load Memory card Strut Device driver PCI Express Process capability index Revision control Semiconductor memory Kernel (computing) Memory management Bus (computing) Spacetime Configuration space Address space Game controller Electronic mailing list Computer network Device driver Statistics Arithmetic mean Software Configuration space Reading (process) Operating system Address space
Web page Computer program Game controller Table (information) Link (knot theory) Memory card Multiplication sign Food energy 2 (number) Read-only memory Semiconductor memory Authorization Bus (computing) Descriptive statistics Injektivität Interface (computing) Web page Aliasing Counting Computer network Bit Database transaction Control flow Uniform resource locator Voting Software Quicksort Cycle (graph theory) Block (periodic table) Table (information) Active contour model Extension (kinesiology)
Polar coordinate system Memory card Direction (geometry) Correspondence (mathematics) Price index Mereology Disk read-and-write head Food energy Pointer (computer programming) Virtual reality Semiconductor memory Different (Kate Ryan album) Befehlsprozessor Buffer solution Memory management Graphics processing unit Web page PCI Express Physicalism Arithmetic mean Buffer solution Interface (computing) MiniDisc Queue (abstract data type) Spacetime Empennage Game controller Link (knot theory) Device driver Annulus (mathematics) Heat transfer Read-only memory Ring (mathematics) Directed set Data structure MiniDisc Address space Scale (map) Information Interface (computing) Expert system Heat transfer Computer network Similarity (geometry) Particle system Uniform resource locator Film editing Pointer (computer programming) Software Network topology Synchronization Family Address space
Web page Point (geometry) Memory card Computer network Frame problem Pointer (computer programming) Uniform resource locator Process (computing) Pointer (computer programming) Software Read-only memory Semiconductor memory Ring (mathematics) Memory management Integer Physical system
Point (geometry) Empennage Context awareness Service (economics) Code Memory card Multiplication sign Device driver Disk read-and-write head Mereology Stack (abstract data type) Pointer (computer programming) Virtual memory Read-only memory Semiconductor memory Internetworking Kernel (computing) Memory management Ring (mathematics) Touch typing Queue (abstract data type) Process (computing) Information security Programming language Information Forcing (mathematics) Moment (mathematics) Code Sound effect Computer network Basis <Mathematik> Diameter Uniform resource locator Process (computing) Pointer (computer programming) Film editing Software Computer hardware Interrupt <Informatik> Formal grammar Software framework Quicksort Information security Spacetime Flag
Computer program Memory card Multiplication sign View (database) Set (mathematics) Stack (abstract data type) Perspective (visual) Formal language Subset Fraction (mathematics) Protein folding Virtual memory Semiconductor memory Kernel (computing) Speichermodell Process (computing) Endliche Modelltheorie Firewall (computing) Moment (mathematics) Formal language Arithmetic mean Fraction (mathematics) Befehlsprozessor Process (computing) Software framework Website Right angle Ideal (ethics) Spacetime Expression Service (economics) Open source Line (geometry) Patch (Unix) Disintegration Datenpfad Device driver Computer Number Goodness of fit Spacetime Key (cryptography) Computer program Code Plastikkarte Computer network Device driver Computer programming Exclusive or Subset Personal digital assistant Operating system
Hypermedia System programming Median Resultant
that and
the and the home of the all right now it's my great pleasure to introduce polymer lists I was going to talk about some demystifying network cards and Paul is a PhD student at the Technical University Munich of his during all kinds of network related stuff and hopefully today he's gonna help us make that because it's a bit less of a black box so please give a warm welcome to Paul well thank you and I must
Introduction already set and PhD student and and researching performance of software package processing and forwarding system that means that spend a lot of time doing low-level optimizations and looking into what makes the system passed what makes it slow what can be done to improve it and I mostly working on my packet generator moon gender have some cost commission promotion of a lightning talk about this on Saturday and but you I have this long slot and I bought a lot of content yourself to talk really fast so sorry for the translators and I hope you can make you follow along so there's about never
cards meaning that the cuts you will have seen this is usually 10 genetic out with the dust particles and this is some
constant the cut is accused of the passport is is 20 40 100 g and now you want to spend another cut you plug it into your cell
volume MacBook or whatever and you start your that about Etruscan pictures and can be used you all know that there's a whole stack of protocols that your cat pictures to go so until it arrives at an account at the bottom and the the only thing that I care about and you know and as I don't care about TCP have no ideologies appear what I have some idea about sports as this is not my research I don't care about that I just want to look at individual packets in the highest thing I look at this may be an IP address or maybe a part of the political right to do so to identify flows using and now you might wonder is there anything even interesting you know and ask because people nowadays think that everything runs on top of
HTTP but you might be surprised that not all applications 1 on top of HTTP there's a lot of stuff there that needs to run at the lower levels and in the recent years there's a kind of moving the network infrastructure staff from specialized had the black boxes to open source boxes and examples for such software that was happening past our task speeches Pile-dwellers boxes and so on if you want to look up the relevant but but it's not functionalization but it's college and and this is a recent trend of recent years so now let's say we want to build our own fancy application on that loan everything we
want to build our firewall and volatile pick for more money financing that whatever and whatever useful on that no therefore network infrastructure and I'll use this application as a demo application for this talk as everything will be about this hypothetical quantifiable pickup public modify financing so what it does it receives packets on 1 or multiple network interfaces that dust staff of the packets figure today and the modified and then and send them all to some other part of maybe the same part of maybe which of the parts but about syllable applications to and this means the application of a it's an individual packets not a stream of TCP packets not a stream of UDP packets they have to cope this smaller packets because that's just the best case you get a lot of small packets now you want the big
application you go to the internet and you look up how to build a packet forwarding applications the Internet tells you there is the socket API IDE socket API is great and it allows you to get tickets to your programs variability application on top of the socket API at once in userspace USA soccer to socket talks to the operating system and the operating system talks to and other talk to that the cuts and everything is fine except for that it's been
because what it really looked like if you build this application there is this huge carried the gap between a user and a user space and kind space you somehow and your packets God cross that the that the heating and you might wonder why I say this is a big deal if huge you that you have to get in there and because the thing was my that having kept pictures is doing just fine on a fast connection and well it because it is serving large packets or even large chunks of size the sense at 1 to solve like can send can take your whole check did you give it to the corner a kind of the hand in everything from to uh from doing from packetizing into TCP and but what we want to but it's a applications that needs to to cope with the last case of lots of small packets coming in and then the overhead that you get here from this gap is mostly on a per-packet basis not on a Calebite basis so lots of small packets of a problem for this interface but as a problem
I'm always talking about performance because I mostly about performance so if you look at performance on you know if you forgot to to get started this but how many packets can affect over your usual attend you link that's around 15 million but 10 g that's a last the last year's news and this year we have multiple 100 g connections even through this location here so 100 you link can handle up to 150 million packets per 2nd and well how long does that give us if you have a CPU and say we have a city a our MacBook running the outer and this means we have around 200 tigers the packet if you want to handle 110 dueling was 1 CPU core OK we don't want to when do we you have of course with the course but and you have autumn which a police and fast extent G so the typical performance target that you would inform invading such an application as 5 to 10 million packets per 2nd pass if you corpus set that you started like usually target and it is just for for just to receive the packet and to send it back out their orders stuff this all many are can be used for your application so we don't want any the overhead just for receiving and sending them without doing any useful back so these these figures that
translates to to an allowance to 102 6 his past packet on acid god CPU core now how long does it take to cross that's userspace boundary on but very very very long for an individual packets so in some performance performance-measurement introducing you packet forwarding the cell wall socket you can maybe achieve achieve 200 thousand packets-per-second use the peak at it can achieve a million packets per 2nd and is the status can be tuned you can maybe get factor 2 out of date by some tuning but they're more partners that would across scaling is unnecessary heart and so on so this doesn't really seem to work so the Devondra's department so
let's get rid of the boundary by just moving application into account we rewrite of application as a kind you wouldn't use it directly and you might seem what an incredibly stupid idea to write chronicled for something that you did should you the space and while it's not that unreasonable there are lots of examples of applications to this like a certain that over by Microsoft plans as a crime and what you then it is the most common has arity less of loading to speed up and other interesting use cases open research that has a fast in inquiry character just caches stuff and thus complex processing the you spacing so it's not completely unreasonable
but it comes as a lot of drawbacks like it's very cumbersome to develop most usual to install vocal don't verdict is expected you have to follow the usual kind restrictions like you have to use C as a programming attrition maybe don't want to and your application can enter the crash to kind of which can be quite bad that's not care about the
restrictions we wanted to fix performance so the same thing as again we have 300 to 6 cycles to receive and send a packet whether that I tested the a pop like the minister to see how long does it take to receive a packet until I can do some useful work this and other which crossed over a longer profiling on so on average it takes time Tigers just to receive the packet load that's Baird but something about the slightly faster and again the uh no overall budget I think what else do need to do beside receiving and sending a packet there is some more overhead there's you need some time to uh the escape Officer data structure used in the common for all the packet fast and this is quite low toward the data structure this is going to go a bit of the treaties and and this takes another 400 seconds of the measure revert applications in crop packet-forwarding this open research as the minimum processing possible 1 open flow matches on physical talks and the processing confidence that I want to outsiders and why the overhead of the content is another something cycles so they in the end you achieve 2 million packets per 2nd and this is past and then are userspace stuff but still a kind of slow and what we want to be faster because debt and the current the hottest topic which I'm not talking about indigenous 160 Peter fix some some of these problems but comes with the restrictions I kept that from talk for 10 isn't so and so let's just talk
about nothing the and so the problem was that our application in the who want to moved application to the current status and that didn't work so convinced that move stuff from the current to user space well yes we can down ivories colored and userspace packet processing from birth they come in 2 parts 1 is a library you link your program against in user space and 1 is a kind of modules these 2 parts communicate and they set up chapter that memory and this shot that memory is used to directly communicate from your application to the driver you directly from the pickup of us that the driver dense and also and this is very fast and you might have noticed that the operating system box is not connected to anything that meet your operating system doesn't even know tonetic understand most cases this can be quite annoying
but there are quite a few such for marks the biggest examples on that map epiphany and p of q and they come in come
with restrictions like this a non-standard API EU can't between 1 from work and the other 1 from work in the kernel circuits and there's a custom kernel module require lots most of this fungus requires some small patches to drive us it's just MS to maintain and of course the exclusive access to the network because this 1 metric others died at this 1 application of talking directly to the that the cut OK and the the next thing is you lose their access to the usual kind of features that can be quite annoying and then gas often poor support for half of learning features of benefit cuts because they often found in different parts of the kind of thing no longer have reasonable access to and of course December to talk directly to another account meaning we need support for each network out individually usually just of part 1 to 2 or maybe 3 Nick families which can be quite restrictive if you don't have that specifically that this restricted but you can be
doing even more radical approach because they have all these problems this and currently tendencies and so on well it turns out that can get that of the con entirely and move everything into 1 of application this means to take out driver put it in the application that either directly accesses the network can't entities that sets up the main memory in the user space because the network doesn't care that covers the packets from as we just have to set up the point is in the right way and you candidates from the fact is that everything runs and application the removed the driver from the Cardinal kind of running and this is a super fast and you can also use this to implement tracing obscure hot futurists and that the carts that are not supported by this time that are not now not the 1st 1 to do this there are 2
big frameworks that uh that do not 1 is the PDK which is quite quite big a unit Fundación project and it has basically support but all in also meaning everyone was a high-speed nuclides a driver that works for the decays and the 2nd term such framework is that which I think is quite interesting because it has invited diverse in the but is entirely written in Luanda scripting language so this is kind of nice to see and I benefit in a scripting language I OK what problems
that the source of the problems that you know game 1 1 problem is you still have to non-standard API we still need exclusive access to the network out from 1 application because the driver lines in that thing so as some other tricks to solve that but mainly it's 1 application that is running the then he defended need explicit support for all you know what is out there it's not that big a product to decay because it's such a big project that the tree everyone has a driver for it to be decaying Nick and gas limited support for interrupts but turns out interrupt and not something that is useful when you're building something that process is more than a few hundred thousand packets per 2nd because the overhead of the interrupt is just too large it's just media power-saving thing if you ever run to low load but I don't care about the lot scenario and power saving so for me it's Polly monovalent orders of you and you of course was on access to the you can't teach us and what time to ask what
has declined ever done for us and later canoe has lots of major drivers but what has the kind of fast except for all these nice major diverse and they're very nice protocol implementations that actually there are tactical TCP status areprovided achieve action you guys scenarios unlike already signed a TCP states that the of the some things or don't support if he just want so there is quite some nice stuff that what has to kind of done us except for his major diversities these nice protocol stack implementations OK quite a few things and and we also and amounts and and 1 thing to notice the mostly don't care about these features mandating our picket for about modify all definable thing because these are mostly high-level features most but it's still a lot of features that we are losing like building a TCP stack on top of these frameworks is kind of an unsolved problem there are statistics but they all suck in different ways on OK
we lost features but we didn't care what the features in the 1st place the wanted performance back to our performance figure we want 300 to 600 cycles per packet that we have available how long does it take
for example the DTK to receive and send the packets that is about a hundred cycles to get a packet to the host text funds like like receiving a packet processing it and among processing about uh getting into the application and that to the driver to send it out 100 seconds and the other from and activity data 70 the decays slightly faster than other ones because it's full of magic is this year and a the X intrinsics and the driver is kind of like magic but it's fast now in a kind of real-world scenario of research of mentioned as an example earlier that was 2 million packets of the kind and open research can be compiled as an optional decay began to you set semantic sex and combining them things against the decay and use this at an at a constant appearance compute he user space and now it's a factor of around 6 or 7 faster and again as she certainly effect is the 2nd was the same on the same processing step on a single CPU core so great that has to be post performance gains come from where 2 things may it's as compared to the continent compared to and sockets what people often say is that this is so you copy which is a stupid term because the kind doesn't copy packets yeah so it's not copying packets of Oslo about other things many expecting meaning it's very efficient to process a relatively large number of packets at once and that really helps and reduced memory overhead DSK about data structures really big and if you cut test on you save a lot of cyclists these energy decay figures because to and x amount of memory that somatoform has to be memory management and this is already included in the 52nd OK now we know that these frameworks
exist and everything and the next obvious question is can we build our own can but on driver while but why it and well 1st for fun obviously and then to understand how that that stuff works for the Stanislaus for use packet processing frameworks marks and I've seen in the American academia have seen a lot of people using this from but it's nice because they fast indeed and added a few things that just not possible before and but people often treaties as magic black boxes you put in your pocket and then that magic is faster and sometimes I don't blame them if you look at the PDK source code there are more than 20 thousand lines of code for each driver and just for example looking at the receive and transmit functions of DIT driving that's is 1 5 is around 3 thousand lines of code and they do a lot of magic just to receive and send packets no 1 wants to read through that Saudi fashion as how hard can it be to write your own driver and it turns out it's quite easy this was like 0 we can't project I have written the driver colored exceed it's less than a thousand lines of C code that is to fully driver flood at 10 gene network cards and differs from there to get some applications and a simple example applications that like less than 2 days to to write it completely then 2 more days to and fix performances and soul I've
willingness on the uh in tonight's TV from this is a family of network constant you are that you know of if you ever had a some has this because almost all us that have 10 g connections have these into carts and they are also embedded in some tea on CPU was they are also on board ships on the main what's and dead a nice thing about them is they world they have a publicly available data sheet meaning into publishes this 1 thousand pages of pdf that describes everything you ever wanted to know when writing for this and the next thing is that there's almost no logic hidden behind that box magic them up many new 1 at the accounts especially men extend your once and they hide a lot of functionality behind a from that the driver mostly just exchanges messages with a film that is kind of boring and thus this family if this is not the case which I think it's very nice so how can the beta driver for this in for a very
simple steps 1 3 readings that I've added score and you know it because you don't want it to interfere with our staff and OK easy so far 2nd secondly memory-mapped the PCI all memory-mapped I O address space this allows us to access the PCI Express device monastery we figure out the physical addresses of all the main uh of our pulsar spin this region and then you to use them for the Mayans that flows slightly more complicated than the 1st 2 steps is we what the driver now the 1st thing to do we figure out and real our network of let's say we have a server and detecting unethical then it gets assigned a and s and the PCI bus we can figure that out of the list BCI this is the accuracy needed in a slightly different version was therefore qualified ID and then we can remove the kind either by telling the current you don't drive driver to we moved that specific idea now the operating system doesn't know that this is ethical doesn't know anything just that some PCI devices mobile then we what obligations
as a wouldn't and see it and you just open this magic financial services and this magic file just and there is no magic just the normal and that 40 get back is a kind of special region this is the memory-mapped I O memory region of the PCI address configuration space and this is where all the registers are available meaning it the show you what that means in just a 2nd if you need to go through the
data sheet there's hundreds of pages of tables like this and these tables tell us the registers that exist on the network out the offset they have and a link to a more detailed descriptions and in coat that looks like this
for example the energy contour register is at this offset and dandy under the control of authority sort associated to bits there are some bit offset and at 7 is called any you blink and if he said that that and that registered then 1 of the entities and we'll start to blink and you can just do that by all major memory region because all ideas reads and writes that the due to that memory reaching go directly over the PCI Express bus to denote the count account that's whatever and it wants to do with them doesn't have to be a register basically it's just a command to send to the to rain at the constant it's just a nice and convenient interface to let that into memory this is a very common technique that you will also find then you do some Michael poses a programming or something and tho and 1 thing to note is that since this is not memory that also means can't be cashed personal location between each of these excesses vote PCI Express transaction and it will take quite some time the of lots of lots of psychosis not inject hundreds of cycles or 100 seconds which is a lot for me I
so how do we know packets we now can only have access to deserters thus the candidate sheet and tree can white driver but the some some by 2 get packets so of course this would be possible to write and that account that does that the oddest memory-mapped I O region and but it's kind of annoying he the 2nd way I PCI Express device communicates with your also MacBook Islam Dean a direct memory access and energy transfer unlike the memory-mapped I O stuff is initiated by adding at the party and this means that are content just like to arbitrary it addresses this in in main memory and this there that the kind of us so called doing such a interfaces and like for receiving packets for sending packets in them were build of these interfaces because this is how you do which is plus gaining if you want to transmit from forward because you are located would accuse each corresponds to 1 q and the network just not just Cucinotta onto the name on the receiving Jennifer cut can either hash on the incoming incoming packet like actual particle has by content experts at it as this is not specific to NetWare part most PCI Express devices that like GPU with have to use a command cues and so on uh and the in the PCI Express this itself to use and so let's look at 2 is an example
of the ice to the family uh but you will find that most links lock in a very similar way that sometimes more differences but mainly and these things are just circular buffers fit the so called the may descriptors AG may descriptor is a 16 byte structure and that is a bite of a physical pointer pointing to some locations we are more stuff is and a byte of matter that like I fetch the stuff for this packet needs to be Alantec of loading or this packet had been attacked at a move information I get the start India and but I need to do is be 28 virtual addresses from our space to physical addresses because PCs customers of course physical and this and you can use that as in Proc of S in the park suspension of we can do that and then the next thing is we now have this this to you all of the data structures in memory and disk to itself is also exists while and is controllers like attracts like you expect circular ring to rot it has a head and the tail and the head and tail pointers available biologist as a memory-mapped I O space meaning enough imagine looks kind of
like this we have this district in our physical memory to the left full of pointers and then we have summarized these um packets in some and it's 1 thing to note that allocating this kind of memory data of small trick you have to do because they're descriptor and needs to be in contiguous memory in the physical memory and if you use if you just assume everything that's contagious in your process is also in hot physically no it isn't and if you have about in and identified to some there's then your 5 system dies as I figured out which was not a good thing so and the what I'm doing is I'm using a huge pages 2 megabyte pages that's enough of integers memory and it's got t to not have really gets tho and
now we the packets we need to set up this frame so be tired the network outlier memory-mapped I all the location and the size of doing that and the fill up doing this point us to offer she allocated memory that are just empty and now that these
set the head and tail pointer to tell you hadn't happened at the 2 2 is for you because the queues at the moment full it's full of packets suspect is a destructive force anything and now what it does touches 1 of the main descriptors and as soon as it receives a packet at wants to pick acquired you made to the location specified in the register and increments the high point of the queue and it also sets status like in the deal and a descriptor once it's done Whiting the packet to memory and this step is important because reading back the point why am 0 would be way too slow so instead the check the status that because is that effect optimized by the by the cash and is already in care so they can check that really fast next step is to periodically point is that like this is the point the interrupts might come in useful and there's some misconception people sometimes believe that if you see a packet then you get an interrupted interrupt somehow magically contains the picket nor doesn't interrupt just context information that there is a new packet after the interrupt you would have to ploidy status like any basis so we and now have to take it the process depended on to whatever then receptor the manuscript of the can recited or technical indicating you want and uh receptive ready for on the status register and the I just at a point 0 register to tighten it for Carter T. must in the don't have to do that for any time because they don't have to keep to q under % utilized the can only update the a point and every 100 packets or so and then the sort of performance problems what now we have a diameter can receive
packets next steps was transferred packets it basically works the same I won't bore you with the details years of Part I of course a lot of boring boring initialization code and it's just following the data down like that the services attaches death and I just coded the come from the data sheet and it looks so it's surprise then now you know how to write a grammar like this and a few ideas of what what I want to do on what maybe you want to do that I like this 1 of course want to look at performance to look at what makes this faster than the current and then I want some obscure had profiting features in the past i've looked at I P 6 applauding his quite interesting because the internet the cuts has had the support of IP stack of learning but none of the intervals has it and it seems to work just fine so but showed stronger than the security is interesting there is on the this obvious some security implications of having your driving use this process and and I'm wondering about how we can use the I O and will because it turns out once you have set up the memory mapping we can drop all the privileges they don't eat them and if the set up the O animal before to restrict the network out to certain things that we could have a safe driver in user space that can't do anything wrong because there's no privileges and then at cost has no access because also the ion will and their performance implications of their movements on of course support to support that overture next and other programming languages and for the driver would also be interesting to just Nancy because he has the lowest common
denominator of programming is to compute gigantic BSD license on the top and the main thing to take a series that either so you simply don't be afraid of drivers don't be afraid of writing about you can do that in any language and you don't even need to a conical just this stuff to a process where the driver and do whatever you want OK thanks for your attention thank you have very few minutes left for questions so if you have a question in the room VII is go quickly to all of the folds in the room of those losing signaling is already have a question rarely you do models is the year in the in anybody learning of the new folds and the in the alright so low sixties as you're not actually using any of the Linux drivers is there an advantage using minutes here could use any open-source operating system on my number what other operating systems but they're the only thing I'm using of view here is the ability to easily met that at for some other operating systems you might need need a smaller step like that that's the stuff in there you can check out the PDK freebies the port which has the smallest of time at it just happens to memory mapping the there is the number 2 right of slightly disconnected to the top predators they procure your opinion on smart makes where they're considering putting CPU is on the make itself so you could imagine running open the switch on the C on the and then I have some smart makes somewhere and some that and have also done work the that FPGA I think that's that's very interesting but it's a it's a complicated trade off because he's next come with new restrictions and they're not magically super-fast so it's it's interesting from a performance perspective to see when it's less of a lot of that in what I personally think it's probably better to do everything was lost in Paul thanks all right before we take the next question just for the people who don't was the growth of a Q and a if you really do have to leave the room early please do so quietly we can continue the Q and the sixties so how does the performance of the users space service compared to the next the solution on it slightly faster but 1 important thing about the PS um if the if you
look at this this is the new work and there is still a few important restrictions like you can write your users thing in whatever programming which you want like a symmetric set has 5 antennas you of the 60 PUO restricted to the EPP F meaning usually a restricted subset of seeing that as the bike but I've ever been decided by the viable everyone and meaning unite and have rich restrictions that you maybe don't want and also HDP requires patch lineup of textiles but surprisingly memory motivated by the site the moment the the k-support somewhat like the big steeply ecologists that we have and are still lacking many features like sending back to a different 1 very very good use case for it's fire-warning publications on the same host because you can pass on a packet to get the peace stack and this is a very good use case for HDP but of all I think that that both things are very very different and it's the key this slightly slower but that's not so unsaturated would be relevant so it must want aggressive alright so unfortunately we're out of time so that was the last question things again Paul the genes
of the results and the the think the it cut


  523 ms - page object


AV-Portal 3.21.3 (19e43a18c8aa08bcbdf3e35b975c18acb737c630)