Commit Graph

19 Commits

Author SHA1 Message Date
Luca Boccassi
62bc760dea mk: sort source files before compilation
In order to achieve reproducible builds, always use the same
order when listing files for compilation.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
2017-10-12 22:31:33 +02:00
Harish Patil
4c4bdadfa9 net/qede: refactoring multi-queue implementation
This patch does the following refactoring and cleanup:

- As part of multi-queue support a struct member called 'type' was added
  in struct qede_fastpath in order to identify whether a queue is RX or
  TX and take actions based on that. This was unnecessary in the first
  place since pointers to RX and TX queues are already available in
  rte_eth_dev->data. So all usage of fp->type is removed.

- Remove remaining additional layer of internal callbacks for RX/TX
  queues and fastpath related operations from the qed_eth_ops_pass.
  With this change the files qede_eth_if.[c,h] are no longer needed.

- Add new per-queue start/stop APIs instead of clubbing it all together.

- Remove multiple TXQs references (num_tc and fp->txqs) since CoS is not
  supported.

- Enable sharing of the status block for each queue pair.

- Remove enum qede_dev_state and instead make use of existing port
  states RTE_ETH_QUEUE_STATE_STOPPED/RTE_ETH_QUEUE_STATE_STARTED.

- Move qede_dev_start() and qede_dev_stop() to qede_ethdev.c from
  qede_rxtc.c.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Bruce Richardson
803d48340c drivers/net: disable new gcc 7 warnings for base code
For base code in drivers shared with other projects, disable the new
warnings from gcc 7 about unlabelled fall-through in switch statements.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2017-05-05 18:27:09 +02:00
Rasesh Mody
af785e475c net/qede: fix CFLAGS for base files
Changes included in this fix
 - limit CFLAGS to base files
 - fix to remove/mark unused members
 - add checks for debug config option
 - make qede_set_mtu() and qede_udp_dst_port_del() static and others
   non-static as appropriate
 - move local APIs qede_vlan_offload_set() and qede_rx_cqe_to_pkt_type()
 - initialize variables as required

Fixes: ec94dbc573 ("qede: add base driver")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-28 14:46:18 +02:00
Harish Patil
622075356e net/qede: support ntuple and flow director filter
Add limited support for ntuple filter and flow director configuration.
The filtering is based on 4-tuples viz src-ip, dst-ip, src-port,
dst-port. The mask fields, tcp_flags, flex masks, priority fields,
Rx queue drop etc are not supported.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:55 +02:00
Olivier Matz
feb9f680cd mk: optimize directory dependencies
Before this patch, the management of dependencies between directories
had several issues:

- the generation of .depdirs, done at configuration is slow: it can take
  more than one minute on some slow targets (usually ~10s on a standard
  PC without -j).

- for instance, it is possible to express a dependency like:
  - app/foo depends on lib/librte_foo
  - and lib/librte_foo depends on app/bar
  But this won't work because the directories are traversed with a
  depth-first algorithm, so we have to choose between doing 'app' before
  or after 'lib'.

- the script depdirs-rule.sh is too complex.

- we cannot use "make -d" for debug, because the output of make is used for
  the generation of .depdirs.

This patch moves the DEPDIRS-* variables in the upper Makefile, making
the dependencies much easier to calculate. A DEPDIRS variable is still
used to process library dependencies in LDLIBS.

After this commit, "make config" is almost immediate.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Tested-by: Robin Jarry <robin.jarry@6wind.com>
Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-03-27 23:28:43 +02:00
Rasesh Mody
956cc5461b net/qede: fix gcc option checks
Using GCC_VERSION to check gcc version and decide whether to include
that compiler option.

Fixes: ecc7a5a27f ("net/qede/base: fix 32-bit build")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2016-11-07 21:08:54 +01:00
Rasesh Mody
7d178e9ef6 net/qede: remove zlib dependency and enable PMD
The QEDE PMD now uses unzipped firmware file eliminating the dependency
on zlib. Hence remove LDLIBS entry form the Makefile and enable qede
PMD by default.

Fixes: 6adac0bf30 ("qede: add missing external dependency and disable by default")

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2016-10-26 19:42:23 +02:00
Rasesh Mody
ecc7a5a27f net/qede/base: fix 32-bit build
Fix 32 bit compilation for gcc version 4.3.4.

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
2016-10-26 19:42:06 +02:00
Jerin Jacob
52b50e8a6b mk: fix cross-compilation
Removed comparison against $CC in Makefiles as
in cross-compiling mode CC can be a different string
instead of string "gcc"

Suggested-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2016-06-07 10:02:39 +02:00
Panu Matilainen
6adac0bf30 qede: add missing external dependency and disable by default
The qede driver depends on libz but the LDLIBS entry in makefile
was missing. Also because of the external dependency, make it
disabled in default config as per common DPDK policy on external deps.

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-24 16:17:02 +02:00
Panu Matilainen
84740d785c qede: fix build with gcc 6
With gcc >= 6.0, qede base driver fails to build with:
drivers/net/qede/base/ecore_cxt.c: In function 'ecore_cdu_init_common':
cc1: error: left shift of negative value [-Werror=shift-negative-value]

Since the base drivers are untouchable, work around by disabling
the warning.

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2016-05-13 17:38:07 +02:00
Ferruh Yigit
4de35ac07e qede: fix build with icc
fix errors:
icc: command line warning #10006: ignoring unknown option '-Wno-unused-value'
icc: command line warning #10006: ignoring unknown option '-Wno-format-nonliteral'
icc: command line warning #10006: ignoring unknown option '-Wno-shift-negative-value'
qede/base/ecore_dev.c(1643): error #188: enumerated type mixed with another type
        return 0;
               ^

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Harish Patil <harish.patil@qlogic.com>
2016-05-13 17:38:07 +02:00
Panu Matilainen
aace9d0bcf mk: cleanup leftover references to malloc library
librte_malloc was long since merged into librte_eal, mop up the
leftover references to it from driver Makefiles.

Fixes: 2f9d47013e ("mem: move librte_malloc to eal/common")

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>

Applied with qede Makefile update too.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2016-05-06 15:51:22 +02:00
Rasesh Mody
26ae839d06 qede: add DCBX support
This patch adds LLDP and DCBX capabilities to the qede PMD.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
2016-05-06 15:51:22 +02:00
Rasesh Mody
86a2265e59 qede: add SRIOV support
This patch adds following SRIOV features to qede PMD:
 - VF configuration
 - VF intialization/de-initialization
 - VF PF communications channel
 - statistics capture and query

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
2016-05-06 15:51:22 +02:00
Rasesh Mody
5cdd769a26 qede: add L2 support
This patch adds the features to supports configuration of various Layer 2
elements, such as channels and filtering options.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
2016-05-06 15:51:22 +02:00
Rasesh Mody
2ea6f76aff qede: add core driver
The Qlogic Everest Driver for Ethernet(QEDE) Poll Mode Driver(PMD) is
the DPDK specific module for QLogic FastLinQ QL4xxxx 25G/40G CNA family
of adapters as well as their virtual functions (VF) in SR-IOV context.

This patch adds QEDE PMD, which interacts with base driver and
initialises the HW.

This patch content also includes:
 - eth_dev_ops callbacks
 - Rx/Tx support for the driver
 - link default configuration
 - change link property
 - link up/down/update notifications
 - vlan offload and filtering capability
 - device/function/port statistics
 - qede nic guide and updated overview.rst

Note that the follow on commits contain the code for the features mentioned
in documents but not implemented in this patch.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
2016-05-06 15:51:22 +02:00
Rasesh Mody
ec94dbc573 qede: add base driver
The base driver is the backend module for the QLogic FastLinQ QL4xxxx
25G/40G CNA family of adapters as well as their virtual functions (VF)
in SR-IOV context.

The purpose of the base module is to:
 - provide all the common code that will be shared between the various
   drivers that would be used with said line of products. Flows such as
   chip initialization and de-initialization fall under this category.
 - abstract the protocol-specific HW & FW components, allowing the
   protocol drivers to have clean APIs, which are detached in its
   slowpath configuration from the actual Hardware Software Interface(HSI).

This patch adds a base module without any protocol-specific bits.
I.e., this adds a basic implementation that almost entirely falls under
the first category.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
2016-05-06 15:51:22 +02:00