[ovs-dev] Business Offer

2020-12-08 Thread Roland Campbell
Hello Dear,
 
I bring you greetings from the USA. I am sorry to have encroached into your 
privacy in this manner. Let

me introduce myself to you, My name is Mr Roland Campbell. I currently work as 
an Independent Non-

Executive Director at Equity Bank New York Plc here in the United States. I 
will immediately proceed

with the details of the abandoned sum of $12,000,000 (US Dollar) to you because 
you share the same last

name with my late client who deposited the money in this bank.  I would 
respectfully request that you

keep the contents of this mail confidential and also respect the integrity of 
the information that you

are coming across as a result of this email. I contacted you privately and as 
such no one is aware of

this communication thus the reason why I had us communicate strictly via our 
private email addresses. I

was the personal accountant to one late Mr Carlos and foreign contractor with 
American National

Offshore Oil Corporation (ANOOC) who has an investment account with my bank. 
Unfortunately, Mr Carlos

died along with his wife in France of Corona Virus while on sabbatical leave in 
early March 2020. May

their souls rest in peace, Amen. He died without leaving a Will or any 
traceable next of kin. Several

efforts were made to find his extended family through his embassy without 
success. I received a notice

last week to provide the next of kin of my late client been his personal 
accountant or the account risk

been transferred to the government in 14 days time. I don't just want such 
money forfeited to the

government at all. I am contacting you to assist me in repatriating the funds 
left behind by my late

client because you both bear the same surname. This claim will be executed 
without breaching any USA

law and success is guaranteed if we co-operate on this. The bank will release 
the money to you at my

recommendation of you as the next of kin.

I am a religious Man and I cannot lie, I expect the same from you, The amount 
involved is $12,000,000

(Twelve Million US Dollars). Now, I am prepared to give the necessary details 
to you as the closest

surviving relation of our deceased customer (Mr Carlos).I am also proposing 
that after a successful

execution of the business, the funds will be shared at a 50/50 ratio. You will 
receive 50% and I will

be entitled to 50% as the business initiator. You know that I must have done my 
home work already

before contacting you. Although the project is capital intensive, I know I will 
be able to pull it

through following proper banking and legal channels with your assistance at 
your end. I will tidy up

the legal aspect with the assistance of a lawyer who will prepare all the 
documents that will be needed

to transfer the money to your country. Once more, I ask that if you find no 
interest in this project

that you should discard this mail and forget I ever contacted you, I ask that 
you do not be vindictive

and destructive; do not destroy my career and we know that Opportunities like 
this only comes once in a

lifetime. I am a responsible career person and this is an opportunity for you 
to give your family the

best in life. I would want you to think about this and let me know your 
decision. If you give me a

positive response, I will give you the relevant information for the successful 
transfer of these funds

and we both enjoy it in peace.
 
I will give you all the necessary information about this deal when I get your 
response. I anticipate

your cooperation. Treat this proposal with utmost confidentially and do not 
take undue advantage of the

trust I have bestowed in you now. My position as an Independent Non-Executive 
Director, guarantees the

successful execution of this transaction. If you find yourself able to work 
with me, I urge you to

write to my private email address: rolandcampbel...@gmail.com
 
Yours faithfully,
 
Mr Roland Campbell.

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] Reclutamiento 4.0 y Employer Branding.

2020-12-08 Thread Captar y retener talentos
Buenas tardes
Quise aprovechar la oportunidad de hacerte una invitación para tomar nuestro 
curso:
 
Nombre: Reclutamiento 4.0 y Employer Branding para captar y retener talentos
Horario: 4 Hrs.
¿Cuándo?: 16 de enero
Formato: En línea con interacción en vivo.
Lugar: En Vivo desde su computadora
Instructor: Lyz Escalante

Nuestro curso te presentará una guía del panorama actual del reclutamiento y 
las herramientas digitales para
reclutar y contratar así como de las bases del headhunting de perfiles 
populares o comunes hasta la de
puestos directivos, con habilidades y competencias específicas o para giros 
especializados, y finalmente, la
importancia que el Employer Branding o “marca
empleadora” ha tomado para las empresas.

Ejes Temáticos:

- Desarrollar nuevas técnicas de búsqueda de talento y reclutamiento.
- Conocer herramientas para llevar a cabo headhunting avanzado a través de 
internet.
- Gestionar las fuentes digitales que existen para buscar candidatos para una 
posición específica.
- Conocer las bases para ser una marca empleadora (Employer Branding). 

Formaremos un equipo de reclutamiento realmente competitivo y que logre atraer 
al mejor talento, buscar
candidatos de perfiles complicados y que el equipo de reclutamiento conozca la 
importancia del Employer Branding.

Solicita información respondiendo a este correo con la palabra Reclutamiento, 
junto con los siguientes datos:

Nombre:
Correo electrónico:
Número telefónico:
Email Alterno:

Para información inmediata llamar al:
(+52) 55 15 54 66 30 - (+52) 55 30 16 70 85
O puede enviarnos un Whatsapp 

Qué tengas un gran día.
Saludos.

Innova Learn México - innovalearn. mx - Mérida, Yucatán, México



___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()

2020-12-08 Thread David Miller
From: Zheng Yongjun 
Date: Tue, 8 Dec 2020 20:13:53 +0800

> Simplify the return expression.
> 
> Signed-off-by: Zheng Yongjun 

Applied.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] windows: Bump OpenSSL version

2020-12-08 Thread Alin Serdean


From: Ilya Maximets
Sent: Wednesday, October 21, 2020 6:50 PM
To: Alin Serdean; 
d...@openvswitch.org
Cc: i.maxim...@ovn.org; Mark 
Gray
Subject: Re: [PATCH v2] windows: Bump OpenSSL version

On 10/13/20 2:46 PM, Alin Gabriel Serdean wrote:
> Switch from OpenSSL 1.0.2 to 1.1.1.
>
> `mkdir` does not support permission arguments on Windows. Create a wrapper
> for it that uses only the last argument and uses `-p` option.

Does chmod work fine on windows?
Maybe it's better to replace 'mkdir -m' invocations with pairs
of 'mkdir'+'chmod'?  It seems important to have correct permissions
on certificates and keys.

[Alin] Thank you for the review!
Unfortunately chmod doesn’t work as expected on Windows.
Thank you for raising the concern, I will switch it to `mkdir`+`icacls`
to make sure only the right permissions are set.
--
Alin.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [ovn] transaction error in ovn-controller with configured RBAC on branch-20.06

2020-12-08 Thread Dumitru Ceara
On 12/8/20 8:28 PM, Dumitru Ceara wrote:
> On 12/3/20 4:11 PM, Dumitru Ceara wrote:
>> On 12/3/20 2:01 PM, Odintsov Vladislav wrote:
>>> But neither IP nor system-id was changed. I've double-checked:
>>>
>>> ovn-controller 20.06.2:
>>>
>>> Chassis "04540082-b5b5-4ab5-9901-03ed445c772d"
>>> hostname: host.local
>>> Encap vxlan
>>> ip: "172.24.33.105"
>>> options: {csum="true"}
>>> Encap stt
>>> ip: "172.24.33.105"
>>> options: {csum="true"}
>>> Port_Binding eni-3E9901E0
>>> Port_Binding eni-35AFCD00
>>>
>>> # ovs-vsctl get open . external-ids:system-id
>>> "04540082-b5b5-4ab5-9901-03ed445c772d"
>>>
>>> # systemctl stop ovn-controller
>>>
>>> Chassis was deleted:
>>>
>>> # ovn-sbctl list chassis 04540082-b5b5-4ab5-9901-03ed445c772d
>>> ovn-sbctl: no row "04540082-b5b5-4ab5-9901-03ed445c772d" in table Chassis
>>>
>>> # yum update ovn-host -y
>>> # systemctl restart ovn-controller
>>>
>>> Chassis with same system-id and encap IPs was re-added:
>>>
>>> Chassis "04540082-b5b5-4ab5-9901-03ed445c772d"
>>> hostname: host.local
>>> Encap vxlan
>>> ip: "172.24.33.105"
>>> options: {csum="true"}
>>> Encap stt
>>> ip: "172.24.33.105"
>>> options: {csum="true"}
>>>
>>> But, there are no port_bindings, and in ovn-controller logs again 
>>> transaction error:
>>>
>>> 2020-12-03T12:53:54.031Z|00035|binding|INFO|Claiming lport eni-3E9901E0 for 
>>> this chassis.
>>> 2020-12-03T12:53:54.031Z|00036|binding|INFO|eni-3E9901E0: Claiming 
>>> 0a:00:3e:99:01:e0 192.168.0.4
>>> 2020-12-03T12:53:54.031Z|00037|binding|INFO|Claiming lport eni-35AFCD00 for 
>>> this chassis.
>>> 2020-12-03T12:53:54.031Z|00038|binding|INFO|eni-35AFCD00: Claiming 
>>> 0a:00:35:af:cd:00 192.168.0.5
>>> 2020-12-03T12:53:54.041Z|00039|ovsdb_idl|WARN|transaction error: 
>>> {"details":"RBAC rules for client \"04540082-b5b5-4ab5-9901-03ed445c772d\" 
>>> role \"ovn-controller\" prohibit modification of table 
>>> \"Encap\".","error":"permission error"}
>>> 2020-12-03T12:53:54.042Z|00040|main|INFO|OVNSB commit failed, force 
>>> recompute next time.
>>>
>>>
>>> Moreover, if I forcefully delete chassis, port claim successful, but after 
>>> restart ovn-controller, promlem appears again:
>>>
>>> # ovn-sbctl destroy chassis 04540082-b5b5-4ab5-9901-03ed445c772d
>>>
>>> 2020-12-03T12:56:20.119Z|00045|main|INFO|OVNSB commit failed, force 
>>> recompute next time.
>>> 2020-12-03T12:56:23.803Z|00046|binding|INFO|Claiming lport eni-3E9901E0 for 
>>> this chassis.
>>> 2020-12-03T12:56:23.803Z|00047|binding|INFO|eni-3E9901E0: Claiming 
>>> 0a:00:3e:99:01:e0 192.168.0.4
>>> 2020-12-03T12:56:23.803Z|00048|binding|INFO|Claiming lport eni-35AFCD00 for 
>>> this chassis.
>>> 2020-12-03T12:56:23.803Z|00049|binding|INFO|eni-35AFCD00: Claiming 
>>> 0a:00:35:af:cd:00 192.168.0.5
>>>
>>> # systemctl restart ovn-controller
>>>
>>> 2020-12-03T12:56:38.590Z|1|vlog|INFO|opened log file 
>>> /var/log/ovn/ovn-controller.log
>>> 2020-12-03T12:56:38.592Z|2|reconnect|INFO|unix:/run/openvswitch/db.sock:
>>>  connecting...
>>> 2020-12-03T12:56:38.592Z|3|reconnect|INFO|unix:/run/openvswitch/db.sock:
>>>  connected
>>> 2020-12-03T12:56:38.596Z|4|main|INFO|OVS IDL reconnected, force 
>>> recompute.
>>> 2020-12-03T12:56:38.600Z|5|reconnect|INFO|ssl:x.x.x.x:6642: 
>>> connecting...
>>> 2020-12-03T12:56:38.600Z|6|main|INFO|OVNSB IDL reconnected, force 
>>> recompute.
>>> 2020-12-03T12:56:38.645Z|7|reconnect|INFO|ssl:x.x.x.x:6642: connected
>>> 2020-12-03T12:56:38.650Z|8|ofctrl|INFO|unix:/run/openvswitch/br-int.mgmt:
>>>  connecting to switch
>>> 2020-12-03T12:56:38.650Z|9|rconn|INFO|unix:/run/openvswitch/br-int.mgmt:
>>>  connecting...
>>> 2020-12-03T12:56:38.651Z|00010|rconn|INFO|unix:/run/openvswitch/br-int.mgmt:
>>>  connected
>>> 2020-12-03T12:56:38.654Z|1|pinctrl(ovn_pinctrl0)|INFO|unix:/run/openvswitch/br-int.mgmt:
>>>  connecting to switch
>>> 2020-12-03T12:56:38.654Z|2|rconn(ovn_pinctrl0)|INFO|unix:/run/openvswitch/br-int.mgmt:
>>>  connecting...
>>> 2020-12-03T12:56:38.654Z|00011|binding|INFO|Claiming lport eni-35AFCD00 for 
>>> this chassis.
>>> 2020-12-03T12:56:38.654Z|00012|binding|INFO|eni-35AFCD00: Claiming 
>>> 0a:00:35:af:cd:00 192.168.0.5
>>> 2020-12-03T12:56:38.654Z|00013|binding|INFO|Claiming lport eni-3E9901E0 for 
>>> this chassis.
>>> 2020-12-03T12:56:38.654Z|00014|binding|INFO|eni-3E9901E0: Claiming 
>>> 0a:00:3e:99:01:e0 192.168.0.4
>>> 2020-12-03T12:56:38.655Z|00015|ovsdb_idl|WARN|transaction error: 
>>> {"details":"RBAC rules for client \"04540082-b5b5-4ab5-9901-03ed445c772d\" 
>>> role \"ovn-controller\" prohibit modification of table 
>>> \"Encap\".","error":"permission error"}
>>> 2020-12-03T12:56:38.655Z|00016|main|INFO|OVNSB commit failed, force 
>>> recompute next time.
>>>
>>>
>>> Maybe, I just don’t understand your idea...
>>
>> I see.  I'm pretty sure it's related to this commit that tries to reuse
>> Encaps (and that's wrong 

Re: [ovs-dev] [ovn] transaction error in ovn-controller with configured RBAC on branch-20.06

2020-12-08 Thread Dumitru Ceara
On 12/3/20 4:11 PM, Dumitru Ceara wrote:
> On 12/3/20 2:01 PM, Odintsov Vladislav wrote:
>> But neither IP nor system-id was changed. I've double-checked:
>>
>> ovn-controller 20.06.2:
>>
>> Chassis "04540082-b5b5-4ab5-9901-03ed445c772d"
>> hostname: host.local
>> Encap vxlan
>> ip: "172.24.33.105"
>> options: {csum="true"}
>> Encap stt
>> ip: "172.24.33.105"
>> options: {csum="true"}
>> Port_Binding eni-3E9901E0
>> Port_Binding eni-35AFCD00
>>
>> # ovs-vsctl get open . external-ids:system-id
>> "04540082-b5b5-4ab5-9901-03ed445c772d"
>>
>> # systemctl stop ovn-controller
>>
>> Chassis was deleted:
>>
>> # ovn-sbctl list chassis 04540082-b5b5-4ab5-9901-03ed445c772d
>> ovn-sbctl: no row "04540082-b5b5-4ab5-9901-03ed445c772d" in table Chassis
>>
>> # yum update ovn-host -y
>> # systemctl restart ovn-controller
>>
>> Chassis with same system-id and encap IPs was re-added:
>>
>> Chassis "04540082-b5b5-4ab5-9901-03ed445c772d"
>> hostname: host.local
>> Encap vxlan
>> ip: "172.24.33.105"
>> options: {csum="true"}
>> Encap stt
>> ip: "172.24.33.105"
>> options: {csum="true"}
>>
>> But, there are no port_bindings, and in ovn-controller logs again 
>> transaction error:
>>
>> 2020-12-03T12:53:54.031Z|00035|binding|INFO|Claiming lport eni-3E9901E0 for 
>> this chassis.
>> 2020-12-03T12:53:54.031Z|00036|binding|INFO|eni-3E9901E0: Claiming 
>> 0a:00:3e:99:01:e0 192.168.0.4
>> 2020-12-03T12:53:54.031Z|00037|binding|INFO|Claiming lport eni-35AFCD00 for 
>> this chassis.
>> 2020-12-03T12:53:54.031Z|00038|binding|INFO|eni-35AFCD00: Claiming 
>> 0a:00:35:af:cd:00 192.168.0.5
>> 2020-12-03T12:53:54.041Z|00039|ovsdb_idl|WARN|transaction error: 
>> {"details":"RBAC rules for client \"04540082-b5b5-4ab5-9901-03ed445c772d\" 
>> role \"ovn-controller\" prohibit modification of table 
>> \"Encap\".","error":"permission error"}
>> 2020-12-03T12:53:54.042Z|00040|main|INFO|OVNSB commit failed, force 
>> recompute next time.
>>
>>
>> Moreover, if I forcefully delete chassis, port claim successful, but after 
>> restart ovn-controller, promlem appears again:
>>
>> # ovn-sbctl destroy chassis 04540082-b5b5-4ab5-9901-03ed445c772d
>>
>> 2020-12-03T12:56:20.119Z|00045|main|INFO|OVNSB commit failed, force 
>> recompute next time.
>> 2020-12-03T12:56:23.803Z|00046|binding|INFO|Claiming lport eni-3E9901E0 for 
>> this chassis.
>> 2020-12-03T12:56:23.803Z|00047|binding|INFO|eni-3E9901E0: Claiming 
>> 0a:00:3e:99:01:e0 192.168.0.4
>> 2020-12-03T12:56:23.803Z|00048|binding|INFO|Claiming lport eni-35AFCD00 for 
>> this chassis.
>> 2020-12-03T12:56:23.803Z|00049|binding|INFO|eni-35AFCD00: Claiming 
>> 0a:00:35:af:cd:00 192.168.0.5
>>
>> # systemctl restart ovn-controller
>>
>> 2020-12-03T12:56:38.590Z|1|vlog|INFO|opened log file 
>> /var/log/ovn/ovn-controller.log
>> 2020-12-03T12:56:38.592Z|2|reconnect|INFO|unix:/run/openvswitch/db.sock: 
>> connecting...
>> 2020-12-03T12:56:38.592Z|3|reconnect|INFO|unix:/run/openvswitch/db.sock: 
>> connected
>> 2020-12-03T12:56:38.596Z|4|main|INFO|OVS IDL reconnected, force 
>> recompute.
>> 2020-12-03T12:56:38.600Z|5|reconnect|INFO|ssl:x.x.x.x:6642: connecting...
>> 2020-12-03T12:56:38.600Z|6|main|INFO|OVNSB IDL reconnected, force 
>> recompute.
>> 2020-12-03T12:56:38.645Z|7|reconnect|INFO|ssl:x.x.x.x:6642: connected
>> 2020-12-03T12:56:38.650Z|8|ofctrl|INFO|unix:/run/openvswitch/br-int.mgmt:
>>  connecting to switch
>> 2020-12-03T12:56:38.650Z|9|rconn|INFO|unix:/run/openvswitch/br-int.mgmt: 
>> connecting...
>> 2020-12-03T12:56:38.651Z|00010|rconn|INFO|unix:/run/openvswitch/br-int.mgmt: 
>> connected
>> 2020-12-03T12:56:38.654Z|1|pinctrl(ovn_pinctrl0)|INFO|unix:/run/openvswitch/br-int.mgmt:
>>  connecting to switch
>> 2020-12-03T12:56:38.654Z|2|rconn(ovn_pinctrl0)|INFO|unix:/run/openvswitch/br-int.mgmt:
>>  connecting...
>> 2020-12-03T12:56:38.654Z|00011|binding|INFO|Claiming lport eni-35AFCD00 for 
>> this chassis.
>> 2020-12-03T12:56:38.654Z|00012|binding|INFO|eni-35AFCD00: Claiming 
>> 0a:00:35:af:cd:00 192.168.0.5
>> 2020-12-03T12:56:38.654Z|00013|binding|INFO|Claiming lport eni-3E9901E0 for 
>> this chassis.
>> 2020-12-03T12:56:38.654Z|00014|binding|INFO|eni-3E9901E0: Claiming 
>> 0a:00:3e:99:01:e0 192.168.0.4
>> 2020-12-03T12:56:38.655Z|00015|ovsdb_idl|WARN|transaction error: 
>> {"details":"RBAC rules for client \"04540082-b5b5-4ab5-9901-03ed445c772d\" 
>> role \"ovn-controller\" prohibit modification of table 
>> \"Encap\".","error":"permission error"}
>> 2020-12-03T12:56:38.655Z|00016|main|INFO|OVNSB commit failed, force 
>> recompute next time.
>>
>>
>> Maybe, I just don’t understand your idea...
> 
> I see.  I'm pretty sure it's related to this commit that tries to reuse
> Encaps (and that's wrong because it doesn't work with RBAC):
> 
> https://github.com/ovn-org/ovn/commit/94a32fca2d2b825fece0ef5b1873459bd9857dd3
> 
> I'll try to fix it and update this thread

[ovs-dev] [PATCH ovn] chassis: Do not try to guess system-id changes.

2020-12-08 Thread Dumitru Ceara
When the OVS system-id changes ovn-controller needs external (CMS) help
in order to update its own Chassis/Chassis_private records, i.e., the
CMS has to ensure that either ovn-controller is stopped (so that
ovn-controller cleans up its old Chassis/Chassis_private records) or
that after the system-id is changed, the stale Chassis/Chassis_private
records are destroyed externally.

This patch reverts the previous efforts to have ovn-controller reuse
stale Chassis records and documents how the system-id change operation
needs to be executed.  The main problem with reusing stale records is
that there's no safe way to make it work when RBAC is enabled.

Suggestedy-by: Han Zhou 
Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-dev/2020-September/374608.html
Fixes: f26c4a530bca ("ovn-controller: Fix chassis ovn-sbdb record init")
Fixes: 4465f553ee70 ("ovn-controller: Update stale chassis entry at init")
Fixes: 94a32fca2d2b ("chassis: Fix the way encaps are updated for a chassis 
record.")
Fixes: dce1af31b550 ("chassis: Fix chassis_private record updates when the 
system-id changes.")
Signed-off-by: Dumitru Ceara 
---
 controller/chassis.c| 177 
 controller/chassis.h|   3 -
 controller/ovn-controller.8.xml |   7 +-
 controller/ovn-controller.c |  21 +++--
 northd/ovn-northd.c |   6 +-
 tests/ovn-controller.at |  44 +++---
 6 files changed, 47 insertions(+), 211 deletions(-)

diff --git a/controller/chassis.c b/controller/chassis.c
index 7748fb9..b4d4b0e 100644
--- a/controller/chassis.c
+++ b/controller/chassis.c
@@ -37,44 +37,6 @@ VLOG_DEFINE_THIS_MODULE(chassis);
 #endif /* HOST_NAME_MAX */
 
 /*
- * Structure to hold chassis specific state (currently just chassis-id)
- * to avoid database lookups when changes happen while the controller is
- * running.
- */
-struct chassis_info {
-/* Last ID we initialized the Chassis SB record with. */
-struct ds id;
-
-/* True if Chassis SB record is initialized, false otherwise. */
-uint32_t id_inited : 1;
-};
-
-static struct chassis_info chassis_state = {
-.id = DS_EMPTY_INITIALIZER,
-.id_inited = false,
-};
-
-static void
-chassis_info_set_id(struct chassis_info *info, const char *id)
-{
-ds_clear(&info->id);
-ds_put_cstr(&info->id, id);
-info->id_inited = true;
-}
-
-static bool
-chassis_info_id_inited(const struct chassis_info *info)
-{
-return info->id_inited;
-}
-
-static const char *
-chassis_info_id(const struct chassis_info *info)
-{
-return ds_cstr_ro(&info->id);
-}
-
-/*
  * Structure for storing the chassis config parsed from the ovs table.
  */
 struct ovs_chassis_cfg {
@@ -420,6 +382,9 @@ chassis_tunnels_changed(const struct sset *encap_type_set,
 bool  changed = false;
 
 for (size_t i = 0; i < chassis_rec->n_encaps; i++) {
+if (strcmp(chassis_rec->name, chassis_rec->encaps[i]->chassis_name)) {
+return true;
+}
 
 if (!sset_contains(encap_type_set, chassis_rec->encaps[i]->type)) {
 changed = true;
@@ -500,54 +465,11 @@ chassis_build_encaps(struct ovsdb_idl_txn *ovnsb_idl_txn,
 return encaps;
 }
 
-/*
- * Updates encaps for a given chassis. This can happen when the chassis
- * name has changed. Also, the only thing we support updating is the
- * chassis_name. For other changes the encaps will be recreated.
- */
-static void
-chassis_update_encaps(const struct sbrec_chassis *chassis)
-{
-for (size_t i = 0; i < chassis->n_encaps; i++) {
-sbrec_encap_set_chassis_name(chassis->encaps[i], chassis->name);
-}
-}
-
-/*
- * Returns a pointer to a chassis record from 'chassis_table' that
- * matches at least one tunnel config.
- */
-static const struct sbrec_chassis *
-chassis_get_stale_record(const struct sbrec_chassis_table *chassis_table,
- const struct ovs_chassis_cfg *ovs_cfg,
- const char *chassis_id)
-{
-const struct sbrec_chassis *chassis_rec;
-
-SBREC_CHASSIS_TABLE_FOR_EACH (chassis_rec, chassis_table) {
-for (size_t i = 0; i < chassis_rec->n_encaps; i++) {
-if (sset_contains(&ovs_cfg->encap_type_set,
-  chassis_rec->encaps[i]->type) &&
-sset_contains(&ovs_cfg->encap_ip_set,
-  chassis_rec->encaps[i]->ip)) {
-return chassis_rec;
-}
-if (strcmp(chassis_rec->name, chassis_id) == 0) {
-return chassis_rec;
-}
-}
-}
-
-return NULL;
-}
-
 /* If this is a chassis config update after we initialized the record once
  * then we should always be able to find it with the ID we saved in
  * chassis_state.
  * Otherwise (i.e., first time we create the record or if the system-id
- * changed) then we check if there's a stale record from a previous
- * controller run that didn't end gracefully and reuse it. If not then we
- * c

Re: [ovs-dev] [PATCH v6 15/15] dpcls-avx512: enabling avx512 vector popcount instruction

2020-12-08 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, I am a robot and I have tried out 
your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Inappropriate spacing around cast
#90 FILE: lib/dpif-netdev-lookup-avx512-gather.c:188:
(void)use_vpop;

Lines checked: 208, Warnings: 0, Errors: 1


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v6 12/15] dpif-netdev/dpcls-avx512: enable 16 block processing

2020-12-08 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, I am a robot and I have tried out 
your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 80 characters long (recommended limit is 79)
#100 FILE: lib/dpif-netdev-lookup-avx512-gather.c:107:
uint32_t c = _mm512_mask_cmpeq_epi64_mask(lane_mask_gt8, v_data, v_key);

Lines checked: 325, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v6 02/15] dpif-netdev: Refactor to multiple header files

2020-12-08 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, I am a robot and I have tried out 
your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
ERROR: Improper whitespace around control block
#231 FILE: lib/dpif-netdev-private-dfc.h:111:
#define EMC_FOR_EACH_POS_WITH_HASH(EMC, CURRENT_ENTRY, HASH) \

ERROR: Improper whitespace around control block
#347 FILE: lib/dpif-netdev-private-dfc.h:227:
EMC_FOR_EACH_POS_WITH_HASH(cache, current_entry, key->hash) {

ERROR: Improper whitespace around control block
#465 FILE: lib/dpif-netdev-private-dpcls.h:95:
#define NETDEV_FLOW_KEY_FOR_EACH_IN_FLOWMAP(VALUE, KEY, FLOWMAP)   \

ERROR: Inappropriate bracing around statement
#466 FILE: lib/dpif-netdev-private-dpcls.h:96:
MINIFLOW_FOR_EACH_IN_FLOWMAP (VALUE, &(KEY)->mf, FLOWMAP)

Lines checked: 1624, Warnings: 0, Errors: 4


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v6 01/15] dpdk: Update to use DPDK v20.11.

2020-12-08 Thread 0-day Robot
Bleep bloop.  Greetings Harry van Haaren, I am a robot and I have tried out 
your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Line is 94 characters long (recommended limit is 79)
#385 FILE: Documentation/topics/dpdk/phy.rst:238:
__ 
https://doc.dpdk.org/guides-20.11/prog_guide/env_abstraction_layer.html#iova-mode-detection

WARNING: Line is 82 characters long (recommended limit is 79)
#442 FILE: Documentation/topics/testing.rst:356:
.. _Configure hugepages: 
https://doc.dpdk.org/guides-20.11/linux_gsg/sys_reqs.html

Lines checked: 733, Warnings: 2, Errors: 0


Please check this out.  If you feel there has been an error, please email 
acon...@redhat.com

Thanks,
0-day Robot
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 14/15] dpdk: Cache result of CPU ISA checks

2020-12-08 Thread Harry van Haaren
As a small optimization, this patch caches the result of a CPU ISA
check from DPDK. Particularly in the case of running the DPCLS
autovalidator (which repeatedly probes subtables) this reduces
the amount of CPU ISA lookups from the DPDK level.

By caching them at the OVS/dpdk.c level, the ISA checks remain
runtime for the CPU where they are executed, but subsequent checks
for the same ISA feature become much cheaper.

Signed-off-by: Harry van Haaren 
Co-authored-by: Cian Ferriter 
Signed-off-by: Cian Ferriter 
---
 lib/dpdk.c | 26 ++
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/lib/dpdk.c b/lib/dpdk.c
index 319540394..703602603 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -614,13 +614,31 @@ print_dpdk_version(void)
 puts(rte_version());
 }
 
+/* Avoid calling rte_cpu_get_flag_enabled() excessively, by caching the
+ * result of the call for each CPU flag in a static variable. To avoid
+ * allocating large numbers of static variables, use a uint8 as a bitfield.
+ * Note the macro must only return if the ISA check is done and available.
+ */
+#define ISA_CHECK_DONE_BIT (1 << 0)
+#define ISA_AVAILABLE_BIT  (1 << 1)
+
 #define CHECK_CPU_FEATURE(feature, name_str, RTE_CPUFLAG)   \
 do {\
 if (strncmp(feature, name_str, strlen(name_str)) == 0) {\
-int has_isa = rte_cpu_get_flag_enabled(RTE_CPUFLAG);\
-VLOG_DBG("CPU flag %s, available %s\n", name_str,   \
-  has_isa ? "yes" : "no");  \
-return true;\
+static uint8_t isa_check_##RTE_CPUFLAG; \
+int check = isa_check_##RTE_CPUFLAG & ISA_CHECK_DONE_BIT;   \
+if (OVS_UNLIKELY(!check)) { \
+int has_isa = rte_cpu_get_flag_enabled(RTE_CPUFLAG);\
+VLOG_DBG("CPU flag %s, available %s\n", \
+ name_str, has_isa ? "yes" : "no"); \
+isa_check_##RTE_CPUFLAG = ISA_CHECK_DONE_BIT;   \
+if (has_isa) {  \
+isa_check_##RTE_CPUFLAG |= ISA_AVAILABLE_BIT;   \
+}   \
+}   \
+if (isa_check_##RTE_CPUFLAG & ISA_AVAILABLE_BIT) {  \
+return true;\
+}   \
 }   \
 } while (0)
 
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 13/15] dpif-netdev/dpcls: specialize more subtable signatures

2020-12-08 Thread Harry van Haaren
This commit adds more subtables to be specialized. The traffic
pattern here being matched is VXLAN traffic subtables, which commonly
have (5,3), (9,1) and (9,4) subtable fingerprints.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev-lookup-avx512-gather.c | 6 ++
 lib/dpif-netdev-lookup-generic.c   | 6 ++
 2 files changed, 12 insertions(+)

diff --git a/lib/dpif-netdev-lookup-avx512-gather.c 
b/lib/dpif-netdev-lookup-avx512-gather.c
index 21f8a4cff..2a70915cc 100644
--- a/lib/dpif-netdev-lookup-avx512-gather.c
+++ b/lib/dpif-netdev-lookup-avx512-gather.c
@@ -298,6 +298,9 @@ avx512_lookup_impl(struct dpcls_subtable *subtable,
 return avx512_lookup_impl(subtable, keys_map, keys, rules, U0, U1);   \
 } \
 
+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(9, 4)
+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(9, 1)
+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(5, 3)
 DECLARE_OPTIMIZED_LOOKUP_FUNCTION(5, 1)
 DECLARE_OPTIMIZED_LOOKUP_FUNCTION(4, 1)
 DECLARE_OPTIMIZED_LOOKUP_FUNCTION(4, 0)
@@ -330,6 +333,9 @@ dpcls_subtable_avx512_gather_probe(uint32_t u0_bits, 
uint32_t u1_bits)
 return NULL;
 }
 
+CHECK_LOOKUP_FUNCTION(9, 4);
+CHECK_LOOKUP_FUNCTION(9, 1);
+CHECK_LOOKUP_FUNCTION(5, 3);
 CHECK_LOOKUP_FUNCTION(5, 1);
 CHECK_LOOKUP_FUNCTION(4, 1);
 CHECK_LOOKUP_FUNCTION(4, 0);
diff --git a/lib/dpif-netdev-lookup-generic.c b/lib/dpif-netdev-lookup-generic.c
index e3b6be4b6..6c74ac3a1 100644
--- a/lib/dpif-netdev-lookup-generic.c
+++ b/lib/dpif-netdev-lookup-generic.c
@@ -282,6 +282,9 @@ dpcls_subtable_lookup_generic(struct dpcls_subtable 
*subtable,
 return lookup_generic_impl(subtable, keys_map, keys, rules, U0, U1);  \
 } \
 
+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(9, 4)
+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(9, 1)
+DECLARE_OPTIMIZED_LOOKUP_FUNCTION(5, 3)
 DECLARE_OPTIMIZED_LOOKUP_FUNCTION(5, 1)
 DECLARE_OPTIMIZED_LOOKUP_FUNCTION(4, 1)
 DECLARE_OPTIMIZED_LOOKUP_FUNCTION(4, 0)
@@ -303,6 +306,9 @@ dpcls_subtable_generic_probe(uint32_t u0_bits, uint32_t 
u1_bits)
 {
 dpcls_subtable_lookup_func f = NULL;
 
+CHECK_LOOKUP_FUNCTION(9, 4);
+CHECK_LOOKUP_FUNCTION(9, 1);
+CHECK_LOOKUP_FUNCTION(5, 3);
 CHECK_LOOKUP_FUNCTION(5, 1);
 CHECK_LOOKUP_FUNCTION(4, 1);
 CHECK_LOOKUP_FUNCTION(4, 0);
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 11/15] dpif-netdev/dpcls: Refactor function names to dpcls

2020-12-08 Thread Harry van Haaren
This commit refactors the function names from netdev_*
namespace to the dpcls_* namespace, as they are only used
by dpcls code. With the name change, it becomes more obvious
that the functions belong to dpcls functionality, and in the
dpif-netdev-private-dpcls.h header file.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev-private-dpcls.h |  6 ++
 lib/dpif-netdev.c   | 21 ++---
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/lib/dpif-netdev-private-dpcls.h b/lib/dpif-netdev-private-dpcls.h
index 5bc579bba..e66cae3f4 100644
--- a/lib/dpif-netdev-private-dpcls.h
+++ b/lib/dpif-netdev-private-dpcls.h
@@ -97,10 +97,8 @@ struct dpcls_subtable {
 
 /* Generates a mask for each bit set in the subtable's miniflow. */
 void
-netdev_flow_key_gen_masks(const struct netdev_flow_key *tbl,
-  uint64_t *mf_masks,
-  const uint32_t mf_bits_u0,
-  const uint32_t mf_bits_u1);
+dpcls_flow_key_gen_masks(const struct netdev_flow_key *tbl, uint64_t *mf_masks,
+ const uint32_t mf_bits_u0, const uint32_t mf_bits_u1);
 
 /* Matches a dpcls rule against the incoming packet in 'target' */
 bool dpcls_rule_matches_key(const struct dpcls_rule *rule,
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index eea6c11f0..3168f153b 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -8308,7 +8308,7 @@ dpcls_create_subtable(struct dpcls *cls, const struct 
netdev_flow_key *mask)
 subtable->mf_bits_set_unit0 = unit0;
 subtable->mf_bits_set_unit1 = unit1;
 subtable->mf_masks = xmalloc(sizeof(uint64_t) * (unit0 + unit1));
-netdev_flow_key_gen_masks(mask, subtable->mf_masks, unit0, unit1);
+dpcls_flow_key_gen_masks(mask, subtable->mf_masks, unit0, unit1);
 
 /* Get the preferred subtable search function for this (u0,u1) subtable.
  * The function is guaranteed to always return a valid implementation, and
@@ -8407,11 +8407,10 @@ dpcls_remove(struct dpcls *cls, struct dpcls_rule *rule)
 }
 }
 
-/* Inner loop for mask generation of a unit, see netdev_flow_key_gen_masks. */
+/* Inner loop for mask generation of a unit, see dpcls_flow_key_gen_masks. */
 static inline void
-netdev_flow_key_gen_mask_unit(uint64_t iter,
-  const uint64_t count,
-  uint64_t *mf_masks)
+dpcls_flow_key_gen_mask_unit(uint64_t iter, const uint64_t count,
+ uint64_t *mf_masks)
 {
 int i;
 for (i = 0; i < count; i++) {
@@ -8432,16 +8431,16 @@ netdev_flow_key_gen_mask_unit(uint64_t iter,
  * @param mf_bits_unit0 Number of bits set in unit0 of the miniflow
  */
 void
-netdev_flow_key_gen_masks(const struct netdev_flow_key *tbl,
-  uint64_t *mf_masks,
-  const uint32_t mf_bits_u0,
-  const uint32_t mf_bits_u1)
+dpcls_flow_key_gen_masks(const struct netdev_flow_key *tbl,
+ uint64_t *mf_masks,
+ const uint32_t mf_bits_u0,
+ const uint32_t mf_bits_u1)
 {
 uint64_t iter_u0 = tbl->mf.map.bits[0];
 uint64_t iter_u1 = tbl->mf.map.bits[1];
 
-netdev_flow_key_gen_mask_unit(iter_u0, mf_bits_u0, &mf_masks[0]);
-netdev_flow_key_gen_mask_unit(iter_u1, mf_bits_u1, &mf_masks[mf_bits_u0]);
+dpcls_flow_key_gen_mask_unit(iter_u0, mf_bits_u0, &mf_masks[0]);
+dpcls_flow_key_gen_mask_unit(iter_u1, mf_bits_u1, &mf_masks[mf_bits_u0]);
 }
 
 /* Returns true if 'target' satisfies 'key' in 'mask', that is, if each 1-bit
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 09/15] docs/dpdk/bridge: Add dpif performance section

2020-12-08 Thread Harry van Haaren
From: Cian Ferriter 

This section details how two new commands can be used to list and select
the different dpif implementations. It also details how a non default
dpif implementation can be tested with the OVS unit test suite.

Add NEWS updates for the dpif-netdev.c refactor and the new dpif
implementations/commands.

Signed-off-by: Cian Ferriter 
---
 Documentation/topics/dpdk/bridge.rst | 37 
 NEWS |  5 
 2 files changed, 42 insertions(+)

diff --git a/Documentation/topics/dpdk/bridge.rst 
b/Documentation/topics/dpdk/bridge.rst
index 526d5c959..ca90d7bdb 100644
--- a/Documentation/topics/dpdk/bridge.rst
+++ b/Documentation/topics/dpdk/bridge.rst
@@ -214,3 +214,40 @@ implementation ::
 
 Compile OVS in debug mode to have `ovs_assert` statements error out if
 there is a mis-match in the DPCLS lookup implementation.
+
+Datapath Interface Performance
+--
+
+The datapath interface (DPIF) or dp_netdev_input() is responsible for taking
+packets through the major components of the userspace datapath; such as
+miniflow_extract, EMC, SMC and DPCLS lookups, and a lot of the performance
+stats associated with the datapath.
+
+Just like with the SIMD DPCLS work above, SIMD can be applied to the DPIF to
+improve performance.
+
+OVS provides multiple implementations of the DPIF. These can be listed with the
+following command ::
+
+$ ovs-appctl dpif-netdev/dpif-get
+Available DPIF implementations:
+  dpif_scalar
+  dpif_avx512
+
+By default, dpif_scalar is used. The DPIF implementation can be selected by
+name ::
+
+$ ovs-appctl dpif-netdev/dpif-set dpif_avx512
+DPIF implementation set to dpif_avx512.
+
+$ ovs-appctl dpif-netdev/dpif-set dpif_scalar
+DPIF implementation set to dpif_scalar.
+
+Running Unit Tests with AVX512 DPIF
+~~~
+
+Since the AVX512 DPIF is disabled by default, a compile time option is
+available in order to test it with the OVS unit test suite. When building with
+a CPU that supports AVX512, use the following configure option ::
+
+$ ./configure --enable-dpif-default-avx512
diff --git a/NEWS b/NEWS
index 1a39cc661..30a3d8dbb 100644
--- a/NEWS
+++ b/NEWS
@@ -28,6 +28,11 @@ Post-v2.14.0
OpenFlow bundle actions.
- Support for GitHub Actions based continuous integration builds has been
  added.
+   - Userspace datapath:
+ * Refactor lib/dpif-netdev.c to multiple header files.
+ * Add avx512 implementation of dpif which can process non recirculated
+   packets. It supports partial HWOL, EMC, SMC and DPCLS lookups.
+ * Add commands to get and set the dpif implementations.
 
 
 v2.14.0 - 17 Aug 2020
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 15/15] dpcls-avx512: enabling avx512 vector popcount instruction

2020-12-08 Thread Harry van Haaren
This commit enables the AVX512-VPOPCNTDQ Vector Popcount
instruction. This instruction is not available on every CPU
that supports the AVX512-F Foundation ISA, hence it is enabled
only when the additional VPOPCNTDQ ISA check is passed.

The vector popcount instruction is used instead of the AVX512
popcount emulation code present in the avx512 optimized DPCLS today.
It provides higher performance in the SIMD miniflow processing
as that requires the popcount to calculate the miniflow block indexes.

Signed-off-by: Harry van Haaren 

---

v6:
- Now that the DPDK 20.11 dependency exists, it is possible to use the
  RTE_CPUFLAG_* defines to enable the AVX512 vectorized popcount instruction.
---
 lib/dpdk.c |  1 +
 lib/dpif-netdev-lookup-avx512-gather.c | 86 --
 2 files changed, 69 insertions(+), 18 deletions(-)

diff --git a/lib/dpdk.c b/lib/dpdk.c
index 703602603..10491866a 100644
--- a/lib/dpdk.c
+++ b/lib/dpdk.c
@@ -653,6 +653,7 @@ dpdk_get_cpu_has_isa(const char *arch, const char *feature)
 #if __x86_64__
 /* CPU flags only defined for the architecture that support it. */
 CHECK_CPU_FEATURE(feature, "avx512f", RTE_CPUFLAG_AVX512F);
+CHECK_CPU_FEATURE(feature, "avx512vpopcntdq", RTE_CPUFLAG_AVX512VPOPCNTDQ);
 CHECK_CPU_FEATURE(feature, "bmi2", RTE_CPUFLAG_BMI2);
 #endif
 
diff --git a/lib/dpif-netdev-lookup-avx512-gather.c 
b/lib/dpif-netdev-lookup-avx512-gather.c
index 2a70915cc..9d680abe9 100644
--- a/lib/dpif-netdev-lookup-avx512-gather.c
+++ b/lib/dpif-netdev-lookup-avx512-gather.c
@@ -53,6 +53,15 @@
 
 VLOG_DEFINE_THIS_MODULE(dpif_lookup_avx512_gather);
 
+
+/* Wrapper function required to enable ISA. */
+static inline __m512i
+__attribute__((__target__("avx512vpopcntdq")))
+_mm512_popcnt_epi64_wrapper(__m512i v_in)
+{
+return _mm512_popcnt_epi64(v_in);
+}
+
 static inline __m512i
 _mm512_popcnt_epi64_manual(__m512i v_in)
 {
@@ -125,7 +134,8 @@ avx512_blocks_gather(__m512i v_u0, /* reg of u64 of all u0 
bits */
  __mmask64 u1_bcast_msk,  /* mask of u1 lanes */
  const uint64_t pkt_mf_u0_pop, /* num bits in u0 of pkt */
  __mmask64 zero_mask, /* maskz if pkt not have mf bit */
- __mmask64 u64_lanes_mask) /* total lane count to use */
+ __mmask64 u64_lanes_mask, /* total lane count to use */
+ const uint32_t use_vpop)  /* use AVX512 vpopcntdq */
 {
 /* Suggest to compiler to load tbl blocks ahead of gather() */
 __m512i v_tbl_blocks = _mm512_maskz_loadu_epi64(u64_lanes_mask,
@@ -139,8 +149,15 @@ avx512_blocks_gather(__m512i v_u0, /* reg of u64 of all u0 
bits */
   tbl_mf_masks);
 __m512i v_masks = _mm512_and_si512(v_pkt_bits, v_tbl_masks);
 
-/* Manual AVX512 popcount for u64 lanes. */
-__m512i v_popcnts = _mm512_popcnt_epi64_manual(v_masks);
+/* Calculate AVX512 popcount for u64 lanes using the native instruction
+ * if available, or using emulation if not available.
+ */
+__m512i v_popcnts;
+if (use_vpop) {
+v_popcnts = _mm512_popcnt_epi64_wrapper(v_masks);
+} else {
+v_popcnts = _mm512_popcnt_epi64_manual(v_masks);
+}
 
 /* Add popcounts and offset for u1 bits. */
 __m512i v_idx_u0_offset = _mm512_maskz_set1_epi64(u1_bcast_msk,
@@ -165,8 +182,11 @@ avx512_lookup_impl(struct dpcls_subtable *subtable,
const struct netdev_flow_key *keys[],
struct dpcls_rule **rules,
const uint32_t bit_count_u0,
-   const uint32_t bit_count_u1)
+   const uint32_t bit_count_u1,
+   const uint32_t use_vpop)
 {
+(void)use_vpop;
+
 OVS_ALIGNED_VAR(CACHE_LINE_SIZE)uint64_t block_cache[BLOCKS_CACHE_SIZE];
 uint32_t hashes[NETDEV_MAX_BURST];
 
@@ -217,7 +237,8 @@ avx512_lookup_impl(struct dpcls_subtable *subtable,
 u1_bcast_mask,
 pkt_mf_u0_pop,
 zero_mask,
-bit_count_total_mask);
+bit_count_total_mask,
+use_vpop);
 _mm512_storeu_si512(&block_cache[i * MF_BLOCKS_PER_PACKET], v_blocks);
 
 if (bit_count_total > 8) {
@@ -238,7 +259,8 @@ avx512_lookup_impl(struct dpcls_subtable *subtable,
 u1_bcast_mask_gt8,
 pkt_mf_u0_pop,
 zero_mask_gt8,
-bit_count_gt8_mask);
+bit_count_gt8_mask,
+ 

[ovs-dev] [PATCH v6 10/15] dpif-netdev: Move pmd_try_optimize function in file

2020-12-08 Thread Harry van Haaren
This commit moves the pmd_try_optimize function to a more
appropriate location in the file - currently it sits in the
DPCLS section, which is not its correct home.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev.c | 146 +++---
 1 file changed, 73 insertions(+), 73 deletions(-)

diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 4c074995c..eea6c11f0 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -5638,6 +5638,79 @@ reload:
 return NULL;
 }
 
+static inline void
+dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd,
+   struct polled_queue *poll_list, int poll_cnt)
+{
+struct dpcls *cls;
+uint64_t tot_idle = 0, tot_proc = 0;
+unsigned int pmd_load = 0;
+
+if (pmd->ctx.now > pmd->rxq_next_cycle_store) {
+uint64_t curr_tsc;
+struct pmd_auto_lb *pmd_alb = &pmd->dp->pmd_alb;
+if (pmd_alb->is_enabled && !pmd->isolated
+&& (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] >=
+   pmd->prev_stats[PMD_CYCLES_ITER_IDLE])
+&& (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY] >=
+pmd->prev_stats[PMD_CYCLES_ITER_BUSY]))
+{
+tot_idle = pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] -
+   pmd->prev_stats[PMD_CYCLES_ITER_IDLE];
+tot_proc = pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY] -
+   pmd->prev_stats[PMD_CYCLES_ITER_BUSY];
+
+if (tot_proc) {
+pmd_load = ((tot_proc * 100) / (tot_idle + tot_proc));
+}
+
+if (pmd_load >= ALB_PMD_LOAD_THRESHOLD) {
+atomic_count_inc(&pmd->pmd_overloaded);
+} else {
+atomic_count_set(&pmd->pmd_overloaded, 0);
+}
+}
+
+pmd->prev_stats[PMD_CYCLES_ITER_IDLE] =
+pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE];
+pmd->prev_stats[PMD_CYCLES_ITER_BUSY] =
+pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY];
+
+/* Get the cycles that were used to process each queue and store. */
+for (unsigned i = 0; i < poll_cnt; i++) {
+uint64_t rxq_cyc_curr = dp_netdev_rxq_get_cycles(poll_list[i].rxq,
+RXQ_CYCLES_PROC_CURR);
+dp_netdev_rxq_set_intrvl_cycles(poll_list[i].rxq, rxq_cyc_curr);
+dp_netdev_rxq_set_cycles(poll_list[i].rxq, RXQ_CYCLES_PROC_CURR,
+ 0);
+}
+curr_tsc = cycles_counter_update(&pmd->perf_stats);
+if (pmd->intrvl_tsc_prev) {
+/* There is a prev timestamp, store a new intrvl cycle count. */
+atomic_store_relaxed(&pmd->intrvl_cycles,
+ curr_tsc - pmd->intrvl_tsc_prev);
+}
+pmd->intrvl_tsc_prev = curr_tsc;
+/* Start new measuring interval */
+pmd->rxq_next_cycle_store = pmd->ctx.now + PMD_RXQ_INTERVAL_LEN;
+}
+
+if (pmd->ctx.now > pmd->next_optimization) {
+/* Try to obtain the flow lock to block out revalidator threads.
+ * If not possible, just try next time. */
+if (!ovs_mutex_trylock(&pmd->flow_mutex)) {
+/* Optimize each classifier */
+CMAP_FOR_EACH (cls, node, &pmd->classifiers) {
+dpcls_sort_subtable_vector(cls);
+}
+ovs_mutex_unlock(&pmd->flow_mutex);
+/* Start new measuring interval */
+pmd->next_optimization = pmd->ctx.now
+ + DPCLS_OPTIMIZATION_INTERVAL;
+}
+}
+}
+
 static void
 dp_netdev_disable_upcall(struct dp_netdev *dp)
 OVS_ACQUIRES(dp->upcall_rwlock)
@@ -8304,79 +8377,6 @@ dpcls_sort_subtable_vector(struct dpcls *cls)
 pvector_publish(pvec);
 }
 
-static inline void
-dp_netdev_pmd_try_optimize(struct dp_netdev_pmd_thread *pmd,
-   struct polled_queue *poll_list, int poll_cnt)
-{
-struct dpcls *cls;
-uint64_t tot_idle = 0, tot_proc = 0;
-unsigned int pmd_load = 0;
-
-if (pmd->ctx.now > pmd->rxq_next_cycle_store) {
-uint64_t curr_tsc;
-struct pmd_auto_lb *pmd_alb = &pmd->dp->pmd_alb;
-if (pmd_alb->is_enabled && !pmd->isolated
-&& (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] >=
-   pmd->prev_stats[PMD_CYCLES_ITER_IDLE])
-&& (pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY] >=
-pmd->prev_stats[PMD_CYCLES_ITER_BUSY]))
-{
-tot_idle = pmd->perf_stats.counters.n[PMD_CYCLES_ITER_IDLE] -
-   pmd->prev_stats[PMD_CYCLES_ITER_IDLE];
-tot_proc = pmd->perf_stats.counters.n[PMD_CYCLES_ITER_BUSY] -
-   pmd->prev_stats[PMD_CYCLES_ITER_BUSY];
-
-

[ovs-dev] [PATCH v6 12/15] dpif-netdev/dpcls-avx512: enable 16 block processing

2020-12-08 Thread Harry van Haaren
This commit implements larger subtable searches in avx512. A limitation
of the previous implementation was that up to 8 blocks of miniflow
data could be matched on (so a subtable with 8 blocks was handled
in avx, but 9 blocks or more would fall back to scalar/generic).
This limitation is removed in this patch, where up to 16 blocks
of subtable can be matched on.

>From an implementation perspective, the key to enabling 16 blocks
over 8 blocks was to do bitmask calculation up front, and then use
the pre-calculated bitmasks for 2x passes of the "blocks gather"
routine. The bitmasks need to be shifted for k-mask usage in the
upper (8-15) block range, but it is relatively trivial. This also
helps in case expanding to 24 blocks is desired in future.

The implementation of the 2nd iteration to handle > 8 blocks is
behind a conditional branch which checks the total number of bits.
This helps the specialized versions of the function that have a
miniflow fingerprint of less-than-or-equal 8 blocks, as the code
can be statically stripped out of those functions. Specialized
functions that do require more than 8 blocks will have the branch
removed and unconditionally execute the 2nd blocks gather routine.

Lastly, the _any() flavour will have the conditional branch, and
the branch predictor may mispredict a bit, but per burst will
likely get most packets correct (particularly towards the middle
and end of a burst).

The code has been run with unit tests under autovalidation and
passes all cases, and unit test coverage has been checked to
ensure the 16 block code paths are executing.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev-lookup-avx512-gather.c | 202 ++---
 1 file changed, 145 insertions(+), 57 deletions(-)

diff --git a/lib/dpif-netdev-lookup-avx512-gather.c 
b/lib/dpif-netdev-lookup-avx512-gather.c
index 8fc1cdfa5..21f8a4cff 100644
--- a/lib/dpif-netdev-lookup-avx512-gather.c
+++ b/lib/dpif-netdev-lookup-avx512-gather.c
@@ -34,7 +34,21 @@
  * AVX512 code at a time.
  */
 #define NUM_U64_IN_ZMM_REG (8)
-#define BLOCKS_CACHE_SIZE (NETDEV_MAX_BURST * NUM_U64_IN_ZMM_REG)
+
+/* This implementation of AVX512 gather allows up to 16 blocks of MF data to be
+ * present in the blocks_cache, hence the multiply by 2 in the blocks count.
+ */
+#define MF_BLOCKS_PER_PACKET (NUM_U64_IN_ZMM_REG * 2)
+
+/* Blocks cache size is the maximum number of miniflow blocks that this
+ * implementation of lookup can handle.
+ */
+#define BLOCKS_CACHE_SIZE (NETDEV_MAX_BURST * MF_BLOCKS_PER_PACKET)
+
+/* The gather instruction can handle a scale for the size of the items to
+ * gather. For uint64_t data, this scale is 8.
+ */
+#define GATHER_SCALE_8 (8)
 
 
 VLOG_DEFINE_THIS_MODULE(dpif_lookup_avx512_gather);
@@ -69,22 +83,82 @@ netdev_rule_matches_key(const struct dpcls_rule *rule,
 {
 const uint64_t *keyp = miniflow_get_values(&rule->flow.mf);
 const uint64_t *maskp = miniflow_get_values(&rule->mask->mf);
-const uint32_t lane_mask = (1 << mf_bits_total) - 1;
+const uint32_t lane_mask = (1ULL << mf_bits_total) - 1;
 
 /* Always load a full cache line from blocks_cache. Other loads must be
  * trimmed to the amount of data required for mf_bits_total blocks.
  */
-__m512i v_blocks = _mm512_loadu_si512(&block_cache[0]);
-__m512i v_mask   = _mm512_maskz_loadu_epi64(lane_mask, &maskp[0]);
-__m512i v_key= _mm512_maskz_loadu_epi64(lane_mask, &keyp[0]);
+uint32_t res_mask;
+
+{
+__m512i v_blocks = _mm512_loadu_si512(&block_cache[0]);
+__m512i v_mask   = _mm512_maskz_loadu_epi64(lane_mask, &maskp[0]);
+__m512i v_key= _mm512_maskz_loadu_epi64(lane_mask, &keyp[0]);
+__m512i v_data = _mm512_and_si512(v_blocks, v_mask);
+res_mask = _mm512_mask_cmpeq_epi64_mask(lane_mask, v_data, v_key);
+}
 
-__m512i v_data = _mm512_and_si512(v_blocks, v_mask);
-uint32_t res_mask = _mm512_mask_cmpeq_epi64_mask(lane_mask, v_data, v_key);
+if (mf_bits_total > 8) {
+uint32_t lane_mask_gt8 = lane_mask >> 8;
+__m512i v_blocks = _mm512_loadu_si512(&block_cache[8]);
+__m512i v_mask   = _mm512_maskz_loadu_epi64(lane_mask_gt8, &maskp[8]);
+__m512i v_key= _mm512_maskz_loadu_epi64(lane_mask_gt8, &keyp[8]);
+__m512i v_data = _mm512_and_si512(v_blocks, v_mask);
+uint32_t c = _mm512_mask_cmpeq_epi64_mask(lane_mask_gt8, v_data, 
v_key);
+res_mask |= (c << 8);
+}
 
-/* returns 1 assuming result of SIMD compare is all blocks. */
+/* returns 1 assuming result of SIMD compare is all blocks matching. */
 return res_mask == lane_mask;
 }
 
+/* Takes u0 and u1 inputs, and gathers the next 8 blocks to be stored
+ * contigously into the blocks cache. Note that the pointers and bitmasks
+ * passed into this function must be incremented for handling next 8 blocks.
+ */
+static inline ALWAYS_INLINE __m512i
+avx512_blocks_gather(__m512i v_u0, /* reg of u64 of all u0 bits */
+   

[ovs-dev] [PATCH v6 02/15] dpif-netdev: Refactor to multiple header files

2020-12-08 Thread Harry van Haaren
Split the very large file dpif-netdev.c and the datastructures
it contains into multiple header files. Each header file is
responsible for the datastructures of that component.

This logical split allows better reuse and modularity of the code,
and reduces the very large file dpif-netdev.c to be more managable.

Due to dependencies between components, it is not possible to
move component in smaller granularities than this patch.

To explain the dependencies better, eg:

DPCLS has no deps (from dpif-netdev.c file)
FLOW depends on DPCLS (struct dpcls_rule)
DFC depends on DPCLS (netdev_flow_key) and FLOW (netdev_flow_key)
THREAD depends on DFC (struct dfc_cache)

DFC_PROC depends on THREAD (struct pmd_thread)

DPCLS lookup.h/c require only DPCLS
DPCLS implementations require only dpif-netdev-lookup.h.
- This change was made in 2.12 release with function pointers
- This commit only refactors the name to "private-dpcls.h"

Signed-off-by: Harry van Haaren 
Co-authored-by: Cian Ferriter 
Signed-off-by: Cian Ferriter 
---
 lib/automake.mk|   4 +
 lib/dpif-netdev-lookup-autovalidator.c |   1 -
 lib/dpif-netdev-lookup-avx512-gather.c |   1 -
 lib/dpif-netdev-lookup-generic.c   |   1 -
 lib/dpif-netdev-lookup.h   |   2 +-
 lib/dpif-netdev-private-dfc.h  | 244 
 lib/dpif-netdev-private-dpcls.h| 129 ++
 lib/dpif-netdev-private-flow.h | 162 
 lib/dpif-netdev-private-thread.h   | 206 ++
 lib/dpif-netdev-private.h  | 100 +
 lib/dpif-netdev.c  | 519 +
 11 files changed, 760 insertions(+), 609 deletions(-)
 create mode 100644 lib/dpif-netdev-private-dfc.h
 create mode 100644 lib/dpif-netdev-private-dpcls.h
 create mode 100644 lib/dpif-netdev-private-flow.h
 create mode 100644 lib/dpif-netdev-private-thread.h

diff --git a/lib/automake.mk b/lib/automake.mk
index 380a67228..22a281fcc 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -111,6 +111,10 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev-lookup-generic.c \
lib/dpif-netdev.c \
lib/dpif-netdev.h \
+   lib/dpif-netdev-private-dfc.h \
+   lib/dpif-netdev-private-dpcls.h \
+   lib/dpif-netdev-private-flow.h \
+   lib/dpif-netdev-private-thread.h \
lib/dpif-netdev-private.h \
lib/dpif-netdev-perf.c \
lib/dpif-netdev-perf.h \
diff --git a/lib/dpif-netdev-lookup-autovalidator.c 
b/lib/dpif-netdev-lookup-autovalidator.c
index 97b59fdd0..475e1ab1e 100644
--- a/lib/dpif-netdev-lookup-autovalidator.c
+++ b/lib/dpif-netdev-lookup-autovalidator.c
@@ -17,7 +17,6 @@
 #include 
 #include "dpif-netdev.h"
 #include "dpif-netdev-lookup.h"
-#include "dpif-netdev-private.h"
 #include "openvswitch/vlog.h"
 
 VLOG_DEFINE_THIS_MODULE(dpif_lookup_autovalidator);
diff --git a/lib/dpif-netdev-lookup-avx512-gather.c 
b/lib/dpif-netdev-lookup-avx512-gather.c
index 5e3634249..8fc1cdfa5 100644
--- a/lib/dpif-netdev-lookup-avx512-gather.c
+++ b/lib/dpif-netdev-lookup-avx512-gather.c
@@ -21,7 +21,6 @@
 
 #include "dpif-netdev.h"
 #include "dpif-netdev-lookup.h"
-#include "dpif-netdev-private.h"
 #include "cmap.h"
 #include "flow.h"
 #include "pvector.h"
diff --git a/lib/dpif-netdev-lookup-generic.c b/lib/dpif-netdev-lookup-generic.c
index b1a0cfc36..e3b6be4b6 100644
--- a/lib/dpif-netdev-lookup-generic.c
+++ b/lib/dpif-netdev-lookup-generic.c
@@ -17,7 +17,6 @@
 
 #include 
 #include "dpif-netdev.h"
-#include "dpif-netdev-private.h"
 #include "dpif-netdev-lookup.h"
 
 #include "bitmap.h"
diff --git a/lib/dpif-netdev-lookup.h b/lib/dpif-netdev-lookup.h
index bd72aa29b..59f51faa0 100644
--- a/lib/dpif-netdev-lookup.h
+++ b/lib/dpif-netdev-lookup.h
@@ -19,7 +19,7 @@
 
 #include 
 #include "dpif-netdev.h"
-#include "dpif-netdev-private.h"
+#include "dpif-netdev-private-dpcls.h"
 
 /* Function to perform a probe for the subtable bit fingerprint.
  * Returns NULL if not valid, or a valid function pointer to call for this
diff --git a/lib/dpif-netdev-private-dfc.h b/lib/dpif-netdev-private-dfc.h
new file mode 100644
index 0..8f6a4899e
--- /dev/null
+++ b/lib/dpif-netdev-private-dfc.h
@@ -0,0 +1,244 @@
+/*
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
+ * Copyright (c) 2019, 2020 Intel Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DPIF_NETDEV_PRIVATE_DFC_H
+#define DPIF_NETDEV_PRIVATE_DFC_H 1
+
+#include 

[ovs-dev] [PATCH v6 08/15] dpif-netdev: Add command to get dpif implementations

2020-12-08 Thread Harry van Haaren
This commit adds a new command to retrieve the list of available
DPIF implementations. This can be used by to check what implementations
of the DPIF are available in any given OVS binary.

Usage:
 $ ovs-appctl dpif-netdev/dpif-get

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev-private-dpif.c |  7 +++
 lib/dpif-netdev-private-dpif.h |  6 ++
 lib/dpif-netdev.c  | 24 
 3 files changed, 37 insertions(+)

diff --git a/lib/dpif-netdev-private-dpif.c b/lib/dpif-netdev-private-dpif.c
index 9e1f3b8f9..c5021fe9f 100644
--- a/lib/dpif-netdev-private-dpif.c
+++ b/lib/dpif-netdev-private-dpif.c
@@ -61,6 +61,13 @@ dp_netdev_impl_get_default(void)
 return func;
 }
 
+uint32_t
+dp_netdev_impl_get(const struct dpif_netdev_impl_info_t **out_impls)
+{
+ovs_assert(out_impls);
+*out_impls = dpif_impls;
+return ARRAY_SIZE(dpif_impls);
+}
 
 /* This function checks all available DPIF implementations, and selects the
  * returns the function pointer to the one requested by "name".
diff --git a/lib/dpif-netdev-private-dpif.h b/lib/dpif-netdev-private-dpif.h
index a09f90acc..99fbda943 100644
--- a/lib/dpif-netdev-private-dpif.h
+++ b/lib/dpif-netdev-private-dpif.h
@@ -47,6 +47,12 @@ struct dpif_netdev_impl_info_t {
 const char *name;
 };
 
+/* This function returns all available implementations to the caller. The
+ * quantity of implementations is returned by the int return value.
+ */
+uint32_t
+dp_netdev_impl_get(const struct dpif_netdev_impl_info_t **out_impls);
+
 /* This function checks all available DPIF implementations, and selects the
  * returns the function pointer to the one requested by "name".
  */
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 2a0b103c3..4c074995c 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -990,6 +990,27 @@ dpif_netdev_subtable_lookup_set(struct unixctl_conn *conn, 
int argc,
 ds_destroy(&reply);
 }
 
+static void
+dpif_netdev_impl_get(struct unixctl_conn *conn, int argc OVS_UNUSED,
+ const char *argv[] OVS_UNUSED, void *aux OVS_UNUSED)
+{
+const struct dpif_netdev_impl_info_t *dpif_impls;
+uint32_t count = dp_netdev_impl_get(&dpif_impls);
+if (count == 0) {
+unixctl_command_reply_error(conn, "error getting dpif names");
+return;
+}
+
+/* Add all dpif functions to reply string. */
+struct ds reply = DS_EMPTY_INITIALIZER;
+ds_put_cstr(&reply, "Available DPIF implementations:\n");
+for (uint32_t i = 0; i < count; i++) {
+ds_put_format(&reply, "  %s\n", dpif_impls[i].name);
+}
+unixctl_command_reply(conn, ds_cstr(&reply));
+ds_destroy(&reply);
+}
+
 static void
 dpif_netdev_impl_set(struct unixctl_conn *conn, int argc,
  const char *argv[], void *aux OVS_UNUSED)
@@ -1288,6 +1309,9 @@ dpif_netdev_init(void)
  "[dpif implementation name] [dp]",
  1, 2, dpif_netdev_impl_set,
  NULL);
+unixctl_command_register("dpif-netdev/dpif-get", "",
+ 0, 0, dpif_netdev_impl_get,
+ NULL);
 return 0;
 }
 
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 06/15] dpif-avx512: Add HWOL support to avx512 dpif

2020-12-08 Thread Harry van Haaren
Partial hardware offload is implemented in a very similar way to the
scalar dpif.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev-avx512.c | 28 +---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c
index b2d437b2b..e0803136e 100644
--- a/lib/dpif-netdev-avx512.c
+++ b/lib/dpif-netdev-avx512.c
@@ -27,6 +27,7 @@
 #include "dpif-netdev-private-dpcls.h"
 #include "dpif-netdev-private-flow.h"
 #include "dpif-netdev-private-thread.h"
+#include "dpif-netdev-private-hwol.h"
 
 #include "dp-packet.h"
 #include "netdev.h"
@@ -98,9 +99,32 @@ dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread 
*pmd,
 uint32_t i = __builtin_ctz(iter);
 iter = _blsr_u64(iter);
 
-/* Initialize packet md and do miniflow extract */
+/* Get packet pointer from bitmask and packet md */
 struct dp_packet *packet = packets->packets[i];
 pkt_metadata_init(&packet->md, in_port);
+
+struct dp_netdev_flow *f = NULL;
+
+/* Check for partial hardware offload mark */
+uint32_t mark;
+if (dp_packet_has_flow_mark(packet, &mark)) {
+f = mark_to_flow_find(pmd, mark);
+if (f) {
+rules[i] = &f->cr;
+
+/* This is nasty - instead of using the HWOL provided flow,
+ * parse the packet data anyway to find the location of the TCP
+ * header to extract the TCP flags for the rule.
+ */
+pkt_meta[i].tcp_flags = parse_tcp_flags(packet);
+
+pkt_meta[i].bytes = dp_packet_size(packet);
+hwol_emc_smc_hitmask |= (1 << i);
+continue;
+}
+}
+
+/* Do miniflow extract into keys */
 struct netdev_flow_key *key = &keys[i];
 miniflow_extract(packet, &key->mf);
 
@@ -111,8 +135,6 @@ dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread 
*pmd,
 key->len = netdev_flow_key_size(miniflow_n_values(&key->mf));
 key->hash = dpif_netdev_packet_get_rss_hash_orig_pkt(packet, &key->mf);
 
-struct dp_netdev_flow *f = NULL;
-
 if (emc_enabled) {
 f = emc_lookup(&cache->emc_cache, key);
 
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 07/15] dpif-netdev: Add command to switch dpif implementation

2020-12-08 Thread Harry van Haaren
This commit adds a new command to allow the user to switch
the active DPIF implementation at runtime. A probe function
is executed before switching the DPIF implementation, to ensure
the CPU is capable of running the ISA required. For example, the
below code will switch to the AVX512 enabled DPIF assuming
that the runtime CPU is capable of running AVX512 instructions:

 $ ovs-appctl dpif-netdev/dpif-set dpif_avx512

A new configuration flag is added to allow selection of the
default DPIF. This is useful for running the unit-tests against
the available DPIF implementations, without modifying each unit test.

The design of the testing & validation for ISA optimized DPIF
implementations is based around the work already upstream for DPCLS.
Note however that a DPCLS lookup has no state or side-effects, allowing
the auto-validator implementation to perform multiple lookups and
provide consistent statistic counters.

The DPIF component does have state, so running two implementations in
parallel and comparing output is not a valid testing method, as there
are changes in DPIF statistic counters (side effects). As a result, the
DPIF is tested directly against the unit-tests.

Signed-off-by: Harry van Haaren 
Co-authored-by: Cian Ferriter 
Signed-off-by: Cian Ferriter 
---
 acinclude.m4 | 15 ++
 configure.ac |  1 +
 lib/automake.mk  |  1 +
 lib/dpif-netdev-avx512.c | 14 +
 lib/dpif-netdev-private-dpif.c   | 92 
 lib/dpif-netdev-private-dpif.h   | 43 ++-
 lib/dpif-netdev-private-thread.h | 12 +
 lib/dpif-netdev.c| 86 +++--
 8 files changed, 248 insertions(+), 16 deletions(-)
 create mode 100644 lib/dpif-netdev-private-dpif.c

diff --git a/acinclude.m4 b/acinclude.m4
index 2fd9aa255..aa99679b2 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -30,6 +30,21 @@ AC_DEFUN([OVS_CHECK_DPCLS_AUTOVALIDATOR], [
   fi
 ])
 
+dnl Set OVS DPIF default implementation at configure time for running the unit
+dnl tests on the whole codebase without modifying tests per DPIF impl
+AC_DEFUN([OVS_CHECK_DPIF_AVX512_DEFAULT], [
+  AC_ARG_ENABLE([dpif-default-avx512],
+[AC_HELP_STRING([--enable-dpif-default-avx512], [Enable DPIF 
AVX512 implementation as default.])],
+[dpifavx512=yes],[dpifavx512=no])
+  AC_MSG_CHECKING([whether DPIF AVX512 is default implementation])
+  if test "$dpifavx512" != yes; then
+AC_MSG_RESULT([no])
+  else
+OVS_CFLAGS="$OVS_CFLAGS -DDPIF_AVX512_DEFAULT"
+AC_MSG_RESULT([yes])
+  fi
+])
+
 dnl OVS_ENABLE_WERROR
 AC_DEFUN([OVS_ENABLE_WERROR],
   [AC_ARG_ENABLE(
diff --git a/configure.ac b/configure.ac
index 126a1d9d1..76b1e4fec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -185,6 +185,7 @@ OVS_ENABLE_WERROR
 OVS_ENABLE_SPARSE
 OVS_CTAGS_IDENTIFIERS
 OVS_CHECK_DPCLS_AUTOVALIDATOR
+OVS_CHECK_DPIF_AVX512_DEFAULT
 OVS_CHECK_BINUTILS_AVX512
 
 AC_ARG_VAR(KARCH, [Kernel Architecture String])
diff --git a/lib/automake.mk b/lib/automake.mk
index 650207940..2a41f7ab5 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -115,6 +115,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev.h \
lib/dpif-netdev-private-dfc.h \
lib/dpif-netdev-private-dpcls.h \
+   lib/dpif-netdev-private-dpif.c \
lib/dpif-netdev-private-dpif.h \
lib/dpif-netdev-private-flow.h \
lib/dpif-netdev-private-hwol.h \
diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c
index e0803136e..6fe68ea7c 100644
--- a/lib/dpif-netdev-avx512.c
+++ b/lib/dpif-netdev-avx512.c
@@ -19,6 +19,7 @@
 #if !defined(__CHECKER__)
 
 #include 
+#include 
 
 #include "dpif-netdev.h"
 #include "dpif-netdev-perf.h"
@@ -45,6 +46,19 @@ struct pkt_flow_meta {
 uint16_t tcp_flags;
 };
 
+int32_t
+dp_netdev_input_outer_avx512_probe(void)
+{
+int avx512f_available = dpdk_get_cpu_has_isa("x86_64", "avx512f");
+int bmi2_available = dpdk_get_cpu_has_isa("x86_64", "bmi2");
+
+if (!avx512f_available || !bmi2_available) {
+return -ENOTSUP;
+}
+
+return 0;
+}
+
 int32_t
 dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd,
  struct dp_packet_batch *packets,
diff --git a/lib/dpif-netdev-private-dpif.c b/lib/dpif-netdev-private-dpif.c
new file mode 100644
index 0..9e1f3b8f9
--- /dev/null
+++ b/lib/dpif-netdev-private-dpif.c
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2020 Intel Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the Licen

[ovs-dev] [PATCH v6 05/15] dpif-avx512: Add ISA implementation of dpif

2020-12-08 Thread Harry van Haaren
This commit adds the AVX512 implementation of DPIF functionality,
specifically the dp_netdev_input_outer_avx512 function. This function
only handles outer (no re-circulations), and is optimized to use the
AVX512 ISA for packet batching and other DPIF work.

Sparse is not able to handle the AVX512 intrinsics, causing compile
time failures, so it is disabled for this file.

Signed-off-by: Harry van Haaren 
Co-authored-by: Cian Ferriter 
Signed-off-by: Cian Ferriter 
---
 lib/automake.mk  |   5 +-
 lib/dpif-netdev-avx512.c | 250 +++
 lib/dpif-netdev-private-dfc.h|   8 +
 lib/dpif-netdev-private-dpif.h   |  32 
 lib/dpif-netdev-private-thread.h |  11 +-
 lib/dpif-netdev-private.h|  25 
 lib/dpif-netdev.c|  70 +++--
 7 files changed, 385 insertions(+), 16 deletions(-)
 create mode 100644 lib/dpif-netdev-avx512.c
 create mode 100644 lib/dpif-netdev-private-dpif.h

diff --git a/lib/automake.mk b/lib/automake.mk
index eccfaf3e3..650207940 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -33,11 +33,13 @@ lib_libopenvswitchavx512_la_CFLAGS = \
-mavx512f \
-mavx512bw \
-mavx512dq \
+   -mbmi \
-mbmi2 \
-fPIC \
$(AM_CFLAGS)
 lib_libopenvswitchavx512_la_SOURCES = \
-   lib/dpif-netdev-lookup-avx512-gather.c
+   lib/dpif-netdev-lookup-avx512-gather.c \
+   lib/dpif-netdev-avx512.c
 lib_libopenvswitchavx512_la_LDFLAGS = \
-static
 endif
@@ -113,6 +115,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev.h \
lib/dpif-netdev-private-dfc.h \
lib/dpif-netdev-private-dpcls.h \
+   lib/dpif-netdev-private-dpif.h \
lib/dpif-netdev-private-flow.h \
lib/dpif-netdev-private-hwol.h \
lib/dpif-netdev-private-thread.h \
diff --git a/lib/dpif-netdev-avx512.c b/lib/dpif-netdev-avx512.c
new file mode 100644
index 0..b2d437b2b
--- /dev/null
+++ b/lib/dpif-netdev-avx512.c
@@ -0,0 +1,250 @@
+/*
+ * Copyright (c) 2020 Intel.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifdef __x86_64__
+/* Sparse cannot handle the AVX512 instructions */
+#if !defined(__CHECKER__)
+
+#include 
+
+#include "dpif-netdev.h"
+#include "dpif-netdev-perf.h"
+
+#include "dpif-netdev-private.h"
+#include "dpif-netdev-private-dpcls.h"
+#include "dpif-netdev-private-flow.h"
+#include "dpif-netdev-private-thread.h"
+
+#include "dp-packet.h"
+#include "netdev.h"
+
+#include "immintrin.h"
+
+
+/* Structure to contain per-packet metadata that must be attributed to the
+ * dp netdev flow. This is unfortunate to have to track per packet, however
+ * it's a bit awkward to maintain them in a performant way. This structure
+ * helps to keep two variables on a single cache line per packet.
+ */
+struct pkt_flow_meta {
+uint16_t bytes;
+uint16_t tcp_flags;
+};
+
+int32_t
+dp_netdev_input_outer_avx512(struct dp_netdev_pmd_thread *pmd,
+ struct dp_packet_batch *packets,
+ odp_port_t in_port)
+{
+OVS_ALIGNED_VAR(CACHE_LINE_SIZE)
+struct netdev_flow_key keys[NETDEV_MAX_BURST];
+OVS_ALIGNED_VAR(CACHE_LINE_SIZE)
+struct netdev_flow_key *key_ptrs[NETDEV_MAX_BURST];
+OVS_ALIGNED_VAR(CACHE_LINE_SIZE)
+struct pkt_flow_meta pkt_meta[NETDEV_MAX_BURST];
+
+/* Stores the computed output: a rule pointer for each packet */
+/* The AVX512 DPIF implementation handles rules in a way that is optimized
+ * for reducing data-movement between HWOL/EMC/SMC and DPCLS. This is
+ * achieved by separating the rule arrays. Bitmasks are kept for each
+ * packet, indicating if it matched in the HWOL/EMC/SMC array or DPCLS
+ * array. Later the two arrays are merged by AVX-512 expand instructions.
+ */
+struct dpcls_rule *rules[NETDEV_MAX_BURST];
+struct dpcls_rule *dpcls_rules[NETDEV_MAX_BURST];
+uint32_t dpcls_key_idx = 0;
+
+for (uint32_t i = 0; i < NETDEV_MAX_BURST; i += 8) {
+_mm512_storeu_si512(&rules[i], _mm512_setzero_si512());
+_mm512_storeu_si512(&dpcls_rules[i], _mm512_setzero_si512());
+}
+
+/* Prefetch each packet's metadata */
+const size_t batch_size = dp_packet_batch_size(packets);
+for (int i = 0; i < batch_size; i++) {
+struct dp_packet *packet = packets->packets[i];
+OVS_PREFETCH(dp_packet_data(packet));
+pkt_metadata_prefetch_init(&packet->md);

[ovs-dev] [PATCH v6 04/15] dpif-netdev: Add function pointer for netdev input

2020-12-08 Thread Harry van Haaren
This commit adds a function pointer to the pmd thread data structure,
giving the pmd thread flexibility in its dpif-input function choice.
This allows choosing of the implementation based on ISA capabilities
of the runtime CPU, leading to optimizations and higher performance.

Signed-off-by: Harry van Haaren 
---
 lib/dpif-netdev-private-thread.h | 10 ++
 lib/dpif-netdev.c|  7 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/lib/dpif-netdev-private-thread.h b/lib/dpif-netdev-private-thread.h
index a5b3ae360..ecd6aa977 100644
--- a/lib/dpif-netdev-private-thread.h
+++ b/lib/dpif-netdev-private-thread.h
@@ -47,6 +47,13 @@ struct dp_netdev_pmd_thread_ctx {
 uint32_t emc_insert_min;
 };
 
+/* Forward declaration for typedef */
+struct dp_netdev_pmd_thread;
+
+typedef void (*dp_netdev_input_func)(struct dp_netdev_pmd_thread *pmd,
+ struct dp_packet_batch *packets,
+ odp_port_t port_no);
+
 /* PMD: Poll modes drivers.  PMD accesses devices via polling to eliminate
  * the performance overhead of interrupt processing.  Therefore netdev can
  * not implement rx-wait for these devices.  dpif-netdev needs to poll
@@ -101,6 +108,9 @@ struct dp_netdev_pmd_thread {
 /* Current context of the PMD thread. */
 struct dp_netdev_pmd_thread_ctx ctx;
 
+/* Function pointer to call for dp_netdev_input() functionality */
+dp_netdev_input_func netdev_input_func;
+
 struct seq *reload_seq;
 uint64_t last_reload_seq;
 
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 55fbf0f16..dfdcf6218 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -4177,8 +4177,9 @@ dp_netdev_process_rxq_port(struct dp_netdev_pmd_thread 
*pmd,
 }
 }
 }
+
 /* Process packet batch. */
-dp_netdev_input(pmd, &batch, port_no);
+pmd->netdev_input_func(pmd, &batch, port_no);
 
 /* Assign processing cycles to rx queue. */
 cycles = cycle_timer_stop(&pmd->perf_stats, &timer);
@@ -5962,6 +5963,10 @@ dp_netdev_configure_pmd(struct dp_netdev_pmd_thread 
*pmd, struct dp_netdev *dp,
 hmap_init(&pmd->tnl_port_cache);
 hmap_init(&pmd->send_port_cache);
 cmap_init(&pmd->tx_bonds);
+
+/* Initialize the DPIF function pointer to the default scalar version */
+pmd->netdev_input_func = dp_netdev_input;
+
 /* init the 'flow_cache' since there is no
  * actual thread created for NON_PMD_CORE_ID. */
 if (core_id == NON_PMD_CORE_ID) {
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 01/15] dpdk: Update to use DPDK v20.11.

2020-12-08 Thread Harry van Haaren
From: Ian Stokes 

This commit adds support for DPDK v20.11, it includes the following
changes.

1. travis: Remove explicit DPDK kmods configuration.
2. sparse: Fix build with 20.05 DPDK tracepoints.
3. netdev-dpdk: Remove experimental API flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216&state=*

4. sparse: Update to DPDK 20.05 trace point header.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604&state=*

5. sparse: Fix build with DPDK 20.08.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181&state=*

6. build: Add support for DPDK meson build.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138&state=*

7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850&state=*

8. netdev-dpdk: Fix build with 20.11-rc1.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006&state=*

9. sparse: Fix __ATOMIC_* redefinition errors

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452&state=*

10. build: Remove DPDK make build references.

   http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682&state=*

For credit all authors of the original commits to 'dpdk-latest' with the
above changes have been added as co-authors for this commit.

Signed-off-by: David Marchand 
Co-authored-by: David Marchand 
Signed-off-by: Sunil Pai G 
Co-authored-by: Sunil Pai G 
Signed-off-by: Eli Britstein 
Co-authored-by: Eli Britstein 
Signed-off-by: Ian Stokes 
---
 .ci/linux-build.sh   | 48 +--
 .ci/linux-prepare.sh |  1 +
 .github/workflows/build-and-test.yml | 10 ++-
 .travis.yml  |  3 +
 Documentation/intro/install/afxdp.rst|  2 +-
 Documentation/intro/install/dpdk.rst | 64 ++-
 Documentation/topics/dpdk/phy.rst| 18 --
 Documentation/topics/dpdk/vhost-user.rst | 20 +-
 Documentation/topics/testing.rst |  2 +-
 NEWS |  1 +
 acinclude.m4 | 78 ++--
 include/sparse/automake.mk   |  2 +
 include/sparse/rte_mbuf.h| 29 +
 include/sparse/rte_trace_point.h | 28 +
 lib/dpdk.c   |  2 +-
 lib/netdev-dpdk.c| 20 ++
 16 files changed, 190 insertions(+), 138 deletions(-)
 create mode 100644 include/sparse/rte_mbuf.h
 create mode 100644 include/sparse/rte_trace_point.h

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 16102ac94..3e5136fd4 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -87,17 +87,29 @@ function install_dpdk()
 {
 local DPDK_VER=$1
 local VERSION_FILE="dpdk-dir/travis-dpdk-cache-version"
+local DPDK_OPTS=""
+local DPDK_LIB=""
 
 if [ -z "$TRAVIS_ARCH" ] ||
[ "$TRAVIS_ARCH" == "amd64" ]; then
-TARGET="x86_64-native-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/x86_64-linux-gnu
 elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
-TARGET="arm64-armv8a-linuxapp-gcc"
+DPDK_LIB=$(pwd)/dpdk-dir/build/lib/aarch64-linux-gnu
 else
 echo "Target is unknown"
 exit 1
 fi
 
+if [ "$DPDK_SHARED" ]; then
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=shared"
+export LD_LIBRARY_PATH=$DPDK_LIB/:$LD_LIBRARY_PATH
+else
+EXTRA_OPTS="$EXTRA_OPTS --with-dpdk=static"
+fi
+
+# Export the following path for pkg-config to find the .pc file.
+export PKG_CONFIG_PATH=$DPDK_LIB/pkgconfig/:$PKG_CONFIG_PATH
+
 if [ "${DPDK_VER##refs/*/}" != "${DPDK_VER}" ]; then
 # Avoid using cache for git tree build.
 rm -rf dpdk-dir
@@ -110,7 +122,8 @@ function install_dpdk()
 if [ -f "${VERSION_FILE}" ]; then
 VER=$(cat ${VERSION_FILE})
 if [ "${VER}" = "${DPDK_VER}" ]; then
-EXTRA_OPTS="${EXTRA_OPTS} --with-dpdk=$(pwd)/dpdk-dir/build"
+# Update the library paths.
+sudo ldconfig
 echo "Found cached DPDK ${VER} build in $(pwd)/dpdk-dir"
 return
 fi
@@ -124,23 +137,24 @@ function install_dpdk()
 pushd dpdk-dir
 fi
 
-make config CC=gcc T=$TARGET
+# Switching to 'default' machine to make dpdk-dir cache usable on
+# different CPUs. We can't be sure that all CI machines are exactly same.
+DPDK_OPTS="$DPDK_OPTS -Dmachine=default"
 
-if [ "$DPDK_SHARED" ]; then
-sed -i '/CONFIG_RTE_BUILD_SHARED_LIB=n/s/=n/=y/' build/.config
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/$TARGET/lib
-fi
+# Disable building DPDK unit tests. Not needed for OVS build or tests.
+DPDK_OPTS="$DPDK_OPTS -Dtests=false"
+
+# Install DPDK using prefix.
+DPDK_OPTS="$DPDK_OPTS --prefix=$(pwd)/build"
+
+CC=gcc meson $DPDK_OPTS build
+   

[ovs-dev] [PATCH v6 03/15] dpif-netdev: Split HWOL out to own header file

2020-12-08 Thread Harry van Haaren
This commit moves the datapath lookup functions required for
hardware offload to a seperate file. This allows other DPIF
implementations to access the lookup functions, encouraging
code reuse.

Signed-off-by: Harry van Haaren 
---
 lib/automake.mk|  1 +
 lib/dpif-netdev-private-hwol.h | 63 ++
 lib/dpif-netdev.c  | 39 ++---
 3 files changed, 67 insertions(+), 36 deletions(-)
 create mode 100644 lib/dpif-netdev-private-hwol.h

diff --git a/lib/automake.mk b/lib/automake.mk
index 22a281fcc..eccfaf3e3 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -114,6 +114,7 @@ lib_libopenvswitch_la_SOURCES = \
lib/dpif-netdev-private-dfc.h \
lib/dpif-netdev-private-dpcls.h \
lib/dpif-netdev-private-flow.h \
+   lib/dpif-netdev-private-hwol.h \
lib/dpif-netdev-private-thread.h \
lib/dpif-netdev-private.h \
lib/dpif-netdev-perf.c \
diff --git a/lib/dpif-netdev-private-hwol.h b/lib/dpif-netdev-private-hwol.h
new file mode 100644
index 0..447010ab8
--- /dev/null
+++ b/lib/dpif-netdev-private-hwol.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
+ * Copyright (c) 2020 Intel Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DPIF_NETDEV_PRIVATE_HWOL_H
+#define DPIF_NETDEV_PRIVATE_HWOL_H 1
+
+#include "dpif-netdev-private-flow.h"
+
+#define MAX_FLOW_MARK   (UINT32_MAX - 1)
+#define INVALID_FLOW_MARK   0
+/* Zero flow mark is used to indicate the HW to remove the mark. A packet
+ * marked with zero mark is received in SW without a mark at all, so it
+ * cannot be used as a valid mark.
+ */
+
+struct megaflow_to_mark_data {
+const struct cmap_node node;
+ovs_u128 mega_ufid;
+uint32_t mark;
+};
+
+struct flow_mark {
+struct cmap megaflow_to_mark;
+struct cmap mark_to_flow;
+struct id_pool *pool;
+};
+
+/* allocated in dpif-netdev.c */
+extern struct flow_mark flow_mark;
+
+static inline struct dp_netdev_flow *
+mark_to_flow_find(const struct dp_netdev_pmd_thread *pmd,
+  const uint32_t mark)
+{
+struct dp_netdev_flow *flow;
+
+CMAP_FOR_EACH_WITH_HASH (flow, mark_node, hash_int(mark, 0),
+ &flow_mark.mark_to_flow) {
+if (flow->mark == mark && flow->pmd_id == pmd->core_id &&
+flow->dead == false) {
+return flow;
+}
+}
+
+return NULL;
+}
+
+
+#endif /* dpif-netdev-private-hwol.h */
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 7be9d664e..55fbf0f16 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -84,6 +84,8 @@
 #include "util.h"
 #include "uuid.h"
 
+#include "dpif-netdev-private-hwol.h"
+
 VLOG_DEFINE_THIS_MODULE(dpif_netdev);
 
 /* Auto Load Balancing Defaults */
@@ -1949,26 +1951,8 @@ dp_netdev_pmd_find_dpcls(struct dp_netdev_pmd_thread 
*pmd,
 return cls;
 }
 
-#define MAX_FLOW_MARK   (UINT32_MAX - 1)
-#define INVALID_FLOW_MARK   0
-/* Zero flow mark is used to indicate the HW to remove the mark. A packet
- * marked with zero mark is received in SW without a mark at all, so it
- * cannot be used as a valid mark.
- */
-
-struct megaflow_to_mark_data {
-const struct cmap_node node;
-ovs_u128 mega_ufid;
-uint32_t mark;
-};
-
-struct flow_mark {
-struct cmap megaflow_to_mark;
-struct cmap mark_to_flow;
-struct id_pool *pool;
-};
 
-static struct flow_mark flow_mark = {
+struct flow_mark flow_mark = {
 .megaflow_to_mark = CMAP_INITIALIZER,
 .mark_to_flow = CMAP_INITIALIZER,
 };
@@ -2137,23 +2121,6 @@ flow_mark_flush(struct dp_netdev_pmd_thread *pmd)
 }
 }
 
-static struct dp_netdev_flow *
-mark_to_flow_find(const struct dp_netdev_pmd_thread *pmd,
-  const uint32_t mark)
-{
-struct dp_netdev_flow *flow;
-
-CMAP_FOR_EACH_WITH_HASH (flow, mark_node, hash_int(mark, 0),
- &flow_mark.mark_to_flow) {
-if (flow->mark == mark && flow->pmd_id == pmd->core_id &&
-flow->dead == false) {
-return flow;
-}
-}
-
-return NULL;
-}
-
 static struct dp_flow_offload_item *
 dp_netdev_alloc_flow_offload(struct dp_netdev_pmd_thread *pmd,
  struct dp_netdev_flow *flow,
-- 
2.25.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v6 00/15] DPIF Generic Framework

2020-12-08 Thread Harry van Haaren
v6 summary:
- Rebase to DPDK 20.11 enabling patch
--- This creates a dependency, expect CI build failures on the last
patch in this series if it is not applied!
- Small improvements to DPIF layer
--- EMC/SMC enabling in AVX512 DPIF cleanups
- CPU ISA flags are cached, lowering overhead
- Wilcard Classifier DPCLS
--- Refactor and cleanups for function names
--- Enable more subtable specializations
--- Enable AVX512 vpopcount instruction


v5 summary:
- Dropped MFEX optimizations, re-targetting to a later release
--- This allows focus of community reviews & development on DPIF
--- Note OVS Conference talk still introduces both DPIF and MFEX topics
- DPIF improvements
--- Better EMC/SMC handling
--- HWOL is enabled in the avx512 DPIF
--- Documentation & NEWS items added
--- Various smaller improvements

v4 summary:
- Updated and improve DPIF component
--- SMC now implemented
--- EMC handling improved
--- Novel batching method using AVX512 implemented
--- see commits for details
- Updated Miniflow Extract component
--- Improved AVX512 code path performance
--- Implemented multiple TODO item's in v3
--- Add "disable" implementation to return to scalar miniflow only
--- More fixes planned for v5/future revisions:
 Rename command to better reflect usage
 Improve dynamicness of patterns
 Add more demo protocols to show usage
- Future work
--- Documentation/NEWS items
--- Statistics for optimized MFEX
- Note that this patchset will be discussed/presented at OvsConf soon :)

v3 update summary:
(Cian Ferriter helping with rebases, review and code cleanups)
- Split out partially related changes (these will be sent separately)
--- netdev output action optimization
--- avx512 dpcls 16-block support optimization
- Squash commit which moves netdev struct flow into the refactor commit:
--- Squash dpif-netdev: move netdev flow struct to header
--- Into dpif-netdev: Refactor to multiple header files
- Implement Miniflow extract for AVX-512 DPIF
--- A generic method of matching patterns and packets is implemented,
providing traffic-pattern specific miniflow-extract acceleration.
--- The patterns today are hard-coded, however in a future patchset it
is intended to make these runtime configurable, allowing users to
optimize the SIMD miniflow extract for active traffic types.
- Notes:
--- 32 bit builds will be fixed in next release by adding flexible
miniflow extract optimization selection.
--- AVX-512 VBMI ISA is not yet supported in OVS due to requiring the
DPDK 20.11 update for RTE_CPUFLAG_*. Once on a newer DPDK this will
be added.

v2 updates:
- Includes DPIF command switching at runtime
- Includes AVX512 DPIF implementation
- Includes some partially related changes (can be split out of set?)
--- netdev output action optimization
--- avx512 dpcls 16-block support optimization


This patchset is a v6 for making the DPIF components of the
userspace datapath more flexible. It has been refactored to be
more modular to encourage code-reuse, and scalable in that ISA
optimized implementations can be added and selected at runtime.

The same approach as has been previously used for DPCLS is used
here, where a function pointer allows selection of an implementation
at runtime.

Datapath features such as EMC, SMC and HWOL are shared between
implementations, hence they are refactored into seperate header files.
The file splitting also improves maintainability, as dpif_netdev.c
has ~9000 LOC, and very hard to modify due to many structs defined
locally in the .c file, ruling out re-usability in other .c files.

Questions welcomed! Regards, -Harry


*** BLURB HERE ***

Cian Ferriter (1):
  docs/dpdk/bridge: Add dpif performance section

Harry van Haaren (13):
  dpif-netdev: Refactor to multiple header files
  dpif-netdev: Split HWOL out to own header file
  dpif-netdev: Add function pointer for netdev input
  dpif-avx512: Add ISA implementation of dpif
  dpif-avx512: Add HWOL support to avx512 dpif
  dpif-netdev: Add command to switch dpif implementation
  dpif-netdev: Add command to get dpif implementations
  dpif-netdev: Move pmd_try_optimize function in file
  dpif-netdev/dpcls: Refactor function names to dpcls
  dpif-netdev/dpcls-avx512: enable 16 block processing
  dpif-netdev/dpcls: specialize more subtable signatures
  dpdk: Cache result of CPU ISA checks
  dpcls-avx512: enabling avx512 vector popcount instruction

Ian Stokes (1):
  dpdk: Update to use DPDK v20.11.

 .ci/linux-build.sh   |  48 +-
 .ci/linux-prepare.sh |   1 +
 .github/workflows/build-and-test.yml |  10 +-
 .travis.yml  |   3 +
 Documentation/intro/install/afxdp.rst|   2 +-
 Documentation/intro/install/dpdk.rst |  64 +-
 Documentation/topics/dpdk/bridge.rst |  37 +
 Documentation/topics/dpdk/phy.rst|  18 +-
 Documentation/topics/dpdk/vhost-user.rst |  20 +-
 Documentation/topics/testing.rst |   2 +-
 NEWS 

[ovs-dev] Helo

2020-12-08 Thread chalotrobbin103

I've invited you to fill out the following form:
Untitled form

To fill it out, visit:
https://docs.google.com/forms/d/e/1FAIpQLSeXlA4g8q8MsLckMHwjgR2w4nIrh8gg2VVveQRz3Tlnf3uQXw/viewform?vc=0&c=0&w=1&flr=0&usp=mail_form_link

Dear Friend

I am Eustace Robert James , Manager Finance and Account, Shell Oil &  
Gas company, 777 Walker St l100, Houston, TX 77002, United States. I have $  
30 Million dollars, for Investment.


Contact me if you are interested to enable this fund to be transferred into  
any of your accounts designated as a Contract Fund to avoid any query by  
the authority in your Country.


Upon receipt of your response to prove myself and office;

Contact me immediately for more details. email.:  
eustacerobertjame...@gmail.com

Regards,
Eustace Robert James
Manager Finance and Account
+15013823403

Google Forms: Create and analyze surveys.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn 2/2] nbctl: Use partial set updates instead of re-setting the whole column.

2020-12-08 Thread 0-day Robot
Bleep bloop.  Greetings Ilya Maximets, I am a robot and I have tried out your 
patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


build:
mv lib/ovn-dirs.c.tmp lib/ovn-dirs.c
depbase=`echo lib/ovn-dirs.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. 
  -I ./include  -I ./include -I ./ovn -I ./include -I ./lib -I ./lib -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/include
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/include
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/lib
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/lib
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR
-Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat 
-Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast 
-Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror  -g 
-O2 -MT lib/ovn-dirs.lo -MD -MP -MF $depbase.Tpo -c -o lib/ovn-dirs.lo 
lib/ovn-dirs.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I ./include -I ./include 
-I ./ovn -I ./include -I ./lib -I ./lib -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/include
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/include
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/lib
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/lib
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR 
-Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat 
-Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast 
-Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror -g 
-O2 -MT lib/ovn-dirs.lo -MD -MP -MF lib/.deps/ovn-dirs.Tpo -c lib/ovn-dirs.c -o 
lib/ovn-dirs.o
depbase=`echo lib/ovn-sb-idl.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ./libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. 
  -I ./include  -I ./include -I ./ovn -I ./include -I ./lib -I ./lib -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/include
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/include
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/lib
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/lib
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR
-Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat 
-Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast 
-Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror  -g 
-O2 -MT lib/ovn-sb-idl.lo -MD -MP -MF $depbase.Tpo -c -o lib/ovn-sb-idl.lo 
lib/ovn-sb-idl.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I ./include -I ./include 
-I ./ovn -I ./include -I ./lib -I ./lib -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/include
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/include
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/lib
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR/lib
 -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR -I 
/var/lib/jenkins/jobs/0day_robot_upstream_build_ovn_from_pw/workspace/OVSDIR 
-Wstrict-prototypes -Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat 
-Wformat-security -Wswitch-enum -Wunused-parameter -Wbad-function-cast 
-Wcast-align -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-aliasing -Wshadow -Werror -Werror -g 
-O2 -MT lib/ovn-sb-idl.lo -MD -MP -MF lib/.deps/ovn-sb-idl.Tpo -c 
lib/ovn-sb-idl.c -o lib/ovn-sb-idl.o
/bin/sh ./libtool  --tag=CC   --mode=link gcc -std=gnu99 -Wstrict-prototypes 
-Wall -Wextra -Wno-sign-compare -Wpointer-arith -Wformat -Wformat-security 
-Wswitch-enum -Wunused-parameter -Wbad-function-cast -Wcast-align 
-Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes 
-Wmissing-field-initializers -fno-strict-alias

Re: [ovs-dev] [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()

2020-12-08 Thread Eelco Chaudron



On 8 Dec 2020, at 13:13, Zheng Yongjun wrote:

> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun 

Change looks good to me.

Reviewed-by: Eelco Chaudron 

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK v20.11.

2020-12-08 Thread Govindharajan, Hariprasad



> -Original Message-
> From: Stokes, Ian 
> Sent: Tuesday, December 8, 2020 11:07 AM
> To: Van Haaren, Harry ;
> d...@openvswitch.org; Govindharajan, Hariprasad
> 
> Cc: el...@nvidia.com; i.maxim...@ovn.org; david.march...@redhat.com;
> bl...@debian.org
> Subject: RE: [ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK v20.11.
> 
> > > -Original Message-
> > > From: dev  On Behalf Of Ian
> Stokes
> > > Sent: Wednesday, December 2, 2020 1:02 PM
> > > To: d...@openvswitch.org
> > > Cc: el...@nvidia.com; i.maxim...@ovn.org;
> david.march...@redhat.com;
> > > bl...@debian.org
> > > Subject: [ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK v20.11.
> > >
> > > This commit adds support for DPDK v20.11, it includes the following
> > > changes.
> > >
> > > 1. travis: Remove explicit DPDK kmods configuration.
> > > 2. sparse: Fix build with 20.05 DPDK tracepoints.
> > > 3. netdev-dpdk: Remove experimental API flag.
> > >
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216&st
> > ate=*
> > >
> > > 4. sparse: Update to DPDK 20.05 trace point header.
> > >
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604&st
> > ate=*
> > >
> > > 5. sparse: Fix build with DPDK 20.08.
> > >
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181&st
> > ate=*
> > >
> > > 6. build: Add support for DPDK meson build.
> > >
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138&st
> > ate=*
> > >
> > > 7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag.
> > >
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850&st
> > ate=*
> > >
> > > 8. netdev-dpdk: Fix build with 20.11-rc1.
> > >
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006&st
> > ate=*
> > >
> > > 9. sparse: Fix __ATOMIC_* redefinition errors
> > >
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452&st
> > ate=*
> > >
> > > 10. build: Remove DPDK make build references.
> > >
> > >
> > http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682&st
> > ate=*
> > >
> > > For credit all authors of the original commits to 'dpdk-latest' with
> > > the above changes have been added as co-authors for this commit.
> > >
> > > Signed-off-by: David Marchand 
> > > Co-authored-by: David Marchand 
> > > Signed-off-by: Sunil Pai G 
> > > Co-authored-by: Sunil Pai G 
> > > Signed-off-by: Eli Britstein 
> > > Co-authored-by: Eli Britstein 
> > > Signed-off-by: Ian Stokes 
> >
> > As part of the DPIF refactoring[1], we're rebasing to the latest DPDK
> > 20.11 enabling patch (aka, this v2 patch).
> > Using updated meson/ninja commands as described in the docs in this
> > patch, all compiled successfully.
> >
> > Thanks for the patch Ian, and wider OVS community can we merge this
> > patch ASAP?
> > There will be a dependencies on this DPDK 20.11 enabling patch in our
> > DPIF patch series.
> >
> > Tested-by: Harry van Haaren 
> 
> Thanks for the Tested-by tag Harry.
> 
> Separate to your testing Hari Prasad has been testing 20.11 also with OVS.
> 
> @Govindharajan, Hariprasad could you provide a summary of the testing
> you've completed with DPDK 20.11?
> 
> Regards
> Ian
> 
[Govindharajan, Hariprasad] 
The following functionalities were validated with OvS-DPDK 20.11 release.
DPDK 20.11
OvS dpdk-latest

ICE Device

Basic performance tests  (RFC2544 P2P, PVP_CONT, RFC2544 PVP_TPUT, RFC2544 
PVVP_TPUT, PVPV) Jumbo frames RSS Partial Hardware offloading Port statistics 
Port hot plugging

i40e Device

Basic performance (RFC2544 P2P, PVP_CONT, RFC2544 PVP_TPUT, RFC2544 PVVP_TPUT, 
PVPV) Jumbo frames RSS Hardware offloading Port statistics Port hot plugging 
Flow control

ixgbe Device

Basic performance tests (RFC2544 P2P, PVP_CONT, RFC2544 PVP_TPUT, RFC2544 
PVVP_TPUT, PVPV) Jumbo frames RSS Port statistics Port hot plugging Flow 
control 

vhostuserclient device

Jumbo frames
dpdkvhostuserclient re-connect
dpdkvhostuserclient NUMA node
Port statistics

Basic AVX512 features
AVX512 performance
AVX512 Unit tests

QoS metrics
> Tested-by: Govindharajan, Hariprasad 
> >
> > [1]
> >
> https://patchwork.ozlabs.org/project/openvswitch/cover/20201203193747.
> > 807
> > 120-1-harry.van.haa...@intel.com/
> >
> >
> > > ---
> > > RFC v1 -> v2
> > > * Removed RFC tag.
> > > * Rebased to head of master.
> > > * Modified GHA build scripts to install required python packages.
> > > * Modified URLs to use versioned 20.11 links.
> > > * Removed unrequired reformat in travis.yml.
> > > * Modified GHA worflow buil-and-test.yml to remove others write
> > >   permission to $HOME in prepare step.
> > > ---
> > >  .ci/linux-build.sh   | 48 +---
> > >  .ci/linux-prepare.sh |  1 +
> > >  .github/workflows/build-and-test.yml | 10 ++--
> > >  .travis.yml  |  3 ++
> > >  Documentation/intro/install/afxdp.rst|  2 +-
> > >  Document

Re: [ovs-dev] [PATCH v8] Bareudp Tunnel Support

2020-12-08 Thread Eelco Chaudron

Hi Martin,

Did some basic testing, and it all works fine. See some comments inline 
below.


Cheers,

Eelco

On 7 Dec 2020, at 4:32, Martin Varghese wrote:


From: Martin Varghese 

There are various L3 encapsulation standards using UDP being discussed 
to
leverage the UDP based load balancing capability of different 
networks.

MPLSoUDP (__ https://tools.ietf.org/html/rfc7510) is one among them.

The Bareudp tunnel provides a generic L3 encapsulation support for
tunnelling different L3 protocols like MPLS, IP, NSH etc. inside a UDP
tunnel.

An example to create bareudp device to tunnel MPLS traffic is
given

$ ovs-vsctl add-port br_mpls udp_port -- set interface udp_port \
 type=bareudp options:remote_ip=2.1.1.3
 options:local_ip=2.1.1.2 \
 options:payload_type=0x8847 options:dst_port=6635 \
 options:packet_type="legacy_l3" \
 ofport_request=$bareudp_egress_port

The bareudp device supports special handling for MPLS & IP as
they can have multiple ethertypes. MPLS procotcol can have ethertypes
ETH_P_MPLS_UC (unicast) & ETH_P_MPLS_MC (multicast). IP protocol can 
have

ethertypes ETH_P_IP (v4) & ETH_P_IPV6 (v6).

The bareudp device to tunnel L3 traffic with multiple ethertypes
(MPLS & IP) can be created by passing the L3 protocol name as string 
in

the field payload_type. An example to create bareudp device to tunnel
MPLS unicast & multicast traffic is given below.::

$ ovs-vsctl add-port  br_mpls udp_port -- set interface
udp_port \
type=bareudp options:remote_ip=2.1.1.3
options:local_ip=2.1.1.2 \
options:payload_type=mpls options:dst_port=6635 \
options:packet_type="legacy_l3"

Signed-off-by: Martin Varghese 
Acked-By: Greg Rose 
Tested-by: Greg Rose 

---
Changes in v2:
- Removed vport-bareudp module.

Changes in v3:
- Added net-next upstream commit id and message to commit message.

Changes in v4:
- Removed kernel datapath changes.

Changes in v5:
- Fixed release notes errors.
- Fixed coding errors in dpif-nelink-rtnl.c.

Changes in v6:
- Added code to enable rx metadata collection in the kernel 
device.

- Added version history.

Changes in v7
- Fixed release notes errors.
- Added Skip tests for older kernels.
- Changes bareudp ovs_vport_type to 111.
- Added Acked-by & tested by from gvrose8...@gmail.com

Changes in v8
- The code added in v6 to enable rx metadata collection in
  the kernel device is removed. This flag was never added to any 
of
  the kernel release. The rx metadata collection is always enabled 
in

  kernel bareudp module.


 Documentation/automake.mk |  1 +
 Documentation/faq/bareudp.rst | 62 
+++

 Documentation/faq/index.rst   |  1 +
 Documentation/faq/releases.rst|  1 +
 NEWS  |  5 +-
 .../linux/compat/include/linux/openvswitch.h  |  9 +++
 lib/dpif-netlink-rtnl.c   | 53 
 lib/dpif-netlink.c|  5 ++
 lib/netdev-vport.c| 27 +++-
 lib/netdev.h  |  1 +
 ofproto/ofproto-dpif-xlate.c  |  1 +
 tests/system-layer3-tunnels.at| 48 ++
 12 files changed, 211 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/faq/bareudp.rst

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index f85c4320e..ea3475f35 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -88,6 +88,7 @@ DOC_SOURCE = \
Documentation/faq/terminology.rst \
Documentation/faq/vlan.rst \
Documentation/faq/vxlan.rst \
+   Documentation/faq/bareudp.rst \
Documentation/internals/index.rst \
Documentation/internals/authors.rst \
Documentation/internals/bugs.rst \
diff --git a/Documentation/faq/bareudp.rst 
b/Documentation/faq/bareudp.rst

new file mode 100644
index 0..ef437631c
--- /dev/null
+++ b/Documentation/faq/bareudp.rst
@@ -0,0 +1,62 @@
+..
+  Licensed under the Apache License, Version 2.0 (the "License"); 
you may
+  not use this file except in compliance with the License. You 
may obtain

+  a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, 
software
+  distributed under the License is distributed on an "AS IS" 
BASIS, WITHOUT
+  WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the
+  License for the specific language governing permissions and 
limitations

+  under the License.
+
+  Convention for heading levels in Open vSwitch documentation:
+
+  ===  Heading 0 (reserved for the title in a document)
+  ---  Heading 1
+  ~~~  Heading 2
+  +++  Heading 3
+  '''  H

[ovs-dev] Attn: Begünstigter

2020-12-08 Thread stellamarisfidelity

I've invited you to fill out the following form:
Untitled form

To fill it out, visit:
https://docs.google.com/forms/d/e/1FAIpQLSd2jl54nLE-JskDGF5ttxadDiG6knMl--cuoIgvDNbIb2EA0w/viewform?vc=0&c=0&w=1&flr=0&usp=mail_form_link

 ZAHLUNGSCODE:
Zahlungsbenachrichtigung
Attn: Begünstigter

Hiermit möchten wir Sie darüber informieren, dass die Fidelity Bank Ihrem
Long zugestimmt hat erwartete die Zahlung von $ 3,5 Mio., aber leider ein
Herr
Donald Smith hat seine Kontodaten an uns gesendet und behauptet, Ihre zu
sein
Vertreter oder Angehöriger. Bitte bestätigen Sie, ob Sie dies wirklich
getan haben
Autorität zu ihm, um zu vermeiden, an eine falsche Person zu zahlen.
Grüße,
Stella Maris

ENGLISH
This is to inform you that Fidelity bank has approved your long
awaited  payment of $3.5M,  but unfortunately one Mr.
Donald Smith sent his account details to us claiming to be your
representative or next of kin. Please confirm if truly you gave such
authority to avoid paying to a wrong person.
Regards,
Stella Maris


Google Forms: Create and analyze surveys.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn 2/2] nbctl: Use partial set updates instead of re-setting the whole column.

2020-12-08 Thread Ilya Maximets
On 12/8/20 1:56 PM, Ilya Maximets wrote:
> Northbound database has many tables that could contain columns with
> very large sets.  For example 'ports' column of the 'Logical_Switch'
> table could contain thousands of ports in a set.
> 
> Current strategy of nbctl while adding a new port to the set is to
> copy all existing ports, add one and set the new set of ports.
> Similar behavior is for deletion too.
> 
> If we have 1000 ports and want to add one more, resulted transaction
> in current code will look like this:
> 
>   {transact,
> < wait operation >
> < create new lsp in Logical_Switch_Port table >
> 
> where: _uuid  == 'logical switch row uuid'
> op   : update
> rows : ports ['< list of current 1000 ports + 1 new >']
>   }
> 
> The code was written before support for partial updates for sets was
> implemented.  Now we have it and can replace the old strategy.
> With this change resulted transaction will be:
> 
>   {transact,
> < wait operation >
> < create new lsp in Logical_Switch_Port table >
> 
> where: _uuid  == 'logical switch row uuid'
> op   :  mutate
> mutations : ports insert ['< 1 uuid of a new lsp >']
>   }
> 
> Unfortunately, for now, this only decreases transaction size in half,
> because '', that is still in the transaction, contains
> the full current list of ports:
> 
> where: _uuid  == 'logical switch row uuid'
> op   : wait
> until: ==
> rows : ports ['< list of current 1000 ports >']
> 
> But anyway, beside the overall code cleanup, this reduces transaction
> size in half and should reduce pressure on the ovsdb-server since it
> will not need to parse and process all 1000 ports twice.
> 
> This change doesn't affect 'append_request' messages within the raft
> cluster, because ovsdb-server is not smart enough to use mutations
> there, and this will also not affect 'update' messages from the
> ovsdb-server to its clients, because it is smart enough to construct
> 'modify' updates regardless of the original transaction.
> 
> One difference between full updates and partial is that partial
> changes are not visible for the idl client until transaction is
> committed and the update received from the server.  New switch ports
> are not visible while iterating over 'ports' of the logical switch and
> removed ports are still there.  For this reason, we have to maintain
> runtime cache of the mapping between ports and routers/switches they
> attached to.
> 
> Signed-off-by: Ilya Maximets 
> ---
>  utilities/ovn-nbctl.c | 348 +++---
>  1 file changed, 87 insertions(+), 261 deletions(-)
> 

Oops.  I missed one unused variable during rebase, so there is a build
warning with this patch on gcc.  It could be fixed by applying this on top:

diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index 812e8afab..942dcdb45 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -5944,11 +5944,9 @@ cmd_ha_ch_grp_remove_chassis(struct ctl_context *ctx)
 
 const char *chassis_name = ctx->argv[2];
 struct nbrec_ha_chassis *ha_chassis = NULL;
-size_t idx = 0;
 for (size_t i = 0; i < ha_ch_grp->n_ha_chassis; i++) {
 if (!strcmp(ha_ch_grp->ha_chassis[i]->chassis_name, chassis_name)) {
 ha_chassis = ha_ch_grp->ha_chassis[i];
-idx = i;
 break;
 }
 }
---

I'd wait for some comments before re-spinning the series.

Best regards, Ilya Maximets.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH ovn 2/2] nbctl: Use partial set updates instead of re-setting the whole column.

2020-12-08 Thread Ilya Maximets
Northbound database has many tables that could contain columns with
very large sets.  For example 'ports' column of the 'Logical_Switch'
table could contain thousands of ports in a set.

Current strategy of nbctl while adding a new port to the set is to
copy all existing ports, add one and set the new set of ports.
Similar behavior is for deletion too.

If we have 1000 ports and want to add one more, resulted transaction
in current code will look like this:

  {transact,
< wait operation >
< create new lsp in Logical_Switch_Port table >

where: _uuid  == 'logical switch row uuid'
op   : update
rows : ports ['< list of current 1000 ports + 1 new >']
  }

The code was written before support for partial updates for sets was
implemented.  Now we have it and can replace the old strategy.
With this change resulted transaction will be:

  {transact,
< wait operation >
< create new lsp in Logical_Switch_Port table >

where: _uuid  == 'logical switch row uuid'
op   :  mutate
mutations : ports insert ['< 1 uuid of a new lsp >']
  }

Unfortunately, for now, this only decreases transaction size in half,
because '', that is still in the transaction, contains
the full current list of ports:

where: _uuid  == 'logical switch row uuid'
op   : wait
until: ==
rows : ports ['< list of current 1000 ports >']

But anyway, beside the overall code cleanup, this reduces transaction
size in half and should reduce pressure on the ovsdb-server since it
will not need to parse and process all 1000 ports twice.

This change doesn't affect 'append_request' messages within the raft
cluster, because ovsdb-server is not smart enough to use mutations
there, and this will also not affect 'update' messages from the
ovsdb-server to its clients, because it is smart enough to construct
'modify' updates regardless of the original transaction.

One difference between full updates and partial is that partial
changes are not visible for the idl client until transaction is
committed and the update received from the server.  New switch ports
are not visible while iterating over 'ports' of the logical switch and
removed ports are still there.  For this reason, we have to maintain
runtime cache of the mapping between ports and routers/switches they
attached to.

Signed-off-by: Ilya Maximets 
---
 utilities/ovn-nbctl.c | 348 +++---
 1 file changed, 87 insertions(+), 261 deletions(-)

diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index 3886da889..812e8afab 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -126,7 +126,11 @@ static char * OVS_WARN_UNUSED_RESULT main_loop(const char 
*args,
 static void server_loop(struct ovsdb_idl *idl, int argc, char *argv[]);
 
 /* A context for keeping track of which switch/router certain ports are
- * connected to. */
+ * connected to.
+ *
+ * It is required to track changes that we did within current set of commands
+ * because partial updates of sets in database are not reflected in the idl
+ * until transaction is committed and updates received from the server. */
 struct nbctl_context {
 struct ctl_context base;
 struct shash lsp_to_ls;
@@ -1508,21 +1512,15 @@ nbctl_lsp_add(struct ctl_context *ctx)
 
 /* Insert the logical port into the logical switch. */
 nbrec_logical_switch_verify_ports(ls);
-struct nbrec_logical_switch_port **new_ports = xmalloc(sizeof *new_ports *
-(ls->n_ports + 1));
-nullable_memcpy(new_ports, ls->ports, sizeof *new_ports * ls->n_ports);
-new_ports[ls->n_ports] = CONST_CAST(struct nbrec_logical_switch_port *,
- lsp);
-nbrec_logical_switch_set_ports(ls, new_ports, ls->n_ports + 1);
-free(new_ports);
+nbrec_logical_switch_update_ports_addvalue(ls, lsp);
 
 /* Updating runtime cache. */
 shash_add(&nbctx->lsp_to_ls, lsp_name, ls);
 }
 
-/* Removes logical switch port 'ls->ports[idx]'. */
+/* Removes logical switch port 'lsp' from the logical switch 'ls'. */
 static void
-remove_lsp(struct ctl_context *ctx, size_t idx,
+remove_lsp(struct ctl_context *ctx,
const struct nbrec_logical_switch *ls,
const struct nbrec_logical_switch_port *lsp)
 {
@@ -1534,12 +1532,8 @@ remove_lsp(struct ctl_context *ctx, size_t idx,
 /* First remove 'lsp' from the array of ports.  This is what will
  * actually cause the logical port to be deleted when the transaction is
  * sent to the database server (due to garbage collection). */
-struct nbrec_logical_switch_port **new_ports
-= xmemdup(ls->ports, sizeof *new_ports * ls->n_ports);
-new_ports[idx] = new_ports[ls->n_ports - 1];
 nbrec_logical_switch_verify_ports(ls);
-nbrec_logical_switch_set_ports(ls, new_ports, ls->n_ports - 1);
-free(new_ports);
+nbrec_logical_switch_update_ports_del

[ovs-dev] [PATCH ovn 1/2] nbctl: Cache to which switch or router particular port belongs.

2020-12-08 Thread Ilya Maximets
nbctl always iterates over all ports in all logical switches or routers
to find to which logical router/switch current port belongs.  This
could be optimized by iterating only once and caching the current
state.  This should improve a little bit performance of this utility
in case where many updates are passed in a single nbctl command.

However, this change alone will slightly reduce performance of
standalone commands, since we're iterating twice over ports on port
deletion.

Cache is required for the upcoming change that will make nbctl to use
partial set updates.  It will allow us to drop redundant iterations
over ports, i.e. to not duplicate work.

Signed-off-by: Ilya Maximets 
---
 utilities/ovn-nbctl.c | 209 +-
 1 file changed, 146 insertions(+), 63 deletions(-)

diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index d19e1b6c6..3886da889 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -125,6 +125,61 @@ static char * OVS_WARN_UNUSED_RESULT main_loop(const char 
*args,
const struct timer *);
 static void server_loop(struct ovsdb_idl *idl, int argc, char *argv[]);
 
+/* A context for keeping track of which switch/router certain ports are
+ * connected to. */
+struct nbctl_context {
+struct ctl_context base;
+struct shash lsp_to_ls;
+struct shash lrp_to_lr;
+bool context_valid;
+};
+
+static void
+nbctl_context_init(struct nbctl_context *nbctx)
+{
+nbctx->context_valid = false;
+shash_init(&nbctx->lsp_to_ls);
+shash_init(&nbctx->lrp_to_lr);
+}
+
+static void
+nbctl_context_destroy(struct nbctl_context *nbctx)
+{
+nbctx->context_valid = false;
+shash_destroy(&nbctx->lsp_to_ls);
+shash_destroy(&nbctx->lrp_to_lr);
+}
+
+/* Casts 'base' into 'struct nbctl_context' and initializes it if needed. */
+static struct nbctl_context *
+nbctl_context_get(struct ctl_context *base)
+{
+struct nbctl_context *nbctx;
+
+nbctx = CONTAINER_OF(base, struct nbctl_context, base);
+
+if (nbctx->context_valid) {
+return nbctx;
+}
+
+const struct nbrec_logical_switch *ls;
+NBREC_LOGICAL_SWITCH_FOR_EACH (ls, base->idl) {
+for (size_t i = 0; i < ls->n_ports; i++) {
+shash_add_once(&nbctx->lsp_to_ls, ls->ports[i]->name, ls);
+}
+}
+
+const struct nbrec_logical_router *lr;
+NBREC_LOGICAL_ROUTER_FOR_EACH (lr, base->idl) {
+for (size_t i = 0; i < lr->n_ports; i++) {
+shash_add_once(&nbctx->lrp_to_lr, lr->ports[i]->name, lr);
+}
+}
+
+nbctx->context_valid = true;
+return nbctx;
+}
+
 int
 main(int argc, char *argv[])
 {
@@ -1249,6 +1304,7 @@ static void
 nbctl_ls_del(struct ctl_context *ctx)
 {
 bool must_exist = !shash_find(&ctx->options, "--if-exists");
+struct nbctl_context *nbctx = nbctl_context_get(ctx);
 const char *id = ctx->argv[1];
 const struct nbrec_logical_switch *ls = NULL;
 
@@ -1261,6 +1317,11 @@ nbctl_ls_del(struct ctl_context *ctx)
 return;
 }
 
+/* Updating runtime cache. */
+for (size_t i = 0; i < ls->n_ports; i++) {
+shash_find_and_delete(&nbctx->lsp_to_ls, ls->ports[i]->name);
+}
+
 nbrec_logical_switch_delete(ls);
 }
 
@@ -1317,22 +1378,19 @@ lsp_by_name_or_uuid(struct ctl_context *ctx, const char 
*id,
 
 /* Returns the logical switch that contains 'lsp'. */
 static char * OVS_WARN_UNUSED_RESULT
-lsp_to_ls(const struct ovsdb_idl *idl,
+lsp_to_ls(struct ctl_context *ctx,
   const struct nbrec_logical_switch_port *lsp,
   const struct nbrec_logical_switch **ls_p)
 {
+struct nbctl_context *nbctx = nbctl_context_get(ctx);
 const struct nbrec_logical_switch *ls;
 *ls_p = NULL;
 
-NBREC_LOGICAL_SWITCH_FOR_EACH (ls, idl) {
-for (size_t i = 0; i < ls->n_ports; i++) {
-if (ls->ports[i] == lsp) {
-*ls_p = ls;
-return NULL;
-}
-}
+ls = shash_find_data(&nbctx->lsp_to_ls, lsp->name);
+if (ls) {
+*ls_p = ls;
+return NULL;
 }
-
 /* Can't happen because of the database schema */
 return xasprintf("logical port %s is not part of any logical switch",
  lsp->name);
@@ -1353,6 +1411,7 @@ static void
 nbctl_lsp_add(struct ctl_context *ctx)
 {
 bool may_exist = shash_find(&ctx->options, "--may-exist") != NULL;
+struct nbctl_context *nbctx = nbctl_context_get(ctx);
 
 const struct nbrec_logical_switch *ls = NULL;
 char *error = ls_by_name_or_uuid(ctx, ctx->argv[1], true, &ls);
@@ -1395,7 +1454,7 @@ nbctl_lsp_add(struct ctl_context *ctx)
 }
 
 const struct nbrec_logical_switch *lsw;
-error = lsp_to_ls(ctx->idl, lsp, &lsw);
+error = lsp_to_ls(ctx, lsp, &lsw);
 if (error) {
 ctx->error = error;
 return;
@@ -1456,13 +1515,21 @@ nbctl_lsp_add(struct ctl_context *ctx)
 

[ovs-dev] [PATCH ovn 0/2] nbctl: Use mutations to update sets.

2020-12-08 Thread Ilya Maximets


Ilya Maximets (2):
  nbctl: Cache to which switch or router particular port belongs.
  nbctl: Use partial set updates instead of re-setting the whole column.

 utilities/ovn-nbctl.c | 531 +-
 1 file changed, 220 insertions(+), 311 deletions(-)

-- 
2.25.4

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH net-next] net: openvswitch: conntrack: simplify the return expression of ovs_ct_limit_get_default_limit()

2020-12-08 Thread Zheng Yongjun
Simplify the return expression.

Signed-off-by: Zheng Yongjun 
---
 net/openvswitch/conntrack.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index 4beb96139d77..96a49aa3a128 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -2025,15 +2025,11 @@ static int ovs_ct_limit_get_default_limit(struct 
ovs_ct_limit_info *info,
  struct sk_buff *reply)
 {
struct ovs_zone_limit zone_limit;
-   int err;
 
zone_limit.zone_id = OVS_ZONE_LIMIT_DEFAULT_ZONE;
zone_limit.limit = info->default_limit;
-   err = nla_put_nohdr(reply, sizeof(zone_limit), &zone_limit);
-   if (err)
-   return err;
 
-   return 0;
+   return nla_put_nohdr(reply, sizeof(zone_limit), &zone_limit);
 }
 
 static int __ovs_ct_limit_get_zone_limit(struct net *net,
-- 
2.22.0

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH ovn 0/3] tests: Improve unpredictable self test.

2020-12-08 Thread Dumitru Ceara
On 12/8/20 7:19 AM, Numan Siddique wrote:
> On Tue, Dec 8, 2020 at 2:01 AM Dumitru Ceara  wrote:
>>
>> The first patch moves some of the helper functions to common code.
>>
>> The second patch of the series removes a test file that was left over after
>> the OVS/OVN split: system-userspace-packet-type-aware.at
>>
>> The third patch fixes the "ovn -- Superseding ACLs with conjunction"
>> that sometimes failed due to "hard_age" being present in the flow dump
>> output.
>>
>> Dumitru Ceara (3):
>>   tests: Add ofctl_strip_all() to filter OVS flow outputs.
>>   tests: Remove unused system-userspace-packet-type-aware.at.
>>   tests: Fix test "ovn -- Superseding ACLs with conjunction".
>>
> 
> Thanks Dumitru. I applied the series to master and to branch-20.12,
> 
> Numan
> 

Thanks!

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK v20.11.

2020-12-08 Thread Stokes, Ian
> > -Original Message-
> > From: dev  On Behalf Of Ian Stokes
> > Sent: Wednesday, December 2, 2020 1:02 PM
> > To: d...@openvswitch.org
> > Cc: el...@nvidia.com; i.maxim...@ovn.org; david.march...@redhat.com;
> > bl...@debian.org
> > Subject: [ovs-dev] [PATCH v2 1/1] dpdk: Update to use DPDK v20.11.
> >
> > This commit adds support for DPDK v20.11, it includes the following
> > changes.
> >
> > 1. travis: Remove explicit DPDK kmods configuration.
> > 2. sparse: Fix build with 20.05 DPDK tracepoints.
> > 3. netdev-dpdk: Remove experimental API flag.
> >
> >
> http://patchwork.ozlabs.org/project/openvswitch/list/?series=173216&state=*
> >
> > 4. sparse: Update to DPDK 20.05 trace point header.
> >
> >
> http://patchwork.ozlabs.org/project/openvswitch/list/?series=179604&state=*
> >
> > 5. sparse: Fix build with DPDK 20.08.
> >
> >
> http://patchwork.ozlabs.org/project/openvswitch/list/?series=200181&state=*
> >
> > 6. build: Add support for DPDK meson build.
> >
> >
> http://patchwork.ozlabs.org/project/openvswitch/list/?series=199138&state=*
> >
> > 7. netdev-dpdk: Remove usage of RTE_ETH_DEV_CLOSE_REMOVE flag.
> >
> >
> http://patchwork.ozlabs.org/project/openvswitch/list/?series=207850&state=*
> >
> > 8. netdev-dpdk: Fix build with 20.11-rc1.
> >
> >
> http://patchwork.ozlabs.org/project/openvswitch/list/?series=209006&state=*
> >
> > 9. sparse: Fix __ATOMIC_* redefinition errors
> >
> >
> http://patchwork.ozlabs.org/project/openvswitch/list/?series=209452&state=*
> >
> > 10. build: Remove DPDK make build references.
> >
> >
> http://patchwork.ozlabs.org/project/openvswitch/list/?series=216682&state=*
> >
> > For credit all authors of the original commits to 'dpdk-latest' with the
> > above changes have been added as co-authors for this commit.
> >
> > Signed-off-by: David Marchand 
> > Co-authored-by: David Marchand 
> > Signed-off-by: Sunil Pai G 
> > Co-authored-by: Sunil Pai G 
> > Signed-off-by: Eli Britstein 
> > Co-authored-by: Eli Britstein 
> > Signed-off-by: Ian Stokes 
> 
> As part of the DPIF refactoring[1], we're rebasing to the latest DPDK 20.11
> enabling patch (aka, this v2 patch).
> Using updated meson/ninja commands as described in the docs in this patch, all
> compiled successfully.
> 
> Thanks for the patch Ian, and wider OVS community can we merge this patch
> ASAP?
> There will be a dependencies on this DPDK 20.11 enabling patch in our DPIF
> patch series.
> 
> Tested-by: Harry van Haaren 

Thanks for the Tested-by tag Harry.

Separate to your testing Hari Prasad has been testing 20.11 also with OVS. 

@Govindharajan, Hariprasad could you provide a summary of the testing you've 
completed with DPDK 20.11?

Regards
Ian

> 
> [1]
> https://patchwork.ozlabs.org/project/openvswitch/cover/20201203193747.807
> 120-1-harry.van.haa...@intel.com/
> 
> 
> > ---
> > RFC v1 -> v2
> > * Removed RFC tag.
> > * Rebased to head of master.
> > * Modified GHA build scripts to install required python packages.
> > * Modified URLs to use versioned 20.11 links.
> > * Removed unrequired reformat in travis.yml.
> > * Modified GHA worflow buil-and-test.yml to remove others write
> >   permission to $HOME in prepare step.
> > ---
> >  .ci/linux-build.sh   | 48 +---
> >  .ci/linux-prepare.sh |  1 +
> >  .github/workflows/build-and-test.yml | 10 ++--
> >  .travis.yml  |  3 ++
> >  Documentation/intro/install/afxdp.rst|  2 +-
> >  Documentation/intro/install/dpdk.rst | 64 ++
> >  Documentation/topics/dpdk/phy.rst| 18 +---
> >  Documentation/topics/dpdk/vhost-user.rst | 20 +---
> >  Documentation/topics/testing.rst |  2 +-
> >  NEWS |  1 +
> >  acinclude.m4 | 78 
> > +---
> >  include/sparse/automake.mk   |  2 +
> >  include/sparse/rte_mbuf.h| 29 
> >  include/sparse/rte_trace_point.h | 28 
> >  lib/dpdk.c   |  2 +-
> >  lib/netdev-dpdk.c| 20 ++--
> >  16 files changed, 190 insertions(+), 138 deletions(-)
> >  create mode 100644 include/sparse/rte_mbuf.h
> >  create mode 100644 include/sparse/rte_trace_point.h
> >
> > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> > index 16102ac94..3e5136fd4 100755
> > --- a/.ci/linux-build.sh
> > +++ b/.ci/linux-build.sh
> > @@ -87,17 +87,29 @@ function install_dpdk()
> >  {
> >  local DPDK_VER=$1
> >  local VERSION_FILE="dpdk-dir/travis-dpdk-cache-version"
> > +local DPDK_OPTS=""
> > +local DPDK_LIB=""
> >
> >  if [ -z "$TRAVIS_ARCH" ] ||
> > [ "$TRAVIS_ARCH" == "amd64" ]; then
> > -TARGET="x86_64-native-linuxapp-gcc"
> > +DPDK_LIB=$(pwd)/dpdk-dir/build/lib/x86_64-linux-gnu
> >  elif [ "$TRAVIS_ARCH" == "aarch64" ]; then
> > -TARGET="arm64-armv8a-linuxapp-gcc

[ovs-dev] Mein Liebling

2020-12-08 Thread dw30568

Je vous ai invité à remplir le formulaire suivant :
Formulaire sans titre

Pour remplir ce formulaire, consultez :
https://docs.google.com/forms/d/e/1FAIpQLSc01gO6RAd5VdFpt98ANiHhbCNDXt_tsupaBpsCJLnSbvoa7g/viewform?vc=0&c=0&w=1&flr=0&usp=mail_form_link


Von Fräulein Doreen Adama Oudragoo

Mein Liebling

Mein Name ist Miss Doreen Adama Oudragoo und ich bin 20 Jahre alt. Ich habe  
Sie kontaktiert, um mir zu helfen, den Betrag von 4,8 Millionen Dollar zu  
überweisen und zu investieren, den mein verstorbener Vater vor seinem Tod  
bei der Bank hinterlegt hat. Die Furcht vor Gott sei das Leitprinzip  
zwischen Gott, Ihnen und mir, Miss Doreen


  Mein verstorbener Vater, Captain Adama Oudragoo, war der Adjutant des  
ehemaligen Präsidenten der Republik Borkina Fasso, Captain Blaise Compaore,  
der am 31. Oktober 2014 nach 22 Jahren nach einem Volksaufstand von der  
Macht gestürzt wurde.


Meine Mutter starb im September 2018, als sie versuchte, ihr zweites Kind  
zur Welt zu bringen, das ein Junge war. Leider starb das Kind im  
Krankenhaus und meine Mutter konnte den Verlust des Kindes nach starken  
Blutungen, die sie aufgab, nicht ertragen. Ich bin in Tränen, als ich dir  
diese E-Mail sende


Mein Vater wurde von seinen Familienbrüdern bei einem Familientreffen im  
November 2018 vergiftet. Mein Vater kehrte zur Bank zurück und wusste, dass  
er die Krankheit nicht überleben wird. Er schrieb das Testament in meinem  
Namen um, falls es einen Fall geben sollte. Im Jahr 2019 starb mein Vater  
an der Gift infizierten ihn seine Brüder mit


Bitte kontaktieren Sie mich für Details. Antworten Sie auf diese private  
E-Mail-Adresse

doreen.oudrag...@yahoo.com
Fräulein Doreen Adama Oudragoo

Google Forms vous permet de créer des enquêtes et d'en analyser les  
résultats.

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] Spende

2020-12-08 Thread Hsinchu Branch - Chen Yiming



Lieber Freund,
Ich bin Herr Richard, der den Mega-Gewinner von $ 533M auswählt Beim Mega 
Millions Jackpot spende ich an 5 zufällige Personen. Wenn Sie diese E-Mail 
erhalten, wurde Ihre E-Mail für einen Spinball ausgewählt. Ich habe den gröten 
Teil meines Vermögens an eine Reihe von Wohltätigkeitsorisationen verteilt. Ich 
habe mich freiwillig entschlossen, den Betrag von s 2.000.000,00 an einen der 
ausgewählten 5 zu spenden
E-Mail für weitere Informationen. 
richardwahldonati...@outlook.com
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev