<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Sziasztok,</p>
<p>Bocs, hogy ilyen sokára válaszoltam, de egy kicsit nekem is utána
kellett néznem a dolgoknak.</p>
<p>1. Pontosan mire gondolsz field-mask alatt?</p>
<ul>
<li>Ha a modify_field primitive action opcionális harmadik
paraméterére, akkor ott big-endian bájt sorrendet feltételezünk.
(A modify_field primitive action továbbra is hibás, ugyanis a
nem maszkolt biteket felülírjuk 0-val.)</li>
<li>Ha a compileren belüli kódban szereplő mask-okról beszélünk,
akkor meg valószínűleg az arch-nak megfelelőt. (Esélyes, hogy
jelenleg ez is hibás, és az autogenerált field maszkok mindig
little-endian bájt sorrenddel jönnek létre.)</li>
</ul>
Ezek közül talán a második problémát egy fokkal könnyebb orvosolni,
az elsővel meg több a szívás. Nyilván előbb utóbb mind a kettőt meg
kell oldani.<br>
<p>2. Teljesen igazatok van. A reset_headers valóban lenullázza a
frissen kitöltött ingress_port-ot (és az összes többi metadatát
is). A reset_headers-t még az előtt meg kéne hívni, hogy bármilyen
metadata fieldet módosítanánk. Én úgy látom, hogy ezt úgy tudjuk
legegyszerűbben kijavítani, ha a main_loop-okba kerül a
reset_headers hívás a handle_packet-ből.<br>
</p>
<p>Marci<br>
</p>
<div class="moz-cite-prefix"><br>
On 2017-04-07 12:57, Sándor Laki wrote:<br>
</div>
<blockquote cite="mid:4bf69c26-4fdf-c838-3cce-ecc4b42782cc@elte.hu"
type="cite">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<p>Sziasztok, <br>
</p>
<p>Két gyors kérdés:<br>
</p>
<p>1. field-maskokat milyen bájtsorrendűnek feltételezzük
little-endian vagy big-endian vagy arch függő???<br>
</p>
2. dataplane.c.py: a reset_headers kinullázza a ingress_port
metadata-t is, ha jól látjuk.<br>
<table class="code" style="border-width: 0px 1px 1px;
border-right-style: solid; border-bottom-style: solid;
border-left-style: solid; border-right-color: rgb(221, 221,
221); border-bottom-color: rgb(221, 221, 221);
border-left-color: rgb(221, 221, 221); border-image: initial;
border-spacing: 0px; border-top-style: initial;
border-top-color: initial; border-collapse: collapse;
empty-cells: show; font-size: 12px; line-height: 15.6px;
padding: 0px; margin: 0px auto; table-layout: fixed; width:
1266px; color: rgb(0, 0, 0); font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;
font-style: normal; font-variant-ligatures: normal;
font-variant-caps: normal; font-weight: normal; letter-spacing:
normal; orphans: 2; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<tbody>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">void
handle_packet(packet_descriptor_t* pd, lookup_table_t**
tables)</span></td>
</tr>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<th id="L310" style="font-style: normal; font-variant:
normal; font-weight: normal; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Verdana, Arial, "Bitstream Vera Sans",
Helvetica, sans-serif; border-right: 1px solid rgb(215,
215, 215); border-bottom: 1px solid rgb(153, 153, 136);
background: rgb(238, 238, 221); color: rgb(136, 136, 102);
padding: 0px 0.5em; text-align: right; vertical-align:
top;"><a moz-do-not-send="true"
href="https://plc.inf.elte.hu/p4/trac/browser/trunk/src/hardware_indep/dataplane.c.py#L310"
style="text-decoration: none; color: rgb(136, 136, 102);
border: none;">310</a></th>
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">#[
{</span></td>
</tr>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<th id="L311" style="font-style: normal; font-variant:
normal; font-weight: normal; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Verdana, Arial, "Bitstream Vera Sans",
Helvetica, sans-serif; border-right: 1px solid rgb(215,
215, 215); border-bottom: 1px solid rgb(153, 153, 136);
background: rgb(238, 238, 221); color: rgb(136, 136, 102);
padding: 0px 0.5em; text-align: right; vertical-align:
top;"><a moz-do-not-send="true"
href="https://plc.inf.elte.hu/p4/trac/browser/trunk/src/hardware_indep/dataplane.c.py#L311"
style="text-decoration: none; color: rgb(136, 136, 102);
border: none;">311</a></th>
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">#[
int value32;</span></td>
</tr>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<th id="L312" style="font-style: normal; font-variant:
normal; font-weight: normal; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Verdana, Arial, "Bitstream Vera Sans",
Helvetica, sans-serif; border-right: 1px solid rgb(215,
215, 215); border-bottom: 1px solid rgb(153, 153, 136);
background: rgb(238, 238, 221); color: rgb(136, 136, 102);
padding: 0px 0.5em; text-align: right; vertical-align:
top;"><a moz-do-not-send="true"
href="https://plc.inf.elte.hu/p4/trac/browser/trunk/src/hardware_indep/dataplane.c.py#L312"
style="text-decoration: none; color: rgb(136, 136, 102);
border: none;">312</a></th>
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">#[
EXTRACT_INT32_BITS(pd,
field_instance_standard_metadata_ingress_port, value32)</span></td>
</tr>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<th id="L313" style="font-style: normal; font-variant:
normal; font-weight: normal; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Verdana, Arial, "Bitstream Vera Sans",
Helvetica, sans-serif; border-right: 1px solid rgb(215,
215, 215); border-bottom: 1px solid rgb(153, 153, 136);
background: rgb(238, 238, 221); color: rgb(136, 136, 102);
padding: 0px 0.5em; text-align: right; vertical-align:
top;"><a moz-do-not-send="true"
href="https://plc.inf.elte.hu/p4/trac/browser/trunk/src/hardware_indep/dataplane.c.py#L313"
style="text-decoration: none; color: rgb(136, 136, 102);
border: none;">313</a></th>
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">#[
debug("### HANDLING PACKET ARRIVING AT PORT %" PRIu32
"...\n", value32);</span></td>
</tr>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<th id="L314" style="font-style: normal; font-variant:
normal; font-weight: normal; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Verdana, Arial, "Bitstream Vera Sans",
Helvetica, sans-serif; border-right: 1px solid rgb(215,
215, 215); border-bottom: 1px solid rgb(153, 153, 136);
background: rgb(238, 238, 221); color: rgb(136, 136, 102);
padding: 0px 0.5em; text-align: right; vertical-align:
top;"><a moz-do-not-send="true"
href="https://plc.inf.elte.hu/p4/trac/browser/trunk/src/hardware_indep/dataplane.c.py#L314"
style="text-decoration: none; color: rgb(136, 136, 102);
border: none;">314</a></th>
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">#[
reset_headers(pd);</span></td>
</tr>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<th id="L315" style="font-style: normal; font-variant:
normal; font-weight: normal; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Verdana, Arial, "Bitstream Vera Sans",
Helvetica, sans-serif; border-right: 1px solid rgb(215,
215, 215); border-bottom: 1px solid rgb(153, 153, 136);
background: rgb(238, 238, 221); color: rgb(136, 136, 102);
padding: 0px 0.5em; text-align: right; vertical-align:
top;"><a moz-do-not-send="true"
href="https://plc.inf.elte.hu/p4/trac/browser/trunk/src/hardware_indep/dataplane.c.py#L315"
style="text-decoration: none; color: rgb(136, 136, 102);
border: none;">315</a></th>
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">#[
parse_packet(pd, tables);</span></td>
</tr>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<th id="L316" style="font-style: normal; font-variant:
normal; font-weight: normal; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Verdana, Arial, "Bitstream Vera Sans",
Helvetica, sans-serif; border-right: 1px solid rgb(215,
215, 215); border-bottom: 1px solid rgb(153, 153, 136);
background: rgb(238, 238, 221); color: rgb(136, 136, 102);
padding: 0px 0.5em; text-align: right; vertical-align:
top;"><a moz-do-not-send="true"
href="https://plc.inf.elte.hu/p4/trac/browser/trunk/src/hardware_indep/dataplane.c.py#L316"
style="text-decoration: none; color: rgb(136, 136, 102);
border: none;">316</a></th>
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">#[
update_packet(pd);</span></td>
</tr>
<tr style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size: 13px;
line-height: normal; font-family: Verdana, Arial,
"Bitstream Vera Sans", Helvetica, sans-serif;">
<th id="L317" style="font-style: normal; font-variant:
normal; font-weight: normal; font-stretch: normal;
font-size: 11px; line-height: normal; font-family:
Verdana, Arial, "Bitstream Vera Sans",
Helvetica, sans-serif; border-right: 1px solid rgb(215,
215, 215); border-bottom: 1px solid rgb(153, 153, 136);
background: rgb(238, 238, 221); color: rgb(136, 136, 102);
padding: 0px 0.5em; text-align: right; vertical-align:
top;"><a moz-do-not-send="true"
href="https://plc.inf.elte.hu/p4/trac/browser/trunk/src/hardware_indep/dataplane.c.py#L317"
style="text-decoration: none; color: rgb(136, 136, 102);
border: none;">317</a></th>
<td style="font-style: normal; font-variant: normal;
font-weight: normal; font-stretch: normal; font-size:
11px; line-height: normal; font-family: monospace;
overflow: hidden; padding: 1px 2px; vertical-align: top;
background: rgb(255, 255, 255);"><span class="c"
style="color: rgb(153, 153, 136); font-style: italic;">#[
}</span></td>
</tr>
</tbody>
</table>
<pre class="moz-signature" cols="72">Üdv.
Sanyi
--
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: <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://lakis.web.elte.hu">http://lakis.web.elte.hu</a>
Phone: +36 1 372 2869 / 8477
Cell: +36 70 374 2646</pre>
<br>
<table style="border-top: 1px solid #D3D4DE;">
<tbody>
<tr>
<td style="width: 55px; padding-top: 18px;"><a
moz-do-not-send="true"
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank"><img moz-do-not-send="true"
src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif"
style="width: 46px; height: 29px;" height="29"
width="46"></a></td>
<td style="width: 470px; padding-top: 17px; color: #41424e;
font-size: 13px; font-family: Arial, Helvetica,
sans-serif; line-height: 18px;">Mentes a vírusoktól. <a
moz-do-not-send="true"
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient"
target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</tbody>
</table>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
P4 mailing list
<a class="moz-txt-link-abbreviated" href="mailto:P4@plc.inf.elte.hu">P4@plc.inf.elte.hu</a>
<a class="moz-txt-link-freetext" href="https://plc.inf.elte.hu/mailman/listinfo/p4">https://plc.inf.elte.hu/mailman/listinfo/p4</a>
</pre>
</blockquote>
<br>
</body>
</html>