Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
F
fastclick-fiddling0
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Conditions générales et politique de confidentialité
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Colin Evrard
fastclick-fiddling0
Validations
ad65a4bb
Valider
ad65a4bb
rédigé
2 years ago
par
Tom Barbette
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Fix NumberPacket and clone implem
parent
ee1989a8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
elements/analysis/numberpacket.cc
+1
-17
1 ajout, 17 suppressions
elements/analysis/numberpacket.cc
elements/analysis/numberpacket.hh
+1
-4
1 ajout, 4 suppressions
elements/analysis/numberpacket.hh
lib/packet.cc
+7
-3
7 ajouts, 3 suppressions
lib/packet.cc
avec
9 ajouts
et
24 suppressions
elements/analysis/numberpacket.cc
+
1
−
17
Voir le fichier @
ad65a4bb
...
@@ -44,7 +44,7 @@ int NumberPacket::configure(Vector<String> &conf, ErrorHandler *errh) {
...
@@ -44,7 +44,7 @@ int NumberPacket::configure(Vector<String> &conf, ErrorHandler *errh) {
return
0
;
return
0
;
}
}
inline
Packet
*
NumberPacket
::
s
m
action
(
Packet
*
p
)
{
inline
Packet
*
NumberPacket
::
s
imple_
action
(
Packet
*
p
)
{
WritablePacket
*
wp
=
nullptr
;
WritablePacket
*
wp
=
nullptr
;
if
(
p
->
length
()
>=
(
unsigned
)
_offset
+
_size_of_number
)
{
if
(
p
->
length
()
>=
(
unsigned
)
_offset
+
_size_of_number
)
{
wp
=
p
->
uniqueify
();
wp
=
p
->
uniqueify
();
...
@@ -67,22 +67,6 @@ inline Packet* NumberPacket::smaction(Packet *p) {
...
@@ -67,22 +67,6 @@ inline Packet* NumberPacket::smaction(Packet *p) {
return
wp
;
return
wp
;
}
}
Packet
*
NumberPacket
::
simple_action
(
Packet
*
p
)
{
return
smaction
(
p
);
}
#if HAVE_BATCH
PacketBatch
*
NumberPacket
::
simple_action_batch
(
PacketBatch
*
batch
)
{
FOR_EACH_PACKET_SAFE
(
batch
,
p
)
{
p
=
smaction
(
p
);
}
return
batch
;
}
#endif
String
String
NumberPacket
::
read_handler
(
Element
*
e
,
void
*
thunk
)
NumberPacket
::
read_handler
(
Element
*
e
,
void
*
thunk
)
{
{
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
elements/analysis/numberpacket.hh
+
1
−
4
Voir le fichier @
ad65a4bb
...
@@ -30,7 +30,7 @@ acounting for this format. Defaults to false.
...
@@ -30,7 +30,7 @@ acounting for this format. Defaults to false.
RecordTimestamp, TimestampDiff */
RecordTimestamp, TimestampDiff */
class
NumberPacket
:
public
Batch
Element
{
class
NumberPacket
:
public
Simple
Element
<
NumberPacket
>
{
public:
public:
NumberPacket
()
CLICK_COLD
;
NumberPacket
()
CLICK_COLD
;
~
NumberPacket
()
CLICK_COLD
;
~
NumberPacket
()
CLICK_COLD
;
...
@@ -43,9 +43,6 @@ public:
...
@@ -43,9 +43,6 @@ public:
int
configure
(
Vector
<
String
>
&
,
ErrorHandler
*
)
CLICK_COLD
;
int
configure
(
Vector
<
String
>
&
,
ErrorHandler
*
)
CLICK_COLD
;
Packet
*
simple_action
(
Packet
*
)
override
;
Packet
*
simple_action
(
Packet
*
)
override
;
#if HAVE_BATCH
PacketBatch
*
simple_action_batch
(
PacketBatch
*
)
override
;
#endif
static
inline
uint64_t
read_number_of_packet
(
static
inline
uint64_t
read_number_of_packet
(
const
Packet
*
p
,
int
offset
,
bool
net_order
=
false
)
{
const
Packet
*
p
,
int
offset
,
bool
net_order
=
false
)
{
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
lib/packet.cc
+
7
−
3
Voir le fichier @
ad65a4bb
...
@@ -1063,10 +1063,14 @@ Packet::clone(bool fast)
...
@@ -1063,10 +1063,14 @@ Packet::clone(bool fast)
return
duplicate
(
0
,
0
);
return
duplicate
(
0
,
0
);
}
}
# endif
# endif
Packet
*
p
=
reinterpret_cast
<
Packet
*>
(
auto
pool
=
DPDKDevice
::
get_mpool
(
rte_socket_id
());
rte_
pktmbuf_clone
(
mb
(),
DPDKDevice
::
get_mpool
(
rte_socket_id
()))
);
rte_
mbuf
*
m
=
rte_pktmbuf_alloc
(
pool
);
if
(
likely
(
!
p
))
if
(
un
likely
(
!
m
))
return
0
;
return
0
;
rte_pktmbuf_attach
(
m
,
mb
());
m
->
nb_segs
=
1
;
m
->
pkt_len
=
mb
()
->
pkt_len
;
Packet
*
p
=
reinterpret_cast
<
Packet
*>
(
m
);
p
->
copy_annotations
(
this
,
true
);
p
->
copy_annotations
(
this
,
true
);
p
->
copy_headers
(
this
);
p
->
copy_headers
(
this
);
return
p
;
return
p
;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter