[P4] jövő heti megbeszélés

Dániel Horpácsi daniel-h at elte.hu
Wed May 18 16:53:20 CEST 2016


== Architecture

  - (ábra Máté levele szerint)
  - switch software is result of linking two carefully separated 
components of C source code
    - hw-dependent part - the "HAL"
      - static library, written by a hw-expert
    - the rest (i.e. hw-independent) - the "Core"
      - generated by a compiler, based on the HLIR
  - well-defined interface between the components (mostly with C 
function prototypes)
  - separation PRO
    - much simpler compiler
    - modularity = better maintainability
    - exchangeable HAL = retargetable switch (without rewriting a single 
line of code)
    - HAL is not affected by changes in the P4 program
    separation CON
    - performance
      - hw-dependent parts are not amenable to protocol-dependent 
optimization
      - communication between the components takes some time (C function 
calls)

== Core

  /DATA/
  - defines stateful memory configuration
    - data structures declared in the HAL but initialized in the core
  - the same idea is used for sharing information on header types
    - we could use macros instead, but arrays are more readable and they 
are optimized away by the C compiler (via constant propagation)
  /ALGORITHMS/
  - packet parsing
    - determines the positions and types of headers in the packet
    - does not do "real" parsing or field extraction (we do it lazy)
    - "lightweight parsed representation"
  - fields are extracted when needed
    - and field modifications also happen in-place
  - controls and actions translated to C functions
  - key calculation for lookup tables

== HAL

  - implementation of
    - state (tables, counters, meters etc.) and related operations 
(table insert/delete/lookup, counter increment etc.)
    - packet RX and TX
    - primitive actions (header-related + digests)
    - helpers for primitive actions (field-related)
      - implemented as macros for performance reasons

== DPDK HAL

  - reuses the current LPM and HASH table implementations
  - reuses atomic integers for counters and meters
  - NUMA support
    - 2 instances of each table on each socket - lock-free solution
      - active/passive instances
      - lcore always turns to its socket's instance
    - counter instances for each lcore on the corresponding socket
      - in cpu cache we trust!
  - status: we support most constructs of P4 1.0
    - missing: variable length fields, parser exceptions, actions profiles

== Lessons learned

  - it's not that easy to find the boundary of the HAL
    - compared to the first verion, our HAL has become thinner
    - P4 primitive actions are not fully implemented in the HAL, in most 
cases only small hw-dependent helper functions are defined
    - PRO: the hand-written code is smaller
  - sometimes gcc does not want to optimize the obvious, so we needed to 
inspect the assembly

On 2016-05-18 14:11, Tejfel Máté wrote:
> Szia Sanyi!
>
>   Jobbulást a családnak.
>
>   Pár gondolat, ami eszünkbe jutott:
>
>  *   Who are we?
>
>        Ide jöhetne egy akár animált térkép arról, hogy hol is van 
> Budapest...
>
>        Gondolkodtunk róla, de leszavaztuk, hogy a honlapos 
> "csoportkép" felkerüljön (ez közös ellenvetést váltott ki, mivel 
> messze nem egységesek a képek...)
>
>
> * Multitarget compiler ...
>
>     Ide esetleg be lehetne animálni a sigcomm-ra küldött leíráson lévő 
> ábra egy finomított változatát, ahol (legalább "..." szinten) látszik, 
> hogy több HAL-ban gondolkodunk. Esetleg hozzá lehetne merge-elni pár 
> dolgot a repo/slides/ mappában a 2015_12_16-os slide-showk 6. slide-járól
>
>
> A következő 3 slide-ról Dani ígért egy kezdeményt, amit majd 
> alakíthatunk, de pár dolog ami itt felmerült:
>
> * Core Compiler
>
>    technikai részleteket (pl. template alapú fordítás) szerintünk nem 
> érdemes a slide-ra rakni
>
>   Ami rákerülhetne:
>
>   - a P4-es HLIR-t használjuk (ez akár még az előző ábrára is 
> rákerülhetne...)
>   - C-re fordítunk
>   - fejlécek nincsenek parse-olva, mezőket on-the-fly csomagoljuk ki/be
>
>
> * HAL
>
>    - hol a határvonal
>         csomag kezelés, stateful memories (táblák, counterek) + 
> műveleteik,
>          header stack pop, push,
>          fejléc hozzáadás, törlés (általánosan)
>          primitívek-hez szükséges hw-dep "primitívek"
>
>
> * HAL for DPDK
>
>    - Numa support (Dani: pár részlet, mi is biztosítja, ha nem is a 
> slide-ra, de elmondható)
>    - mit támogatunk: lista (Sanyi majd eldönti ezt megmutatja-e :) )
>
>
>  Folyt. köv...
>
>         M.
>
>
> 2016-05-18 12:12 keltezéssel, Sándor Laki írta:
>>
>> Sziasztok!
>>
>> Sajnos, nem valószínű, hogy be tudok menni. Feleségem belázasodott 
>> tegnap este, a gyereknek meg taknya-nyála egybefolyik és folyamatosan 
>> orrszívózni kell.
>>
>> Azonban ma le kell adnom a ppt-t, amihez mindenféle inputot 
>> megköszönnék. Csatoltam a vázát a tervezett prezentációnak!
>>
>> Nyugodtan dobáljátok bele a gondolataitokat és esetleges teljes 
>> részeket és küldjétek át. Várhatóan csak éjjel fogom elküldeni. A 
>> méréseknél a skálázódáshoz ha tudtok bármit küldeni, ami jobb a 
>> semminél az mindenképp jó lenne. Compilernél érdekességek, amire 
>> figyelni kellett (lessons learnt jelleggel), a dpdklib-nél mi hogyan 
>> lett megvalósítva, hol tartunk most.
>>
>> Üdv.
>>
>> Sanyi
>>
>> On 2016.05.18. 10:31, Tejfel Máté wrote:
>>> Sziasztok!
>>>
>>>    Úgy tűnik a 2.702 üres lesz, gyertek majd oda 1-re...
>>>
>>>                   M.
>>>
>>> 2016-05-17 08:55 keltezéssel, Tejfel Máté írta:
>>>> Sziasztok!
>>>>
>>>>   Akkor összegezve maradjon a szerda 13:00. Majd keresünk egy üres 
>>>> termet :)
>>>>
>>>>                    M.
>>>>
>>>> 2016-05-15 23:38 keltezéssel, Péter Vörös írta:
>>>>> Sziasztok!
>>>>>
>>>>> Nekem is jó.
>>>>>
>>>>> Peti
>>>>>
>>>>> Dániel Horpácsi <daniel-h at elte.hu> írta (2016. május 15. 23:20):
>>>>>> Sziasztok!
>>>>>>
>>>>>> Nekem is ok a 13-14.
>>>>>>
>>>>>> Dani
>>>>>>
>>>>>>
>>>>>> On 2016-05-14 22:45, Sándor Laki wrote:
>>>>>>
>>>>>> Nekem szerda 13-14 között jó. 14-re már az Ericsson-ban kell lennem.
>>>>>>
>>>>>> Amúgy nekem 12:30-tól is jó.
>>>>>>
>>>>>> Üdv.
>>>>>>
>>>>>> Sanyi
>>>>>>
>>>>>>
>>>>>> On 2016.05.13. 23:57, Leskó Dániel wrote:
>>>>>>
>>>>>> Akkor szerdán lesz a meeting?
>>>>>>
>>>>>> Dani
>>>>>>
>>>>>> 2016.05.13. 15:22 keltezéssel, Brunner Márton írta:
>>>>>>
>>>>>> Sziasztok,
>>>>>>
>>>>>> Nekem jó a szerda 13:00 is, illetve aznap bármi későbbi időpont 
>>>>>> is megfelel.
>>>>>>
>>>>>> Marci
>>>>>>
>>>>>>
>>>>>> Brunner Márton
>>>>>> brmarci at caesar.elte.hu
>>>>>> brmarci7 at gmail.com
>>>>>>
>>>>>> _______________________________________________
>>>>>> P4 mailing list
>>>>>> P4 at plc.inf.elte.hu
>>>>>> https://plc.inf.elte.hu/mailman/listinfo/p4
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> P4 mailing list
>>>>>> P4 at plc.inf.elte.hu
>>>>>> https://plc.inf.elte.hu/mailman/listinfo/p4
>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Sándor Laki, PhD
>>>>>> Assistant professor
>>>>>> Department of Information Systems
>>>>>> Eötvös Loránd University
>>>>>> Pázmány Péter stny. 1/C
>>>>>> H-1117, Budapest, Hungary
>>>>>> Room 2.506
>>>>>> Web: http://lakis.web.elte.hu
>>>>>> Phone: +36 1 372 2869 / 8477
>>>>>> Cell: +36 70 374 2646
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> P4 mailing list
>>>>>> P4 at plc.inf.elte.hu
>>>>>> https://plc.inf.elte.hu/mailman/listinfo/p4
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> P4 mailing list
>>>>>> P4 at plc.inf.elte.hu
>>>>>> https://plc.inf.elte.hu/mailman/listinfo/p4
>>>>>>
>>>>> _______________________________________________
>>>>> P4 mailing list
>>>>> P4 at plc.inf.elte.hu
>>>>> https://plc.inf.elte.hu/mailman/listinfo/p4
>>>>
>>>
>>> _______________________________________________
>>> P4 mailing list
>>> P4 at plc.inf.elte.hu
>>> https://plc.inf.elte.hu/mailman/listinfo/p4
>>
>> -- 
>> Sándor Laki, PhD
>> Assistant professor
>> Department of Information Systems
>> Eötvös Loránd University
>> Pázmány Péter stny. 1/C
>> H-1117, Budapest, Hungary
>> Room 2.506
>> Web:http://lakis.web.elte.hu
>> Phone: +36 1 372 2869 / 8477
>> Cell: +36 70 374 2646
>>
>>
>> _______________________________________________
>> P4 mailing list
>> P4 at plc.inf.elte.hu
>> https://plc.inf.elte.hu/mailman/listinfo/p4
>
>
>
> _______________________________________________
> P4 mailing list
> P4 at plc.inf.elte.hu
> https://plc.inf.elte.hu/mailman/listinfo/p4

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://plc.inf.elte.hu/pipermail/p4/attachments/20160518/02c5285d/attachment-0001.html>


More information about the P4 mailing list