devtools: allow patch to multiple groups for the same driver

Message ID 20230420121240.28035-1-viacheslavo@nvidia.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers
Series devtools: allow patch to multiple groups for the same driver |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Slava Ovsiienko April 20, 2023, 12:12 p.m. UTC
  The PMD's source code resides in the ./drivers folder of the
DPDK project and split into the several groups depending on the
PMD class (common, net, regex, etc.).

For some vendors the drivers of different classes operate over
the same hardware, for example Nvidia PMDs operate over ConnectX
NIC series. It often happens the same minor fixes should be applied
to the multiple drivers of the same vendor in the different classes.

The check-git-log.sh script checks the consistence of patch
affected files and patch commit message headline and prevents
updating multiple drivers in single commit.

This patch mitigates this strict check and allows to update
multiple drivers in different classes for the single vendor.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 devtools/check-git-log.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index af751e49ab..b66e8fe553 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -80,7 +80,9 @@  bad=$(for commit in $commits ; do
 		continue
 	drv=$(echo "$files" | grep '^drivers/' | cut -d "/" -f 2,3 | sort -u)
 	drvgrp=$(echo "$drv" | cut -d "/" -f 1 | uniq)
-	if [ $(echo "$drvgrp" | wc -l) -gt 1 ] ; then
+	drvpmd=$(echo "$drv" | cut -d "/" -f 2 | uniq)
+	if [ $(echo "$drvgrp" | wc -l) -gt 1 ] && \
+	   [ $(echo "$drvpmd" | wc -l) -gt 1 ] ; then
 		echo "$headline" | grep -v '^drivers:'
 	elif [ $(echo "$drv" | wc -l) -gt 1 ] ; then
 		echo "$headline" | grep -v "^drivers/$drvgrp"