kandi background
Explore Kits

pmd | An extensible multilanguage static code analyzer. | Code Analyzer library

 by   pmd Java Version: pmd_releases/6.43.0 License: Non-SPDX

 by   pmd Java Version: pmd_releases/6.43.0 License: Non-SPDX

Download this library from

kandi X-RAY | pmd Summary

pmd is a Java library typically used in Code Quality, Code Analyzer applications. pmd has no bugs, it has no vulnerabilities, it has build file available and it has high support. However pmd has a Non-SPDX License. You can download it from GitHub, Maven.
PMD is a source code analyzer. It finds common programming flaws like unused variables, empty catch blocks, unnecessary object creation, and so forth. It supports many languages. It can be extended with custom rules. It uses JavaCC and Antlr to parse source files into abstract syntax trees (AST) and runs rules against them to find violations. Rules can be written in Java or using a XPath query. It supports Java, JavaScript, Salesforce.com Apex and Visualforce, Modelica, PLSQL, Apache Velocity, XML, XSL, Scala. Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code in C/C++, C#, Dart, Fortran, Go, Groovy, Java, JavaScript, JSP, Kotlin, Lua, Matlab, Modelica, Objective-C, Perl, PHP, PLSQL, Python, Ruby, Salesforce.com Apex, Scala, Swift, Visualforce and XML. In the future we hope to add support for data/control flow analysis and automatic (quick) fixes where it makes sense.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • pmd has a highly active ecosystem.
  • It has 3763 star(s) with 1268 fork(s). There are 139 watchers for this library.
  • There were 1 major release(s) in the last 6 months.
  • There are 574 open issues and 1235 have been closed. On average issues are closed in 377 days. There are 15 open pull requests and 0 closed requests.
  • It has a negative sentiment in the developer community.
  • The latest version of pmd is pmd_releases/6.43.0
pmd Support
Best in #Code Analyzer
Average in #Code Analyzer
pmd Support
Best in #Code Analyzer
Average in #Code Analyzer

quality kandi Quality

  • pmd has no bugs reported.
pmd Quality
Best in #Code Analyzer
Average in #Code Analyzer
pmd Quality
Best in #Code Analyzer
Average in #Code Analyzer

securitySecurity

  • pmd has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
pmd Security
Best in #Code Analyzer
Average in #Code Analyzer
pmd Security
Best in #Code Analyzer
Average in #Code Analyzer

license License

  • pmd has a Non-SPDX License.
  • Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
pmd License
Best in #Code Analyzer
Average in #Code Analyzer
pmd License
Best in #Code Analyzer
Average in #Code Analyzer

buildReuse

  • pmd releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are available. Examples and code snippets are not available.
pmd Reuse
Best in #Code Analyzer
Average in #Code Analyzer
pmd Reuse
Best in #Code Analyzer
Average in #Code Analyzer
Top functions reviewed by kandi - BETA

kandi has reviewed pmd and discovered the below as its top functions. This is intended to give you an instant insight into pmd implemented functionality, and help decide if they suit your requirements.

  • Compute paths .
  • Generate rule set index .
  • Check for dead links in pages directory .
  • Start the task .
  • Determines the list of argument types for a method invocation .
  • Determines if an import should be avoided .
  • This method parses the given rule and builds the given node .
  • Gets the source object list .
  • Check for accessibility of given node .
  • Run the GraphChecker .

pmd Key Features

An extensible multilanguage static code analyzer.

DPDK l2fwd - How to forward ethernet interface to my PMD

copy iconCopydownload iconDownload
./dpdk-l2fwd -c 0x3 --vdev={MY_PMD}0 -- -p 0x3 -T 1

Docker-Compose with Commandbox cannot change web root

copy iconCopydownload iconDownload
image: ortussolutions/commandbox:lucee5
ENV APP_DIR=/app/public
-----------------------
image: ortussolutions/commandbox:lucee5
ENV APP_DIR=/app/public

Configure Gradle Plugin inside Gradle plugin

copy iconCopydownload iconDownload
URL resourceURL = getClass().getClassLoader().getResource("checkstyle.xml");
if (resourceURL != null) {
  File resourceFile = File(resourceURL.getFile());
  checkstyleExtension.setConfigFile(resourceFile);
} 
File temp = File.createTempFile(".checkstyle", ".xml")
try (FileOutputStream out = new FileOutputStream(temp)) {
  try (InputStream resourceStream = getClass().getClassLoader().getResourceAsStream("checkstyle.xml")) {
    byte[] buffer = new byte[1024];
    int bytes = resourceStream.read(buffer);
    while (bytes >= 0) {
      out.write(buffer, 0, bytes);
      bytes = resourceStream.read(buffer);
    }
  }
}
-----------------------
URL resourceURL = getClass().getClassLoader().getResource("checkstyle.xml");
if (resourceURL != null) {
  File resourceFile = File(resourceURL.getFile());
  checkstyleExtension.setConfigFile(resourceFile);
} 
File temp = File.createTempFile(".checkstyle", ".xml")
try (FileOutputStream out = new FileOutputStream(temp)) {
  try (InputStream resourceStream = getClass().getClassLoader().getResourceAsStream("checkstyle.xml")) {
    byte[] buffer = new byte[1024];
    int bytes = resourceStream.read(buffer);
    while (bytes >= 0) {
      out.write(buffer, 0, bytes);
      bytes = resourceStream.read(buffer);
    }
  }
}

Use of Deprecated PMD rules

copy iconCopydownload iconDownload
  <rule ref="rulesets/apex/complexity.xml/AvoidDeeplyNestedIfStmts" />
  <rule ref="category/apex/design.xml/AvoidDeeplyNestedIfStmts" />
-----------------------
  <rule ref="rulesets/apex/complexity.xml/AvoidDeeplyNestedIfStmts" />
  <rule ref="category/apex/design.xml/AvoidDeeplyNestedIfStmts" />

Spring boot 2.6.0 Error creating bean with name 'webSecurityConfig'

copy iconCopydownload iconDownload
@Bean
public static BCryptPasswordEncoder bcryptPasswordEncoder() {
    return new BCryptPasswordEncoder();
}

Jenkins PMD details from docker: Copying the source file failed

copy iconCopydownload iconDownload
...
   volumes:
      - "${WORKSPACE}:${WORKSPACE}"
...

DPDK for general purpose workload

copy iconCopydownload iconDownload
  External Port <==> DPDK Port0 (L2fwd) DPDK net_vhost <--> QEMU (virtio-pci)

While building the project getting error , Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.4:jar (attach-javadocs)

copy iconCopydownload iconDownload
mvn -Dmaven.javadoc.skip=true verify
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <version>...</version>

  <configuration>
    <additionalOptions>
      <additionalOption>-Xdoclint:none</additionalOption>
    </additionalOptions>
  </configuration>
</plugin>
-----------------------
mvn -Dmaven.javadoc.skip=true verify
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-javadoc-plugin</artifactId>
  <version>...</version>

  <configuration>
    <additionalOptions>
      <additionalOption>-Xdoclint:none</additionalOption>
    </additionalOptions>
  </configuration>
</plugin>

pktgen cannot send packet in ovs dpdk scenario

copy iconCopydownload iconDownload
DPDK Pktgen (net_vhost) <==> OVS-DPDK port-1 (virtio_user) {Rule to forward} OVS-DPDK port-2 (virtio_user) <==> DPDK Pktgen (net_vhost) 

How to set a loop forwarding mode from one NIC to another in DPDK testpmd?

copy iconCopydownload iconDownload
./app/dpdk-testpmd -l 2,3 -- --total-num-mbufs=2048 -i --portmask=0x3 --tx-first
./app/dpdk-testpmd -l 2,3 -- --total-num-mbufs=2048 -i --portmask=0x3 --tx-first --auto-start -i
-----------------------
./app/dpdk-testpmd -l 2,3 -- --total-num-mbufs=2048 -i --portmask=0x3 --tx-first
./app/dpdk-testpmd -l 2,3 -- --total-num-mbufs=2048 -i --portmask=0x3 --tx-first --auto-start -i

Community Discussions

Trending Discussions on pmd
  • How to load balance by way of round-robin in DPDK using RTE_FLOW?
  • Artifactory Gradle Plugin deploys only build.info
  • DPDK l2fwd - How to forward ethernet interface to my PMD
  • Does virt_to_pfn checks whether the page table exists or not
  • Docker-Compose with Commandbox cannot change web root
  • Configure Gradle Plugin inside Gradle plugin
  • Use of Deprecated PMD rules
  • Spring boot 2.6.0 Error creating bean with name 'webSecurityConfig'
  • Jenkins PMD details from docker: Copying the source file failed
  • Why is PMD give different results for Eclipse and Gradle?
Trending Discussions on pmd

QUESTION

How to load balance by way of round-robin in DPDK using RTE_FLOW?

Asked 2022-Mar-26 at 02:47

in my problem RSS did not have a good load balance between CPU cores case the rx packets has been modified by insert tags between mac and ip so the dpdk could not recognize it.assume I want to load balance by way of round-robin, Multiple rx queues have been set up. in this question answer: How to disable RSS but still using multiple RX queues in DPDK? it says its possible to load balance in round robin fashion by using RTE_FLOW. what is the right way to do it grammatically ? I would like to know the API or structs for setting up the round-robin method here is my runtime environment infomation: 1)dpdk version: 19.11.9 2)nic PMD :ixgbe 3) fireware:825999 and XXV710 4) os version: ubuntu 16.04 kernel:4.4.0-186

ANSWER

Answered 2022-Mar-26 at 02:47

As per the question

RSS did not have a good load balance between CPU cores case the rx packets has been modified by insert tags between mac and ip

There are couple of items which needs to be clarified. so let me explain

  1. Certain Physical and virtual NIC exposes RSS via DPDK RX offload for fixed tuples like IP, Protocol, TCP|UDP|SCTP port number.
  2. Certain NIC allows to configure the hash reta algorithm to better suit to needs (example when the source destination IP address is fixed we can skip and use others).
  3. As I recollect from DPDK 18.11, RTE_FLOW is been introduced to support RSS on selected RX queues (example Q1,Q2,Q3 can be RSS for TCP packets while Q4,Q5 can be used for UDP). But again this is based on the either Inner or Outer IP+PORT number
  4. For DPDK version 19.11 onwards RTE_FLOW is been enhanced to support RAW Pattern. The intend of this feature is support Special protocol which by default the NIC does not understand like (VXLAN, GENEVE, RTP and other protocols).
  5. For NIC like Fortville & Columbiaville (from Intel) allows loading of special firmware via DDP (Dynamic Device Personation) to configure special fabric headers or MPLS like headers (between ethernet and ip) to be parsed, lookup and used as seed for RSS (allowing better distribution).
  6. There are NIC which do support L2 layer but these would be limited SMAC, DMAC, VLAN1,VLAn2, MPLS only and not custom header.

Hence depending upon NIC, vendor, RSS support for L2 and firmware the ability calculating RSS on fields between varies in port init or RTE_FLOW specific configuration. For example RSS ETH supported on

  1. I40E is I40E_INSET_DMAC | I40E_INSET_SMAC
  2. DPAA2 is NH_FLD_ETH_TYPE and NET_PROT_ETH
  3. CNXK is RSS_DMAC_INDEX
  4. OCTEONX2 is FLOW_KEY_TYPE_VLAN and FLOW_KEY_TYPE_CH_LEN_90B

Hence for NIC ixgbe and XXV710 there is no ready support for the custom header between ethernet and IP.

Alternatives:

  1. Use a smart NIC or FPGA: that is programmed to parse and RSS on your specific headers to RSS on multiple RX queue
  2. Work with Intel using XXV710 (Fortville): to create DDP which can parse your specific headers as RSS on multiple RX queue.
  3. Identify DPDK NIC: which can parse RAW header as defined 12.2.6.2. Once the support is added by the vendor you can create a simple traffic spread tool which will ensure traffic distribution across the desired RX queues in round robin fashion.
  4. Use SW to support the missing hardware.

note: I am not recommending use of HW based static Round Robin as it will create 2 fold problem

  • if it is pure DPDK BOND Round ROBIN you will not have any flow pinning
  • If you use hash based pinning, there are chances elephant flow can pushed 1 or a few queues causing performance drops in cpu processing.
  • My recommendation is to use EVENTDEV model with atomic mode, which ensure better cache locality (at a given instance same flows will fall onto worker thread) and almost linear performance performance. sample app

For option 4 (Software Model):

  1. Disable RSS in port_init function
  2. Use single RX queue to receive all the packet either custom rx thread.
  3. calculate the hash based on the desired header and update mbuf hash field.
  4. Use rte_distributor library to spread traffic based on the custom.
  5. or use rte_eventdev with atomic model to spread the work load on multiple worker.

[Clarification from Comments]:

  1. I have asked relevant practitioners, they said modifying the pmd driver can solves my problem, its the only way?

[ANSWER] Since you are using custom header and not generic VLAN|IP|Port this suggestion is not correct. As you have clarified in question and comments you want to distribute like RSS for custom header.

  1. I haven't written any code about rte_flow distribution yet, i read the rte_flow example, don't see the code to configure round-robin

[ANSWER] as explained above not all nic support RSS and RAW. Since your current NIC is ixgbe and i40e the function of parsing and executing RSS for custom header is unlikely. you can try option 2 (work with intel create new ddp) for i40e to achieve the same or implement in SW as suggested in option 4.

  1. im not ask for solution, I just want to know how to set up round robin by 'RTE_FLOW' Can you give me a few API

[ANSWER] normally one updates with code snippets or steps used for reproducing the error. But the current question is more like clarification. Please refer above.

Source https://stackoverflow.com/questions/71581875

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install pmd

Download the latest binary zip from the releases and extract it somewhere. Execute bin/run.sh pmd or bin\pmd.bat. See also Getting Started. This shows how PMD can detect for loops, that can be replaced by for-each loops. There are plugins for Maven and Gradle as well as for various IDEs. See Tools / Integrations.

Support

How do I? -- Ask a question on StackOverflow or on discussions.I got this error, why? -- Ask a question on StackOverflow or on discussions.I got this error and I'm sure it's a bug -- file an issue.I have an idea/request/question -- create a new discussion.I have a quick question -- ask on our Gitter chat.Where's your documentation? -- https://pmd.github.io/latest/

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Reuse Code Quality Kits
Consider Popular Code Analyzer Libraries
Compare Code Analyzer Libraries with Highest Support
Compare Code Analyzer Libraries with Highest Quality
Compare Code Analyzer Libraries with Highest Security
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.