On 7 Jun 2024, at 15:46, Mike Pattrick wrote:
> On Fri, Jun 7, 2024 at 2:35 AM Eelco Chaudron <[email protected]> wrote: >> >> >> >> On 6 Jun 2024, at 3:07, Mike Pattrick wrote: >> >>> This patch extends the extra_keywords list from 324 to 747 keywords and >>> moves this list to a separate file. The methodology used to create this >>> list was running the spell checker on a large volume of historical >>> patches and selecting any words that appeared multiple times. >> >> Thanks Mike, >> >> I like the idea of having this in a separate file (I would add the .txt >> extension to it), however, just blindly taking the last x errors does not >> seem to be the right approach. >> >> Last time I took the words from the last 1000 commits that made sense. For >> example, things like countersfn, deviceiocontrol, etc. do not make sense to >> me to add. > > Why wouldn't we want something like deviceiocontrol in an exclusion > list? It's a common Windows function name, any commit that touches the > windows code has a high likelihood of including it. Well deviceiocontrol is maybe an outlier, but there is a lot of other stuff we should not add. And even though, it only checks comments and commit messages. To make it easier to review the words added, maybe split the patch in two patches. One moving words to checkpatch.words, or some other self explanatory name, and the other one introducing the additional words. Thoughts? //Eelco >>> The rational for using a separate file is to make management of this >>> list simpler by decoupling the code from the keywords. >>> >>> Signed-off-by: Mike Pattrick <[email protected]> >>> --- >>> v2: Included new file in distfiles >>> --- >>> utilities/automake.mk | 1 + >>> utilities/checkpatch.py | 67 +--- >>> utilities/extra_keywords | 747 +++++++++++++++++++++++++++++++++++++++ >>> 3 files changed, 751 insertions(+), 64 deletions(-) >>> create mode 100644 utilities/extra_keywords >>> >>> diff --git a/utilities/automake.mk b/utilities/automake.mk >>> index 146b8c37f..3f14c0fef 100644 >>> --- a/utilities/automake.mk >>> +++ b/utilities/automake.mk >>> @@ -65,6 +65,7 @@ EXTRA_DIST += \ >>> utilities/ovs-vlan-test.in \ >>> utilities/ovs-vsctl-bashcomp.bash \ >>> utilities/checkpatch.py \ >>> + utilities/extra_keywords \ >>> utilities/docker/Makefile \ >>> utilities/docker/ovs-override.conf \ >>> utilities/docker/start-ovs \ >>> diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py >>> index 6b293770d..08b5870d3 100755 >>> --- a/utilities/checkpatch.py >>> +++ b/utilities/checkpatch.py >>> @@ -49,70 +49,9 @@ def open_spell_check_dict(): >>> codespell_file = '' >>> >>> try: >>> - extra_keywords = ['ovs', 'vswitch', 'vswitchd', 'ovs-vswitchd', >>> - 'netdev', 'selinux', 'ovs-ctl', 'dpctl', 'ofctl', >>> - 'openvswitch', 'dpdk', 'hugepage', 'hugepages', >>> - 'pmd', 'upcall', 'vhost', 'rx', 'tx', >>> 'vhostuser', >>> - 'openflow', 'qsort', 'rxq', 'txq', 'perf', >>> 'stats', >>> - 'struct', 'int', 'char', 'bool', 'upcalls', >>> 'nicira', >>> - 'bitmask', 'ipv4', 'ipv6', 'tcp', 'tcp4', >>> 'tcpv4', >>> - 'udp', 'udp4', 'udpv4', 'icmp', 'icmp4', >>> 'icmpv6', >>> - 'vlan', 'vxlan', 'cksum', 'csum', 'checksum', >>> - 'ofproto', 'numa', 'mempool', 'mempools', 'mbuf', >>> - 'mbufs', 'hmap', 'cmap', 'smap', 'dhcpv4', >>> 'dhcp', >>> - 'dhcpv6', 'opts', 'metadata', 'geneve', 'mutex', >>> - 'netdev', 'netdevs', 'subtable', 'virtio', 'qos', >>> - 'policer', 'datapath', 'tunctl', 'attr', >>> 'ethernet', >>> - 'ether', 'defrag', 'defragment', 'loopback', >>> 'sflow', >>> - 'acl', 'initializer', 'recirc', 'xlated', >>> 'unclosed', >>> - 'netlink', 'msec', 'usec', 'nsec', 'ms', 'us', >>> 'ns', >>> - 'kilobits', 'kbps', 'kilobytes', 'megabytes', >>> 'mbps', >>> - 'gigabytes', 'gbps', 'megabits', 'gigabits', >>> 'pkts', >>> - 'tuple', 'miniflow', 'megaflow', 'conntrack', >>> - 'vlans', 'vxlans', 'arg', 'tpid', 'xbundle', >>> - 'xbundles', 'mbundle', 'mbundles', 'netflow', >>> - 'localnet', 'odp', 'pre', 'dst', 'dest', 'src', >>> - 'ethertype', 'cvlan', 'ips', 'msg', 'msgs', >>> - 'liveness', 'userspace', 'eventmask', >>> 'datapaths', >>> - 'slowpath', 'fastpath', 'multicast', 'unicast', >>> - 'revalidation', 'namespace', 'qdisc', 'uuid', >>> - 'ofport', 'subnet', 'revalidation', >>> 'revalidator', >>> - 'revalidate', 'l2', 'l3', 'l4', 'openssl', 'mtu', >>> - 'ifindex', 'enum', 'enums', 'http', 'https', >>> 'num', >>> - 'vconn', 'vconns', 'conn', 'nat', 'memset', >>> 'memcmp', >>> - 'strcmp', 'strcasecmp', 'tc', 'ufid', 'api', >>> - 'ofpbuf', 'ofpbufs', 'hashmaps', 'hashmap', >>> 'deref', >>> - 'dereference', 'hw', 'prio', 'sendmmsg', >>> 'sendmsg', >>> - 'malloc', 'free', 'alloc', 'pid', 'ppid', 'pgid', >>> - 'uid', 'gid', 'sid', 'utime', 'stime', 'cutime', >>> - 'cstime', 'vsize', 'rss', 'rsslim', 'whcan', >>> 'gtime', >>> - 'eip', 'rip', 'cgtime', 'dbg', 'gw', 'sbrec', >>> 'bfd', >>> - 'sizeof', 'pmds', 'nic', 'nics', 'hwol', 'encap', >>> - 'decap', 'tlv', 'tlvs', 'decapsulation', 'fd', >>> - 'cacheline', 'xlate', 'skiplist', 'idl', >>> - 'comparator', 'natting', 'alg', 'pasv', 'epasv', >>> - 'wildcard', 'nated', 'amd64', 'x86_64', >>> - 'recirculation', 'linux', 'afxdp', 'promisc', >>> 'goto', >>> - 'misconfigured', 'misconfiguration', >>> 'checkpatch', >>> - 'debian', 'travis', 'cirrus', 'appveyor', 'faq', >>> - 'erspan', 'const', 'hotplug', 'addresssanitizer', >>> - 'ovsdb', 'dpif', 'veth', 'rhel', 'jsonrpc', >>> 'json', >>> - 'syscall', 'lacp', 'ipf', 'skb', 'valgrind', >>> - 'appctl', 'arp', 'asan', 'backport', 'backtrace', >>> - 'chmod', 'ci', 'cpu', 'cpus', 'dnat', 'dns', >>> 'dpcls', >>> - 'eol', 'ethtool', 'fdb', 'freebsd', 'gcc', >>> 'github', >>> - 'glibc', 'gre', 'inlined', 'ip', 'ipfix', >>> 'ipsec', >>> - 'ixgbe', 'libbpf', 'libcrypto', 'libgcc', >>> - 'libopenvswitch', 'libreswan', 'libssl', >>> 'libxdp', >>> - 'lldp', 'llvm', 'lockless', 'mcast', 'megaflows', >>> - 'mfex', 'ncat', 'networkmanager', 'pcap', >>> 'pedit', >>> - 'pidfile', 'pps', 'rculist', 'rebalance', >>> 'rebased' >>> - 'recirculations', 'revalidators', 'rst', 'sed', >>> - 'shrinked', 'snat', 'stderr', 'stdout', >>> 'testpmd', >>> - 'tftp', 'timeval', 'trie', 'tso', 'ubsan', >>> 'ukey', >>> - 'umask', 'unassociated', 'unixctl', 'uuid' >>> - 'virtqueue', 'vms', 'vnet', 'vport', 'vports', >>> - 'vtep', 'wc', 'wget', 'xenserver'] >>> + ek_file = os.path.join(os.path.dirname(__file__), "extra_keywords") >>> + with open(ek_file) as fh: >>> + extra_keywords = fh.read().strip().split("\n") >>> >>> global spell_check_dict >>> >>> diff --git a/utilities/extra_keywords b/utilities/extra_keywords >>> new file mode 100644 >>> index 000000000..24dba312f >>> --- /dev/null >>> +++ b/utilities/extra_keywords >>> @@ -0,0 +1,747 @@ >>> +ack >>> +ackd >>> +acked >>> +acl >>> +acls >>> +addr >>> +addresssanitizer >>> +addrs >>> +adminpointtopointmac >>> +afxdp >>> +ageing >>> +aggregator >>> +aiocbs >>> +alg >>> +algs >>> +alloc >>> +amd64 >>> +api >>> +apis >>> +appctl >>> +appveyor >>> +arg >>> +args >>> +argv >>> +arp >>> +asan >>> +async >>> +attr >>> +attrs >>> +autoattach >>> +automagically >>> +autovalidation >>> +autovalidator >>> +backoff >>> +backport >>> +backrefs >>> +backtrace >>> +behaviour >>> +bfd >>> +bfddesiredmintxinterval >>> +bfddetectmult >>> +bfdlocaldiag >>> +bfdlocaldiscr >>> +bfdremotediscr >>> +bfdremoteminrxinterval >>> +bfdremotesessionstate >>> +bfdrequiredminrxinterval >>> +bfdsessionstate >>> +bitmask >>> +bitmasks >>> +bitwise >>> +bondable >>> +bool >>> +boolean >>> +bools >>> +bpdus >>> +br >>> +bugfix >>> +bundlable >>> +byteq >>> +cacheline >>> +calc >>> +callees >>> +cas >>> +cbset >>> +cbsets >>> +ccm >>> +cfm >>> +cgtime >>> +char >>> +chdir >>> +checkpatch >>> +checksum >>> +chmod >>> +choosen >>> +ci >>> +cid >>> +cirrus >>> +cksum >>> +classid >>> +classtype >>> +cmap >>> +cmask >>> +comparator >>> +config >>> +conn >>> +connmgr >>> +conntrack >>> +const >>> +counterscountdown >>> +countersfn >>> +cpu >>> +cpus >>> +cq >>> +cstime >>> +csum >>> +ctrlc >>> +ctx >>> +cutime >>> +cvlan >>> +cvlans >>> +daemonization >>> +daemonman >>> +datagram >>> +datagrams >>> +datap >>> +datapath >>> +datapaths >>> +datastructure >>> +datastructures >>> +dbg >>> +debian >>> +decap >>> +decapsulation >>> +decrement >>> +defrag >>> +defragment >>> +defragmented >>> +del >>> +deref >>> +dereference >>> +desc >>> +descs >>> +dest >>> +destructor >>> +dev >>> +devargs >>> +deviceiocontrol >>> +dhcp >>> +dhcpv4 >>> +dhcpv6 >>> +dir >>> +distro >>> +dnat >>> +dns >>> +dp >>> +dpcls >>> +dpctl >>> +dpdk >>> +dpif >>> +dpifs >>> +dpname >>> +dport >>> +ds >>> +dscp >>> +dsi >>> +dst >>> +eariler >>> +eip >>> +elementname >>> +elems >>> +emc >>> +encap >>> +endian >>> +endianness >>> +enqueue >>> +enum >>> +enums >>> +eol >>> +epasv >>> +epoll >>> +equel >>> +errno >>> +erspan >>> +eth >>> +ether >>> +ethernet >>> +ethertype >>> +ethtool >>> +eventmask >>> +failover >>> +faq >>> +fastpath >>> +fd >>> +fdb >>> +fds >>> +filenames >>> +fixup >>> +flowmap >>> +fn >>> +fns >>> +fport >>> +fq >>> +fragemnt >>> +fragoffset >>> +free >>> +freebsd >>> +fsm >>> +fsms >>> +fsyncs >>> +func >>> +gbp >>> +gbps >>> +gcc >>> +geneve >>> +genl >>> +genlmsghdr >>> +getlasterror >>> +getopt >>> +ghz >>> +gid >>> +gigabits >>> +gigabytes >>> +github >>> +glibc >>> +goto >>> +gre >>> +gtime >>> +gw >>> +hashmap >>> +hashmaps >>> +hasmask >>> +hindex >>> +hitmask >>> +hmap >>> +hotplug >>> +htb >>> +http >>> +https >>> +hugepage >>> +hugepages >>> +hw >>> +hwaddr >>> +hwol >>> +icmp >>> +icmp4 >>> +icmpv6 >>> +idl >>> +idx >>> +ifadminstatus >>> +ifdefs >>> +ifdirection >>> +iff >>> +ifindex >>> +ifoperstatus >>> +iftype >>> +ihl >>> +impl >>> +incudes >>> +inferiordesignatedinfo >>> +inferiorrootalternateinfo >>> +init >>> +initializer >>> +inlined >>> +inmon >>> +inode >>> +instanceid >>> +instantiations >>> +int >>> +interdependencies >>> +intrvl >>> +inuse >>> +iovecs >>> +ip >>> +ipf >>> +ipfix >>> +ips >>> +ipsec >>> +ipv4 >>> +ipv6 >>> +iter >>> +iters >>> +ixgbe >>> +jeq >>> +jf >>> +json >>> +jsonrpc >>> +jt >>> +jumptable >>> +kbits >>> +kbps >>> +kilobit >>> +kilobits >>> +kilobytes >>> +kpkts >>> +l2 >>> +l3 >>> +l4 >>> +lacp >>> +ldh >>> +le >>> +len >>> +lexograpically >>> +libbpf >>> +libcrypto >>> +libgcc >>> +libopenvswitch >>> +libreswan >>> +libssl >>> +libtool >>> +libxdp >>> +linearized >>> +linux >>> +liveness >>> +lldp >>> +llvm >>> +localalloc >>> +localnet >>> +lockfile >>> +lockfiles >>> +lockless >>> +lookups >>> +loopback >>> +lse >>> +lses >>> +malloc >>> +matchall >>> +maximun >>> +mbps >>> +mbuf >>> +mbufs >>> +mbundle >>> +mbundles >>> +mcast >>> +mcheck >>> +md >>> +mdb >>> +mdlen >>> +mdtype >>> +meagaflow >>> +megabits >>> +megabytes >>> +megaflow >>> +megaflows >>> +memcmp >>> +memcpy >>> +mempool >>> +mempools >>> +memset >>> +metadata >>> +metedata >>> +mf >>> +mfex >>> +miimon >>> +minfiflow >>> +minfilow >>> +miniflow >>> +miniflows >>> +minimask >>> +minimatch >>> +misconfiguration >>> +misconfigured >>> +morefrag >>> +mpids >>> +mpls >>> +mpool >>> +mport >>> +mports >>> +mps >>> +mrouter >>> +ms >>> +msbs >>> +msdn >>> +msec >>> +msecs >>> +msg >>> +msgs >>> +mtime >>> +mtu >>> +multicast >>> +multipart >>> +multipath >>> +mutex >>> +nameserver >>> +namespace >>> +nano >>> +nat >>> +nated >>> +natted >>> +natting >>> +ncat >>> +negotating >>> +netbsd >>> +netdev >>> +netdevh >>> +netdevs >>> +netem >>> +netfilter >>> +netflow >>> +netlink >>> +netmask >>> +netnsid >>> +networkmanager >>> +nfgenmsg >>> +nic >>> +nicira >>> +nics >>> +nlattr >>> +nlattrs >>> +nlmsghdr >>> +nln >>> +nonblocking >>> +nonmiss >>> +nonnegative >>> +nonnull >>> +np >>> +ns >>> +nsec >>> +nsh >>> +num >>> +numa >>> +numas >>> +nxt >>> +odp >>> +ofbundle >>> +ofconn >>> +ofconns >>> +ofctl >>> +offloadling >>> +ofmonitor >>> +ofmonitors >>> +ofpact >>> +ofpacts >>> +ofpbuf >>> +ofpbufs >>> +ofperr >>> +ofphdrs >>> +ofport >>> +ofproto >>> +ofprotoc >>> +ofprotos >>> +ofs >>> +ofservice >>> +ofservices >>> +oftable >>> +oftables >>> +ok >>> +oopsing >>> +opcode >>> +openbsd >>> +openflow >>> +openssl >>> +openvswitch >>> +optreset >>> +opts >>> +oses >>> +otherinfo >>> +oversized >>> +ovs >>> +ovs-ctl >>> +ovsdb >>> +ovshdr >>> +ovs-vswitchd >>> +oxm >>> +pagp >>> +param >>> +pasv >>> +pcap >>> +pdus >>> +pedit >>> +perf >>> +pgid >>> +physdev >>> +pid >>> +pidfile >>> +pinqueue >>> +pinqueues >>> +pkts >>> +plen >>> +ploc >>> +pmd >>> +pmds >>> +policer >>> +poller >>> +pollers >>> +popcount >>> +popcounts >>> +ppid >>> +pps >>> +pre >>> +preallocate >>> +prefetch >>> +prefsrc >>> +prepended >>> +prepending >>> +preprocessing >>> +prereqs >>> +prev >>> +printf >>> +prio >>> +proccesing >>> +promisc >>> +proto >>> +ps >>> +psched >>> +psids >>> +pssl >>> +pstream >>> +ptr >>> +ptrs >>> +pvconn >>> +pvconns >>> +pvector >>> +qdisc >>> +qdiscs >>> +qos >>> +qsort >>> +queueing >>> +queuesn >>> +quiesce >>> +rconn >>> +rculist >>> +reassmebled >>> +rebalance >>> +rebalances >>> +rebalancing >>> +rebased >>> +receiverindex >>> +recirc >>> +recircs >>> +recirculation >>> +recirculations >>> +reconfigures >>> +reconfiguring >>> +reconnection >>> +recv >>> +recvmmsg >>> +refcount >>> +reftable >>> +regs >>> +relavent >>> +reparse >>> +reparsed >>> +repeateddesignatedinfo >>> +represenation >>> +resize >>> +resync >>> +resyncs >>> +ret >>> +reta >>> +retrans >>> +revalidate >>> +revalidated >>> +revalidation >>> +revalidator >>> +revalidators >>> +rhel >>> +rip >>> +rmps >>> +rngs >>> +rss >>> +rsslim >>> +rst >>> +rstp >>> +rtab >>> +rtmsg >>> +rtnetlink >>> +rtnl >>> +runtime >>> +rwlock >>> +rwlockattr >>> +rx >>> +rxes >>> +rxq >>> +rxqs >>> +samplepool >>> +sbrec >>> +sed >>> +selinux >>> +sendmmsg >>> +sendmsg >>> +seqno >>> +seqs >>> +setproctitle >>> +sflow >>> +sflowcpinterval >>> +shash >>> +shinfo >>> +shrinked >>> +sid >>> +significiant >>> +sizeof >>> +skb >>> +skiplist >>> +slowpath >>> +smap >>> +snaplen >>> +snat >>> +sockaddr >>> +spammy >>> +src >>> +ssl >>> +startservicectrldispatcher >>> +startup >>> +stats >>> +stderr >>> +stdin >>> +stdout >>> +stime >>> +strcasecmp >>> +strcmp >>> +struct >>> +structs >>> +subfield >>> +subid >>> +subnet >>> +subprocess >>> +subrules >>> +subseconds >>> +substrings >>> +subtable >>> +subtables >>> +subtype >>> +superiordesignatedinfo >>> +superset >>> +symlink >>> +symlinks >>> +synack >>> +syscall >>> +syslog >>> +syslogger >>> +tbl >>> +tc >>> +tcmsg >>> +tcp >>> +tcp4 >>> +tcpdump >>> +tcpv4 >>> +testpmd >>> +tftp >>> +timestamp >>> +timestamps >>> +timetracking >>> +timeval >>> +tlv >>> +tlvs >>> +tnl >>> +tos >>> +tpid >>> +travis >>> +trie >>> +trunked >>> +tso >>> +ttl >>> +tty >>> +tunctl >>> +tuple >>> +tuples >>> +tx >>> +txbuf >>> +txcount >>> +txed >>> +txn >>> +txq >>> +txqs >>> +typename >>> +ubsan >>> +udp >>> +udp4 >>> +udpif >>> +udpv4 >>> +ufid >>> +uid >>> +ukey >>> +ukeys >>> +umap >>> +umask >>> +umem >>> +unassociated >>> +unbundlable >>> +unclosed >>> +undef >>> +unfragmented >>> +unicast >>> +unicode >>> +unix >>> +unixctl >>> +unlink >>> +unlinked >>> +unlinks >>> +unparseable >>> +unparsed >>> +unref >>> +unreferenced >>> +unrefs >>> +unsets >>> +untagged >>> +unwildcard >>> +unwildcarded >>> +unwildcarding >>> +upcall >>> +upcalls >>> +uptime >>> +us >>> +usec >>> +userdata >>> +userspace >>> +usersystem >>> +utilh >>> +utils >>> +utime >>> +uuid >>> +valgrind >>> +validator >>> +validators >>> +vconn >>> +vconns >>> +vds >>> +ver >>> +versionable >>> +veth >>> +vhost >>> +vhostuser >>> +vif >>> +virtio >>> +virtqueue >>> +vlan >>> +vlans >>> +vlog >>> +vms >>> +vnet >>> +vport >>> +vports >>> +vq >>> +vsize >>> +vswitch >>> +vswitchd >>> +vtep >>> +vxlan >>> +vxlans >>> +wakeup >>> +wc >>> +wevent >>> +wget >>> +whcan >>> +whitespace >>> +wildcard >>> +wildcarded >>> +wildcards >>> +wsapoll >>> +x86_64 >>> +xbridge >>> +xbundle >>> +xbundles >>> +xcache >>> +xcfgp >>> +xenserver >>> +xid >>> +xinflow >>> +xlate >>> +xlated >>> +xnanosleep >>> +xpacket >>> +xport >>> +xports >>> +xsk >>> +xstats >>> -- >>> 2.39.3 >>> >>> _______________________________________________ >>> dev mailing list >>> [email protected] >>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev >> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
