Newer
Older
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 3e5136fd4e..1acf5012db 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -201,7 +201,7 @@ fi
if [ "$DPDK" ] || [ "$DPDK_SHARED" ]; then
if [ -z "$DPDK_VER" ]; then
- DPDK_VER="20.11"
+ DPDK_VER="20.11.1"
fi
install_dpdk $DPDK_VER
if [ "$CC" = "clang" ]; then
@@ -235,7 +235,7 @@ if [ "$TESTSUITE" ]; then
configure_ovs
export DISTCHECK_CONFIGURE_FLAGS="$OPTS"
- if ! make distcheck CFLAGS="${CFLAGS_FOR_OVS}" \
+ if ! make distcheck -j4 CFLAGS="${CFLAGS_FOR_OVS}" \
TESTSUITEFLAGS=-j4 RECHECK=yes; then
# testsuite.log is necessary for debugging.
cat */_build/sub/tests/testsuite.log
diff --git a/.cirrus.yml b/.cirrus.yml
@@ -5,11 +5,11 @@ freebsd_build_task:
image_family: freebsd-12-2-snap
image_family: freebsd-11-4-snap
cpu: 4
- memory: 8G
+ memory: 4G
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
env:
- DEPENDENCIES: automake libtool gmake gcc wget openssl
- python3 py37-openssl py37-sphinx
+ DEPENDENCIES: automake libtool gmake gcc wget openssl python3
+ PY_DEPS: sphinx|openssl
matrix:
COMPILER: gcc
COMPILER: clang
@@ -18,6 +18,7 @@ freebsd_build_task:
- sysctl -w kern.coredump=0
- pkg update -f
- pkg install -y ${DEPENDENCIES}
+ $(pkg search -xq "^py3[0-9]+-(${PY_DEPS})-[0-9]+" | xargs)
configure_script:
- ./boot.sh
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index c4487226be..c96666b305 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -113,6 +113,12 @@ jobs:
- name: checkout
uses: actions/checkout@v2
+ - name: fix up /etc/hosts
+ # https://github.com/actions/virtual-environments/issues/3353
+ run: |
+ cat /etc/hosts
+ sudo sed -i "/don't remove this line/d" /etc/hosts || true
+
- name: create ci signature file for the dpdk cache key
if: matrix.dpdk != '' || matrix.dpdk_shared != ''
# This will collect most of DPDK related lines, so hash will be different
diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index ea3475f356..2a590b3a79 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -216,8 +216,13 @@ install-man-rst: docs-check
$(extract_stem_and_section); \
echo " $(MKDIR_P) '$(DESTDIR)'\"$$mandir\""; \
$(MKDIR_P) '$(DESTDIR)'"$$mandir"; \
- echo " $(INSTALL_DATA) $(SPHINXBUILDDIR)/man/$$stem.$$section '$(DESTDIR)'\"$$mandir/$$stem.$$section\""; \
- $(INSTALL_DATA) $(SPHINXBUILDDIR)/man/$$stem.$$section '$(DESTDIR)'"$$mandir/$$stem.$$section"; \
+ if test -f $(SPHINXBUILDDIR)/man/$$stem.$$section; then \
+ filepath=$(SPHINXBUILDDIR)/man/$$stem.$$section; \
+ else \
+ filepath=$(SPHINXBUILDDIR)/man/$$section/$$stem.$$section; \
+ fi; \
+ echo " $(INSTALL_DATA) $$filepath '$(DESTDIR)'\"$$mandir/$$stem.$$section\""; \
+ $(INSTALL_DATA) $$filepath '$(DESTDIR)'"$$mandir/$$stem.$$section"; \
done
else
install-man-rst:
diff --git a/Documentation/faq/releases.rst b/Documentation/faq/releases.rst
index 6a5e4141f1..3bc34c892f 100644
--- a/Documentation/faq/releases.rst
+++ b/Documentation/faq/releases.rst
@@ -204,9 +204,9 @@ Q: What DPDK version does each Open vSwitch release work with?
2.10.x 17.11.10
2.11.x 18.11.9
2.12.x 18.11.9
- 2.13.x 19.11.2
- 2.14.x 19.11.2
- 2.15.x 20.11.0
+ 2.13.x 19.11.8
+ 2.14.x 19.11.8
+ 2.15.x 20.11.1
============ ========
Q: Are all the DPDK releases that OVS versions work with maintained?
diff --git a/Documentation/intro/install/dpdk.rst b/Documentation/intro/install/dpdk.rst
index 3a24e54f97..612f2fdbc3 100644
--- a/Documentation/intro/install/dpdk.rst
+++ b/Documentation/intro/install/dpdk.rst
@@ -42,7 +42,7 @@ Build requirements
In addition to the requirements described in :doc:`general`, building Open
vSwitch with DPDK will require the following:
-- DPDK 20.11
+- DPDK 20.11.1
- A `DPDK supported NIC`_
@@ -73,9 +73,9 @@ Install DPDK
#. Download the `DPDK sources`_, extract the file and set ``DPDK_DIR``::
$ cd /usr/src/
- $ wget https://fast.dpdk.org/rel/dpdk-20.11.tar.xz
- $ tar xf dpdk-20.11.tar.xz
- $ export DPDK_DIR=/usr/src/dpdk-20.11
+ $ wget https://fast.dpdk.org/rel/dpdk-20.11.1.tar.xz
+ $ tar xf dpdk-20.11.1.tar.xz
+ $ export DPDK_DIR=/usr/src/dpdk-stable-20.11.1
$ cd $DPDK_DIR
#. Configure and install DPDK using Meson
diff --git a/Documentation/topics/dpdk/pmd.rst b/Documentation/topics/dpdk/pmd.rst
index caa7d97bef..e481e79414 100644
--- a/Documentation/topics/dpdk/pmd.rst
+++ b/Documentation/topics/dpdk/pmd.rst
@@ -239,7 +239,9 @@ If not set, the default variance improvement threshold is 25%.
PMD Auto Load Balancing doesn't currently work if queues are assigned
cross NUMA as actual processing load could get worse after assignment
- as compared to what dry run predicts.
+ as compared to what dry run predicts. The only exception is when all
+ PMD threads are running on cores from a single NUMA node. In this case
+ Auto Load Balancing is still possible.
The minimum time between 2 consecutive PMD auto load balancing iterations can
also be configured by::
diff --git a/Documentation/topics/dpdk/qos.rst b/Documentation/topics/dpdk/qos.rst
index 103495415a..a98ec672fc 100644
--- a/Documentation/topics/dpdk/qos.rst
+++ b/Documentation/topics/dpdk/qos.rst
@@ -69,22 +69,24 @@ to prioritize certain traffic over others at a port level.
For example, the following configuration will limit the traffic rate at a
port level to a maximum of 2000 packets a second (64 bytes IPv4 packets).
-100pps as CIR (Committed Information Rate) and 1000pps as EIR (Excess
-Information Rate). High priority traffic is routed to queue 10, which marks
+1000pps as CIR (Committed Information Rate) and 1000pps as EIR (Excess
+Information Rate). CIR and EIR are measured in bytes without Ethernet header.
+As a result, 1000pps means (64-byte - 14-byte) * 1000 = 50,000 in the
+configuration below. High priority traffic is routed to queue 10, which marks
all traffic as CIR, i.e. Green. All low priority traffic, queue 20, is
marked as EIR, i.e. Yellow::
$ ovs-vsctl --timeout=5 set port dpdk1 qos=@myqos -- \
--id=@myqos create qos type=trtcm-policer \
- other-config:cir=52000 other-config:cbs=2048 \
- other-config:eir=52000 other-config:ebs=2048 \
+ other-config:cir=50000 other-config:cbs=2048 \
+ other-config:eir=50000 other-config:ebs=2048 \
queues:10=@dpdk1Q10 queues:20=@dpdk1Q20 -- \
--id=@dpdk1Q10 create queue \
- other-config:cir=41600000 other-config:cbs=2048 \
+ other-config:cir=100000 other-config:cbs=2048 \
other-config:eir=0 other-config:ebs=0 -- \
--id=@dpdk1Q20 create queue \
other-config:cir=0 other-config:cbs=0 \
- other-config:eir=41600000 other-config:ebs=2048 \
+ other-config:eir=50000 other-config:ebs=2048
This configuration accomplishes that the high priority traffic has a
guaranteed bandwidth egressing the ports at CIR (1000pps), but it can also
diff --git a/NEWS b/NEWS
index bc901efdb1..154a299d93 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,21 @@
+v2.15.2 - xx xxx xxxx
+---------------------
+ - OVS now reports the datapath capability 'ct_zero_snat', which reflects
+ whether the SNAT with all-zero IP address is supported.
+ See ovs-vswitchd.conf.db(5) for details.
+
+v2.15.1 - 01 Jul 2021
+---------------------
+ - Bug fixes
+ - ovs-ctl:
+ * New option '--no-record-hostname' to disable hostname configuration
+ in ovsdb on startup.
+ * New command 'record-hostname-if-not-set' to update hostname in ovsdb.
+ - DPDK:
+ * OVS validated with DPDK 20.11.1. It is recommended to use this version
+ until further releases.
+
+
v2.15.0 - 15 Feb 2021
---------------------
- OVSDB:
diff --git a/acinclude.m4 b/acinclude.m4
index 435685c93d..15a54d636f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -209,10 +209,10 @@ dnl Configure Linux tc compat.
AC_DEFUN([OVS_CHECK_LINUX_TC], [
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([#include <linux/pkt_cls.h>], [
- int x = TCA_ACT_FLAGS;
+ int x = TCA_FLOWER_KEY_CT_FLAGS_REPLY;
])],
- [AC_DEFINE([HAVE_TCA_ACT_FLAGS], [1],
- [Define to 1 if TCA_ACT_FLAGS is available.])])
+ [AC_DEFINE([HAVE_TCA_FLOWER_KEY_CT_FLAGS_REPLY], [1],
+ [Define to 1 if TCA_FLOWER_KEY_CT_FLAGS_REPLY is available.])])
AC_CHECK_MEMBERS([struct tcf_t.firstuse], [], [], [#include <linux/pkt_cls.h>])
diff --git a/configure.ac b/configure.ac
index fd82d7d270..bcee218005 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@
# limitations under the License.
AC_PREREQ(2.63)
-AC_INIT(openvswitch, 2.15.0, bugs@openvswitch.org)
+AC_INIT(openvswitch, 2.15.2, bugs@openvswitch.org)
AC_CONFIG_SRCDIR([datapath/datapath.c])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
@@ -1112,9 +1112,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx,
* should split the function and refactor. */
if (!bufferData) {
EthHdr *ethHdr = (EthHdr *)bufferStart;
- /* If the frame is not VLAN make it a no op */
if (ethHdr->Type != ETH_TYPE_802_1PQ_NBO) {
- return NDIS_STATUS_SUCCESS;
+ OVS_LOG_ERROR("Invalid ethHdr type %u, nbl %p", ethHdr->Type, ovsFwdCtx->curNbl);
+ return NDIS_STATUS_INVALID_PACKET;
}
}
RtlMoveMemory(bufferStart + shiftLength, bufferStart, shiftOffset);
@@ -1137,6 +1137,9 @@ OvsPopFieldInPacketBuf(OvsForwardingContext *ovsFwdCtx,
static __inline NDIS_STATUS
OvsPopVlanInPktBuf(OvsForwardingContext *ovsFwdCtx)
{
+ NDIS_STATUS status;
+ OVS_PACKET_HDR_INFO* layers = &ovsFwdCtx->layers;
+
/*
* Declare a dummy vlanTag structure since we need to compute the size
* of shiftLength. The NDIS one is a unionized structure.
@@ -1145,7 +1148,15 @@ OvsPopVlanInPktBuf(OvsForwardingContext *ovsFwdCtx)
UINT32 shiftLength = sizeof(vlanTag.TagHeader);
UINT32 shiftOffset = sizeof(DL_EUI48) + sizeof(DL_EUI48);
- return OvsPopFieldInPacketBuf(ovsFwdCtx, shiftOffset, shiftLength, NULL);
+ status = OvsPopFieldInPacketBuf(ovsFwdCtx, shiftOffset, shiftLength,
+ NULL);
+
+ if (status == NDIS_STATUS_SUCCESS) {
+ layers->l3Offset -= (UINT16) shiftLength;
+ layers->l4Offset -= (UINT16) shiftLength;
+ }
+
+ return status;
}
@@ -1550,9 +1561,21 @@ OvsUpdateAddressAndPort(OvsForwardingContext *ovsFwdCtx,
if (tcpHdr) {
portField = &tcpHdr->dest;
checkField = &tcpHdr->check;
+ l4Offload = isTx ? (BOOLEAN)csumInfo.Transmit.TcpChecksum :
+ ((BOOLEAN)csumInfo.Receive.TcpChecksumSucceeded ||
+ (BOOLEAN)csumInfo.Receive.TcpChecksumFailed);
} else if (udpHdr) {
portField = &udpHdr->dest;
checkField = &udpHdr->check;
+ l4Offload = isTx ? (BOOLEAN)csumInfo.Transmit.UdpChecksum :
+ ((BOOLEAN)csumInfo.Receive.UdpChecksumSucceeded ||
+ (BOOLEAN)csumInfo.Receive.UdpChecksumFailed);
+ }
+
+ if (l4Offload) {
+ *checkField = IPPseudoChecksum(&ipHdr->saddr, &newAddr,
+ tcpHdr ? IPPROTO_TCP : IPPROTO_UDP,
+ ntohs(ipHdr->tot_len) - ipHdr->ihl * 4);
}
}
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
@@ -1780,9 +1803,11 @@ OvsExecuteRecirc(OvsForwardingContext *ovsFwdCtx,
}
if (newNbl) {
- deferredAction = OvsAddDeferredActions(newNbl, key, NULL);
+ deferredAction = OvsAddDeferredActions(newNbl, key, &(ovsFwdCtx->layers),
+ NULL);
} else {
- deferredAction = OvsAddDeferredActions(ovsFwdCtx->curNbl, key, NULL);
+ deferredAction = OvsAddDeferredActions(ovsFwdCtx->curNbl, key,
+ &(ovsFwdCtx->layers), NULL);
}
if (deferredAction) {
@@ -1952,7 +1977,7 @@ OvsExecuteSampleAction(OvsForwardingContext *ovsFwdCtx,
return STATUS_SUCCESS;
}
- if (!OvsAddDeferredActions(newNbl, key, a)) {
+ if (!OvsAddDeferredActions(newNbl, key, &(ovsFwdCtx->layers), a)) {
OVS_LOG_INFO(
"Deferred actions limit reached, dropping sample action.");
OvsCompleteNBL(ovsFwdCtx->switchContext, newNbl, TRUE);
@@ -2088,6 +2113,7 @@ OvsDoExecuteActions(POVS_SWITCH_CONTEXT switchContext,
*/
status = OvsPopVlanInPktBuf(&ovsFwdCtx);
if (status != NDIS_STATUS_SUCCESS) {
+ OVS_LOG_ERROR("OVS-pop vlan action failed status = %lu", status);
dropReason = L"OVS-pop vlan action failed";
goto dropit;
}
@@ -2337,7 +2363,7 @@ OvsActionsExecute(POVS_SWITCH_CONTEXT switchContext,
if (status == STATUS_SUCCESS) {
status = OvsProcessDeferredActions(switchContext, completionList,
- portNo, sendFlags, layers);
+ portNo, sendFlags, NULL);
}
return status;
diff --git a/datapath-windows/ovsext/Recirc.c b/datapath-windows/ovsext/Recirc.c
index 2febf060dd..a32b75352b 100644
--- a/datapath-windows/ovsext/Recirc.c
+++ b/datapath-windows/ovsext/Recirc.c
@@ -277,16 +277,23 @@ OvsDeferredActionsQueuePush(POVS_DEFERRED_ACTION_QUEUE queue)
POVS_DEFERRED_ACTION
OvsAddDeferredActions(PNET_BUFFER_LIST nbl,
OvsFlowKey *key,
+ POVS_PACKET_HDR_INFO layers,
const PNL_ATTR actions)
{
POVS_DEFERRED_ACTION_QUEUE queue = OvsDeferredActionsQueueGet();
POVS_DEFERRED_ACTION deferredAction = NULL;
+ OVS_PACKET_HDR_INFO layersInit = { 0 };
deferredAction = OvsDeferredActionsQueuePush(queue);
if (deferredAction) {
deferredAction->nbl = nbl;
deferredAction->actions = actions;
deferredAction->key = *key;
+ if (layers) {
+ deferredAction->layers = *layers;
+ } else {
+ deferredAction->layers = layersInit;
+ }
}
return deferredAction;
@@ -309,9 +316,16 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext,
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
POVS_DEFERRED_ACTION_QUEUE queue = OvsDeferredActionsQueueGet();
POVS_DEFERRED_ACTION deferredAction = NULL;
+ POVS_PACKET_HDR_INFO layersDeferred = NULL;
/* Process all deferred actions. */
while ((deferredAction = OvsDeferredActionsQueuePop(queue)) != NULL) {
+ if (layers) {
+ layersDeferred = layers;
+ } else {
+ layersDeferred = &(deferredAction->layers);
+ }
+
if (deferredAction->actions) {
status = OvsDoExecuteActions(switchContext,
completionList,
@@ -319,7 +333,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext,
portNo,
sendFlags,
&deferredAction->key, NULL,
- layers, deferredAction->actions,
+ layersDeferred, deferredAction->actions,
NlAttrGetSize(deferredAction->actions));
} else {
status = OvsDoRecirc(switchContext,
@@ -327,7 +341,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext,
deferredAction->nbl,
&deferredAction->key,
portNo,
- layers);
+ layersDeferred);
}
}
diff --git a/datapath-windows/ovsext/Recirc.h b/datapath-windows/ovsext/Recirc.h
index 2b314ce274..74130a4600 100644
--- a/datapath-windows/ovsext/Recirc.h
+++ b/datapath-windows/ovsext/Recirc.h
@@ -18,6 +18,7 @@
#define __RECIRC_H_ 1
#include "Actions.h"
+#include "NetProto.h"
#define DEFERRED_ACTION_QUEUE_SIZE 10
#define DEFERRED_ACTION_EXEC_LEVEL 4
@@ -26,6 +27,7 @@ typedef struct _OVS_DEFERRED_ACTION {
PNET_BUFFER_LIST nbl;
PNL_ATTR actions;
OvsFlowKey key;
+ OVS_PACKET_HDR_INFO layers;
} OVS_DEFERRED_ACTION, *POVS_DEFERRED_ACTION;
/*
@@ -52,6 +54,7 @@ OvsProcessDeferredActions(POVS_SWITCH_CONTEXT switchContext,
POVS_DEFERRED_ACTION
OvsAddDeferredActions(PNET_BUFFER_LIST packet,
OvsFlowKey *key,
+ POVS_PACKET_HDR_INFO layers,
const PNL_ATTR actions);
/*
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
index d50a126b43..18f884f41b 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj
+++ b/datapath-windows/ovsext/ovsext.vcxproj
@@ -192,22 +192,39 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10Analyze|x64'">
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
<CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>..\misc\DriverRecommendedRules.ruleset</CodeAnalysisRuleSet>
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">
+ <ExternalIncludePath>$(CRT_IncludePath);$(KM_IncludePath);</ExternalIncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
<ClCompile>
diff --git a/debian/changelog b/debian/changelog
index 1f2b7a3668..ed5b127e59 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+openvswitch (2.15.2-1) unstable; urgency=low
+ [ Open vSwitch team ]
+ * New upstream version
+
+ -- Open vSwitch team <dev@openvswitch.org> Thu, 01 Jul 2021 20:19:24 +0200
+
+openvswitch (2.15.1-1) unstable; urgency=low
+ [ Open vSwitch team ]
+ * New upstream version
+
+ -- Open vSwitch team <dev@openvswitch.org> Thu, 01 Jul 2021 20:19:24 +0200
+
openvswitch (2.15.0-1) unstable; urgency=low
* New upstream version
diff --git a/dpdk/VERSION b/dpdk/VERSION
index 8b0beab16a..2dbbe00e67 100644
--- a/dpdk/VERSION
+++ b/dpdk/VERSION
@@ -1 +1 @@
-20.11.0
+20.11.1
diff --git a/dpdk/app/meson.build b/dpdk/app/meson.build
index eb74f215a3..87fc195dbf 100644
--- a/dpdk/app/meson.build
+++ b/dpdk/app/meson.build
@@ -25,6 +25,10 @@ apps = [
lib_execinfo = cc.find_library('execinfo', required: false)
default_cflags = machine_args + ['-DALLOW_EXPERIMENTAL_API']
+default_ldflags = []
+if get_option('default_library') == 'static' and not is_windows
+ default_ldflags += ['-Wl,--export-dynamic']
+endif
foreach app:apps
build = true
@@ -32,6 +36,7 @@ foreach app:apps
sources = []
includes = []
cflags = default_cflags
+ ldflags = default_ldflags
objs = [] # other object files to link against, used e.g. for
# instruction-set optimized versions of code
@@ -58,8 +63,10 @@ foreach app:apps
executable('dpdk-' + name,
sources,
c_args: cflags,
+ link_args: ldflags,
link_whole: link_libs,
dependencies: dep_objs,
+ include_directories: includes,
install_rpath: join_paths(get_option('prefix'),
driver_install_path),
install: true)
diff --git a/dpdk/app/proc-info/main.c b/dpdk/app/proc-info/main.c
index d743209f0d..b9587f7ded 100644
--- a/dpdk/app/proc-info/main.c
+++ b/dpdk/app/proc-info/main.c
@@ -5,6 +5,7 @@
#include <stdio.h>
#include <string.h>
#include <stdint.h>
+#include <stdbool.h>
#include <errno.h>
#include <stdarg.h>
#include <inttypes.h>
@@ -301,14 +302,13 @@ proc_info_parse_args(int argc, char **argv)
} else if (!strncmp(long_option[option_index].name,
"xstats-ids",
MAX_LONG_OPT_SZ)) {
- nb_xstats_ids = parse_xstats_ids(optarg,
+ int ret = parse_xstats_ids(optarg,
xstats_ids, MAX_NB_XSTATS_IDS);
-
- if (nb_xstats_ids <= 0) {
+ if (ret <= 0) {
printf("xstats-id list parse error.\n");
return -1;
}
-
+ nb_xstats_ids = ret;
}
break;
default:
@@ -420,11 +420,9 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
} else if ((type_end != NULL) &&
(strncmp(cnt_name, "flow_", strlen("flow_"))) == 0) {
if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
- strlcpy(cnt_type, "operations", cnt_type_len);
+ strlcpy(cnt_type, "filter_result", cnt_type_len);
else if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
strlcpy(cnt_type, "errors", cnt_type_len);
- else if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
- strlcpy(cnt_type, "filter_result", cnt_type_len);
} else if ((type_end != NULL) &&
(strncmp(cnt_name, "mac_", strlen("mac_"))) == 0) {
if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
@@ -648,11 +646,16 @@ metrics_display(int port_id)
}
static void
-show_security_context(uint16_t portid)
+show_security_context(uint16_t portid, bool inline_offload)
{
- void *p_ctx = rte_eth_dev_get_sec_ctx(portid);
+ void *p_ctx;
const struct rte_security_capability *s_cap;
+ if (inline_offload)
+ p_ctx = rte_eth_dev_get_sec_ctx(portid);
+ else
+ p_ctx = rte_cryptodev_get_sec_ctx(portid);
+
if (p_ctx == NULL)
return;
@@ -859,7 +862,7 @@ show_port(void)
}
#ifdef RTE_LIB_SECURITY
- show_security_context(i);
+ show_security_context(i, true);
#endif
}
}
@@ -1210,7 +1213,6 @@ show_crypto(void)
display_crypto_feature_info(dev_info.feature_flags);
- memset(&stats, 0, sizeof(0));
if (rte_cryptodev_stats_get(i, &stats) == 0) {
printf("\t -- stats\n");
printf("\t\t + enqueue count (%"PRIu64")"
@@ -1224,7 +1226,7 @@ show_crypto(void)
}
#ifdef RTE_LIB_SECURITY
- show_security_context(i);
+ show_security_context(i, false);
#endif
}
}
@@ -1268,8 +1270,6 @@ show_ring(char *name)
static void
show_mempool(char *name)
{
- uint64_t flags = 0;
-
snprintf(bdr_str, MAX_STRING_LEN, " show - MEMPOOL ");
STATS_BDR_STR(10, bdr_str);
@@ -1277,8 +1277,8 @@ show_mempool(char *name)
struct rte_mempool *ptr = rte_mempool_lookup(name);
if (ptr != NULL) {
struct rte_mempool_ops *ops;
+ uint64_t flags = ptr->flags;
- flags = ptr->flags;
ops = rte_mempool_get_ops(ptr->ops_index);
printf(" - Name: %s on socket %d\n"
" - flags:\n"
diff --git a/dpdk/app/test-crypto-perf/cperf_options_parsing.c b/dpdk/app/test-crypto-perf/cperf_options_parsing.c
index 03ed6f5942..0466f7baf8 100644
--- a/dpdk/app/test-crypto-perf/cperf_options_parsing.c
+++ b/dpdk/app/test-crypto-perf/cperf_options_parsing.c
@@ -24,7 +24,7 @@ usage(char *progname)
{
printf("%s [EAL options] --\n"
" --silent: disable options dump\n"
- " --ptest throughput / latency / verify / pmd-cycleount :"
+ " --ptest throughput / latency / verify / pmd-cyclecount :"
" set test type\n"
" --pool_sz N: set the number of crypto ops/mbufs allocated\n"
" --total-ops N: set the number of total operations performed\n"
diff --git a/dpdk/app/test-crypto-perf/cperf_test_latency.c b/dpdk/app/test-crypto-perf/cperf_test_latency.c
index 0e4d0e1538..159fe8492b 100644
--- a/dpdk/app/test-crypto-perf/cperf_test_latency.c
+++ b/dpdk/app/test-crypto-perf/cperf_test_latency.c
@@ -310,11 +310,11 @@ cperf_latency_test_runner(void *arg)
if (ctx->options->csv) {
if (rte_atomic16_test_and_set(&display_once))
printf("\n# lcore, Buffer Size, Burst Size, Pakt Seq #, "
- "Packet Size, cycles, time (us)");
+ "cycles, time (us)");
for (i = 0; i < ctx->options->total_ops; i++) {
- printf("\n%u;%u;%u;%"PRIu64";%"PRIu64";%.3f",
+ printf("\n%u,%u,%u,%"PRIu64",%"PRIu64",%.3f",
ctx->lcore_id, ctx->options->test_buffer_size,
test_burst_size, i + 1,
ctx->res[i].tsc_end - ctx->res[i].tsc_start,
diff --git a/dpdk/app/test-crypto-perf/cperf_test_pmd_cyclecount.c b/dpdk/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
index 4e67d3aebd..844659aeca 100644
--- a/dpdk/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
+++ b/dpdk/app/test-crypto-perf/cperf_test_pmd_cyclecount.c
@@ -16,7 +16,7 @@
#define PRETTY_HDR_FMT "%12s%12s%12s%12s%12s%12s%12s%12s%12s%12s\n\n"
#define PRETTY_LINE_FMT "%12u%12u%12u%12u%12u%12u%12u%12.0f%12.0f%12.0f\n"
#define CSV_HDR_FMT "%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n"
-#define CSV_LINE_FMT "%10u;%10u;%u;%u;%u;%u;%u;%.3f;%.3f;%.3f\n"
+#define CSV_LINE_FMT "%10u,%10u,%u,%u,%u,%u,%u,%.3f,%.3f,%.3f\n"
struct cperf_pmd_cyclecount_ctx {
uint8_t dev_id;
diff --git a/dpdk/app/test-crypto-perf/cperf_test_throughput.c b/dpdk/app/test-crypto-perf/cperf_test_throughput.c
index f30f7d5c2c..f6eb8cf259 100644
--- a/dpdk/app/test-crypto-perf/cperf_test_throughput.c
+++ b/dpdk/app/test-crypto-perf/cperf_test_throughput.c
@@ -299,8 +299,8 @@ cperf_throughput_test_runner(void *test_ctx)
"Failed Deq,Ops(Millions),Throughput(Gbps),"
"Cycles/Buf\n\n");
- printf("%u;%u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
- "%.3f;%.3f;%.3f\n",
+ printf("%u,%u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64","
+ "%.3f,%.3f,%.3f\n",
ctx->lcore_id,
ctx->options->test_buffer_size,
test_burst_size,
diff --git a/dpdk/app/test-crypto-perf/cperf_test_verify.c b/dpdk/app/test-crypto-perf/cperf_test_verify.c
index 833bc9a552..2939aeaa93 100644
--- a/dpdk/app/test-crypto-perf/cperf_test_verify.c
+++ b/dpdk/app/test-crypto-perf/cperf_test_verify.c
@@ -406,7 +406,7 @@ cperf_verify_test_runner(void *test_ctx)
"Burst Size,Enqueued,Dequeued,Failed Enq,"
"Failed Deq,Failed Ops\n");
- printf("%10u;%10u;%u;%"PRIu64";%"PRIu64";%"PRIu64";%"PRIu64";"
+ printf("%10u,%10u,%u,%"PRIu64",%"PRIu64",%"PRIu64",%"PRIu64","
"%"PRIu64"\n",
ctx->lcore_id,
ctx->options->max_buffer_size,
diff --git a/dpdk/app/test-crypto-perf/main.c b/dpdk/app/test-crypto-perf/main.c
index 5f035519c3..49af812d8b 100644
--- a/dpdk/app/test-crypto-perf/main.c
+++ b/dpdk/app/test-crypto-perf/main.c
@@ -390,7 +390,7 @@ cperf_check_test_vector(struct cperf_options *opts,
if (opts->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
if (test_vec->plaintext.data == NULL)
return -1;
- } else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+ } else {
if (test_vec->plaintext.data == NULL)
return -1;
if (test_vec->plaintext.length < opts->max_buffer_size)
@@ -440,7 +440,7 @@ cperf_check_test_vector(struct cperf_options *opts,
return -1;
if (test_vec->plaintext.length < opts->max_buffer_size)
return -1;
- } else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+ } else {
if (test_vec->plaintext.data == NULL)
return -1;
if (test_vec->plaintext.length < opts->max_buffer_size)
@@ -530,14 +530,14 @@ main(int argc, char **argv)
ret = cperf_options_parse(&opts, argc, argv);
if (ret) {
- RTE_LOG(ERR, USER1, "Parsing on or more user options failed\n");
+ RTE_LOG(ERR, USER1, "Parsing one or more user options failed\n");
goto err;
}
ret = cperf_options_check(&opts);
if (ret) {
RTE_LOG(ERR, USER1,
- "Checking on or more user options failed\n");
+ "Checking one or more user options failed\n");
goto err;
}
diff --git a/dpdk/app/test-eventdev/test_perf_common.h b/dpdk/app/test-eventdev/test_perf_common.h
index ff9705df88..e7233e5a5b 100644
--- a/dpdk/app/test-eventdev/test_perf_common.h
+++ b/dpdk/app/test-eventdev/test_perf_common.h
@@ -97,8 +97,13 @@ perf_process_last_stage(struct rte_mempool *const pool,
void *bufs[], int const buf_sz, uint8_t count)
{
bufs[count++] = ev->event_ptr;
- w->processed_pkts++;
+
+ /* wmb here ensures event_prt is stored before
+ * updating the number of processed packets
+ * for worker lcores
+ */
rte_smp_wmb();
+ w->processed_pkts++;
if (unlikely(count == buf_sz)) {
count = 0;
@@ -116,6 +121,12 @@ perf_process_last_stage_latency(struct rte_mempool *const pool,
struct perf_elt *const m = ev->event_ptr;
bufs[count++] = ev->event_ptr;
+
+ /* wmb here ensures event_prt is stored before
+ * updating the number of processed packets
+ * for worker lcores
+ */
+ rte_smp_wmb();
w->processed_pkts++;
if (unlikely(count == buf_sz)) {
@@ -127,7 +138,6 @@ perf_process_last_stage_latency(struct rte_mempool *const pool,
}
w->latency += latency;
- rte_smp_wmb();
return count;
}
diff --git a/dpdk/app/test-eventdev/test_pipeline_queue.c b/dpdk/app/test-eventdev/test_pipeline_queue.c
index 7bebac34fc..9a9febb199 100644
--- a/dpdk/app/test-eventdev/test_pipeline_queue.c
+++ b/dpdk/app/test-eventdev/test_pipeline_queue.c
@@ -83,16 +83,15 @@ pipeline_queue_worker_single_stage_burst_tx(void *arg)
rte_prefetch0(ev[i + 1].mbuf);
if (ev[i].sched_type == RTE_SCHED_TYPE_ATOMIC) {
pipeline_event_tx(dev, port, &ev[i]);
- ev[i].op = RTE_EVENT_OP_RELEASE;
w->processed_pkts++;
} else {
ev[i].queue_id++;
pipeline_fwd_event(&ev[i],
RTE_SCHED_TYPE_ATOMIC);
+ pipeline_event_enqueue_burst(dev, port, ev,
+ nb_rx);
}
}
-
- pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
}
return 0;
@@ -180,13 +179,13 @@ pipeline_queue_worker_multi_stage_fwd(void *arg)
ev.queue_id = tx_queue[ev.mbuf->port];
rte_event_eth_tx_adapter_txq_set(ev.mbuf, 0);
pipeline_fwd_event(&ev, RTE_SCHED_TYPE_ATOMIC);
+ pipeline_event_enqueue(dev, port, &ev);
w->processed_pkts++;
} else {
ev.queue_id++;
pipeline_fwd_event(&ev, sched_type_list[cq_id]);
+ pipeline_event_enqueue(dev, port, &ev);
}
-
- pipeline_event_enqueue(dev, port, &ev);
}
return 0;
@@ -213,7 +212,6 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)
if (ev[i].queue_id == tx_queue[ev[i].mbuf->port]) {
pipeline_event_tx(dev, port, &ev[i]);
- ev[i].op = RTE_EVENT_OP_RELEASE;
w->processed_pkts++;
continue;
}
@@ -222,9 +220,8 @@ pipeline_queue_worker_multi_stage_burst_tx(void *arg)
pipeline_fwd_event(&ev[i], cq_id != last_queue ?
sched_type_list[cq_id] :
RTE_SCHED_TYPE_ATOMIC);
+ pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
}
-
- pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
}
return 0;
@@ -237,6 +234,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
const uint8_t *tx_queue = t->tx_evqueue_id;
while (t->done == false) {
+ uint16_t processed_pkts = 0;
uint16_t nb_rx = rte_event_dequeue_burst(dev, port, ev,
BURST_SIZE, 0);
@@ -254,7 +252,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
rte_event_eth_tx_adapter_txq_set(ev[i].mbuf, 0);
pipeline_fwd_event(&ev[i],
RTE_SCHED_TYPE_ATOMIC);
- w->processed_pkts++;
+ processed_pkts++;
} else {
ev[i].queue_id++;
pipeline_fwd_event(&ev[i],
@@ -263,6 +261,7 @@ pipeline_queue_worker_multi_stage_burst_fwd(void *arg)
}
pipeline_event_enqueue_burst(dev, port, ev, nb_rx);
+ w->processed_pkts += processed_pkts;
}
return 0;
diff --git a/dpdk/app/test-flow-perf/actions_gen.c b/dpdk/app/test-flow-perf/actions_gen.c
index ac525f6fdb..f265894247 100644
--- a/dpdk/app/test-flow-perf/actions_gen.c
+++ b/dpdk/app/test-flow-perf/actions_gen.c
@@ -145,12 +145,10 @@ add_set_meta(struct rte_flow_action *actions,
uint8_t actions_counter,
__rte_unused struct additional_para para)
{
- static struct rte_flow_action_set_meta meta_action;
-
- do {
- meta_action.data = RTE_BE32(META_DATA);
- meta_action.mask = RTE_BE32(0xffffffff);
- } while (0);
+ static struct rte_flow_action_set_meta meta_action = {
+ .data = RTE_BE32(META_DATA),
+ .mask = RTE_BE32(0xffffffff),
+ };
actions[actions_counter].type = RTE_FLOW_ACTION_TYPE_SET_META;
actions[actions_counter].conf = &meta_action;
@@ -161,13 +159,11 @@ add_set_tag(struct rte_flow_action *actions,
uint8_t actions_counter,
__rte_unused struct additional_para para)
{
- static struct rte_flow_action_set_tag tag_action;
-
- do {
- tag_action.data = RTE_BE32(META_DATA);
- tag_action.mask = RTE_BE32(0xffffffff);
- tag_action.index = TAG_INDEX;
- } while (0);
+ static struct rte_flow_action_set_tag tag_action = {
+ .data = RTE_BE32(META_DATA),
+ .mask = RTE_BE32(0xffffffff),
+ .index = TAG_INDEX,
+ };
actions[actions_counter].type = RTE_FLOW_ACTION_TYPE_SET_TAG;
actions[actions_counter].conf = &tag_action;
@@ -178,11 +174,9 @@ add_port_id(struct rte_flow_action *actions,
uint8_t actions_counter,
__rte_unused struct additional_para para)
{
- static struct rte_flow_action_port_id port_id;
-
- do {
- port_id.id = PORT_ID_DST;
- } while (0);
+ static struct rte_flow_action_port_id port_id = {
+ .id = PORT_ID_DST,
+ };
actions[actions_counter].type = RTE_FLOW_ACTION_TYPE_PORT_ID;
actions[actions_counter].conf = &port_id;
diff --git a/dpdk/app/test-flow-perf/items_gen.c b/dpdk/app/test-flow-perf/items_gen.c
index 2b1ab41467..aaa243a7c4 100644
--- a/dpdk/app/test-flow-perf/items_gen.c
+++ b/dpdk/app/test-flow-perf/items_gen.c
@@ -25,9 +25,6 @@ add_ether(struct rte_flow_item *items,
static struct rte_flow_item_eth eth_spec;
static struct rte_flow_item_eth eth_mask;
- memset(ð_spec, 0, sizeof(struct rte_flow_item_eth));
- memset(ð_mask, 0, sizeof(struct rte_flow_item_eth));
-
items[items_counter].type = RTE_FLOW_ITEM_TYPE_ETH;
items[items_counter].spec = ð_spec;
items[items_counter].mask = ð_mask;
@@ -38,16 +35,12 @@ add_vlan(struct rte_flow_item *items,
uint8_t items_counter,
__rte_unused struct additional_para para)
{
- static struct rte_flow_item_vlan vlan_spec;
- static struct rte_flow_item_vlan vlan_mask;
-
- uint16_t vlan_value = VLAN_VALUE;
-
- memset(&vlan_spec, 0, sizeof(struct rte_flow_item_vlan));
- memset(&vlan_mask, 0, sizeof(struct rte_flow_item_vlan));
-
- vlan_spec.tci = RTE_BE16(vlan_value);
- vlan_mask.tci = RTE_BE16(0xffff);
+ static struct rte_flow_item_vlan vlan_spec = {
+ .tci = RTE_BE16(VLAN_VALUE),
+ };
+ static struct rte_flow_item_vlan vlan_mask = {
+ .tci = RTE_BE16(0xffff),
+ };
items[items_counter].type = RTE_FLOW_ITEM_TYPE_VLAN;
items[items_counter].spec = &vlan_spec;
@@ -61,9 +54,6 @@ add_ipv4(struct rte_flow_item *items,
static struct rte_flow_item_ipv4 ipv4_spec;
static struct rte_flow_item_ipv4 ipv4_mask;
- memset(&ipv4_spec, 0, sizeof(struct rte_flow_item_ipv4));
- memset(&ipv4_mask, 0, sizeof(struct rte_flow_item_ipv4));
-
ipv4_spec.hdr.src_addr = RTE_BE32(para.src_ip);
ipv4_mask.hdr.src_addr = RTE_BE32(0xffffffff);
@@ -80,9 +70,6 @@ add_ipv6(struct rte_flow_item *items,
static struct rte_flow_item_ipv6 ipv6_spec;
static struct rte_flow_item_ipv6 ipv6_mask;
- memset(&ipv6_spec, 0, sizeof(struct rte_flow_item_ipv6));
- memset(&ipv6_mask, 0, sizeof(struct rte_flow_item_ipv6));
-
/** Set ipv6 src **/
memset(&ipv6_spec.hdr.src_addr, para.src_ip,
sizeof(ipv6_spec.hdr.src_addr) / 2);
@@ -104,9 +91,6 @@ add_tcp(struct rte_flow_item *items,
static struct rte_flow_item_tcp tcp_spec;
static struct rte_flow_item_tcp tcp_mask;
- memset(&tcp_spec, 0, sizeof(struct rte_flow_item_tcp));
- memset(&tcp_mask, 0, sizeof(struct rte_flow_item_tcp));
-
items[items_counter].type = RTE_FLOW_ITEM_TYPE_TCP;
items[items_counter].spec = &tcp_spec;
items[items_counter].mask = &tcp_mask;