Commit Graph

31 Commits

Author SHA1 Message Date
Gautam Dawar
9b1d5e45c0 net/sfc/base: enable chained multicast on all EF10 cards
Set WORKAROUND_BUG26807 which does the job.

Fix the misunderstanding in the Medford code: i.e. the workaround is
always supported by firmware, but the driver still needs to enable it.
Also, as it now applies to all EF10 controllers, the implementation is
moved to EF10 common place.

Fixes: 94190e3543 ("net/sfc/base: import SFN8xxx family support")
Fixes: 2b38e7b7b7 ("net/sfc/base: add Medford2 support to NIC module")
Cc: stable@dpdk.org

Signed-off-by: Gautam Dawar <gdawar@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-06-20 23:42:04 +02:00
Igor Romanov
d6b55d5682 net/sfc/base: support different event descriptor sizes
For consistency with the size of Tx descriptors, the size of event
descriptors should be a part of NIC config, not a macro that is
common for all NIC families. Also, add a max number of EvQ buffers
define which is needed to initialize an MCDI buffer at compile time.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-08 11:35:41 +01:00
Igor Romanov
eebbd4250d net/sfc/base: support different Rx descriptor sizes
For consistency with the size of Tx descriptors, the size of Rx
descriptors should be a part of NIC config, not a macro that is
common for all NIC families.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-08 11:35:41 +01:00
Igor Romanov
914e878cd9 net/sfc/base: support different Tx descriptor sizes
Size of Tx descriptor is different on Riverhead. So, the size
should be a part of NIC config, not a macro that is common for
all NIC families.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-08 11:35:41 +01:00
Igor Romanov
0b5bedc23e net/sfc/base: remove min/max defines for number of events
EF100/Riverhead has different min/max limits. So, these limits should
be a part of NIC config, not defines common for all NIC families.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-08 11:35:41 +01:00
Igor Romanov
24b4d1f095 net/sfc/base: remove min/max defines for number of Rx descs
EF100/Riverhead has different min/max limits. So, these limits should
be a part of NIC config, not defines common for all NIC families.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-08 11:35:41 +01:00
Igor Romanov
61d820eba0 net/sfc/base: define max desc number for every EF10 NIC
For consistency with defines of min descriptor number, define max
descriptor number for Huntington, Medford and Medford2.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-08 11:35:41 +01:00
Igor Romanov
a025fdd98c net/sfc/base: remove min define for number of Tx descs
EF100/Riverhead has different min limit. So, this limit should
be a part of NIC config, not define common for all NIC families.
Define maximum Tx descriptor number for Siena in the same way as
minimum for consistency.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2019-02-08 11:35:40 +01:00
Richard Houldsworth
ac664071e7 net/sfc/base: support improvements to bandwidth calculations
Change the interface to ef10_nic_get_port_mode_bandwidth()
so more NIC information can be used to infer bandwidth
requirements. Huntington calculations separated out
completely.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:03 +02:00
Mark Spender
b2fe569359 net/sfc/base: add information if TSO workaround is required
In SF bug 61297 it's been confirmed that the hardware does not always
calculate the TCP checksum correctly with TSO sends.

The value of the Total Length field (IPv4) or Payload Length field
(IPv6) is the critical factor. We're sufficiently confident that if
these fields are zero then the checksum will be calculated correctly.

The information may be used by the drivers to check if the workaround is
required when FATSOv2 is implemented.

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Richard Houldsworth
7e63a9a1a5 net/sfc/base: add accessor for default port mode
Extend efx_mcdi_get_port_modes() to optionally pass on the default
port mode field. This provides a more direct way of handling the case
where the dynamic config does not specify the port mode than the
alternative of a lookup table indexed by MCFW subtype.

Signed-off-by: Richard Houldsworth <rhouldsworth@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-09-28 01:41:02 +02:00
Andy Moreton
1a04c2d163 net/sfc/base: clarify port mode names and masks
New port mode names are defined for Medford2 and later, and
the existing names are aliased to them. Add comments with the
numeric port mode to clarify the external port modes table.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
5858ad96ce net/sfc/base: move VI window size config to ef10 NIC board
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
1e2fa1e1fa net/sfc/base: move privilege config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
01a22b15b4 net/sfc/base: move vector config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
107cf1d792 net/sfc/base: move limits config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:43 +02:00
Andy Moreton
9bd777a7e6 net/sfc/base: move Tx config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
32a3020461 net/sfc/base: move Rx config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
04dbe8e6d4 net/sfc/base: move datapath config to ef10 NIC board cfg
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
77b5cbfe48 net/sfc/base: move PHY/link config to ef10 NIC board cfg
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
fa7e671a08 net/sfc/base: move legacy board config to ef10 NIC board cfg
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
08d38249bc net/sfc/base: move MAC address config to ef10 NIC board cfg
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
579c1e6f2e net/sfc/base: move PF/VF config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
7cd282350e net/sfc/base: move port config to ef10 NIC board config
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
b9673329e1 net/sfc/base: support runtime VI window size
Medford2 uses a configurable VI window size, and requires
updates to register accesses to use a runtime VI window size
rather than the *_STEP register constants used for earlier
controllers.

Update the common code to query the VI window size via MCDI,
and add new EFX_BAR_VI_* accessor macros for per-VI registers.

The existing EFX_BAR_TBL_* macros can be used for non-VI
register tables (and for code that can never be called for
a Medford2 controller e.g. Siena-only code).

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andy Moreton
8313ad6989 net/sfc/base: correct PIO buffer dimensions for Medford2
Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-03-30 14:08:42 +02:00
Andrew Rybchenko
b0d31b5138 net/sfc/base: change license to BSD-3-Clause
Change license from BSD-2-Clause-FreeBSD to BSD-3-Clause.
Bump copyright year.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2018-01-16 18:47:49 +01:00
Mark Spender
55c6dca36f net/sfc/base: add the max number of RSS exclusive contexts
The patch adds enc_rx_scale_max_exclusive_contexts member
to nic_cfg_t structure and sets the corresponding values
for Siena, Huntington and Medford

Signed-off-by: Mark Spender <mspender@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-10-06 02:49:47 +02:00
Andrew Rybchenko
1e43fe3cb4 net/sfc/base: separate limitations on Tx DMA descriptors
Siena has limitation on maximum byte count and 4k boundary crosssing
(which is stricter than maximum byte count).
EF10 has limitation on maximum byte count only.

Fixes: f7dc06bf35 ("net/sfc/base: import 5xxx/6xxx family support")
Fixes: e7cd430c86 ("net/sfc/base: import SFN7xxx family support")
Fixes: 94190e3543 ("net/sfc/base: import SFN8xxx family support")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 15:52:52 +02:00
Andrew Rybchenko
dfb3b1ce15 net/sfc/base: import monitors access via MCDI
EFSYS_OPT_MON_MCDI should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:26 +01:00
Andrew Rybchenko
e7cd430c86 net/sfc/base: import SFN7xxx family support
SFN7xxx is the first family based on EF10 architecture.

EFSYS_OPT_HUNTINGTON should be enabled to use it.

From Solarflare Communications Inc.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:39:25 +01:00