mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
Merge tag 'net-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
"Including fixes from CAN and WPAN.
Still quite a few bugs from this release. This pull is a bit smaller
because major subtrees went into the previous one. Or maybe people
took spring break off?
Current release - regressions:
- phy: micrel: correct KSZ9131RNX EEE capabilities and advertisement
Current release - new code bugs:
- eth: wangxun: fix vector length of interrupt cause
- vsock/loopback: consistently protect the packet queue with
sk_buff_head.lock
- virtio/vsock: fix header length on skb merging
- wpan: ca8210: fix unsigned mac_len comparison with zero
Previous releases - regressions:
- eth: stmmac: don't reject VLANs when IFF_PROMISC is set
- eth: smsc911x: avoid PHY being resumed when interface is not up
- eth: mtk_eth_soc: fix tx throughput regression with direct 1G links
- eth: bnx2x: use the right build_skb() helper after core rework
- wwan: iosm: fix 7560 modem crash on use on unsupported channel
Previous releases - always broken:
- eth: sfc: don't overwrite offload features at NIC reset
- eth: r8169: fix RTL8168H and RTL8107E rx crc error
- can: j1939: prevent deadlock by moving j1939_sk_errqueue()
- virt: vmxnet3: use GRO callback when UPT is enabled
- virt: xen: don't do grant copy across page boundary
- phy: dp83869: fix default value for tx-/rx-internal-delay
- dsa: ksz8: fix multiple issues with ksz8_fdb_dump
- eth: mvpp2: fix classification/RSS of VLAN and fragmented packets
- eth: mtk_eth_soc: fix flow block refcounting logic
Misc:
- constify fwnode pointers in SFP handling"
* tag 'net-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (55 commits)
net: ethernet: mtk_eth_soc: add missing ppe cache flush when deleting a flow
net: ethernet: mtk_eth_soc: fix L2 offloading with DSA untag offload
net: ethernet: mtk_eth_soc: fix flow block refcounting logic
net: mvneta: fix potential double-frees in mvneta_txq_sw_deinit()
net: dsa: sync unicast and multicast addresses for VLAN filters too
net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only
xen/netback: use same error messages for same errors
test/vsock: new skbuff appending test
virtio/vsock: WARN_ONCE() for invalid state of socket
virtio/vsock: fix header length on skb merging
bnxt_en: Add missing 200G link speed reporting
bnxt_en: Fix typo in PCI id to device description string mapping
bnxt_en: Fix reporting of test result in ethtool selftest
i40e: fix registers dump after run ethtool adapter self test
bnx2x: use the right build_skb() helper
net: ipa: compute DMA pool size properly
net: wwan: iosm: fixes 7560 modem crash
net: ethernet: mtk_eth_soc: fix tx throughput regression with direct 1G links
ice: fix invalid check for empty list in ice_sched_assoc_vsi_to_agg()
ice: add profile conflict check for AVF FDIR
...
This commit is contained in:
@@ -8216,6 +8216,7 @@ F: drivers/net/ethernet/freescale/dpaa
|
||||
|
||||
FREESCALE QORIQ DPAA FMAN DRIVER
|
||||
M: Madalin Bucur <madalin.bucur@nxp.com>
|
||||
R: Sean Anderson <sean.anderson@seco.com>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/fsl-fman.txt
|
||||
@@ -14656,10 +14657,8 @@ F: net/ipv4/nexthop.c
|
||||
|
||||
NFC SUBSYSTEM
|
||||
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
B: mailto:linux-nfc@lists.01.org
|
||||
F: Documentation/devicetree/bindings/net/nfc/
|
||||
F: drivers/nfc/
|
||||
F: include/linux/platform_data/nfcmrvl.h
|
||||
@@ -14670,7 +14669,6 @@ F: net/nfc/
|
||||
NFC VIRTUAL NCI DEVICE DRIVER
|
||||
M: Bongsu Jeon <bongsu.jeon@samsung.com>
|
||||
L: netdev@vger.kernel.org
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
S: Supported
|
||||
F: drivers/nfc/virtual_ncidev.c
|
||||
F: tools/testing/selftests/nci/
|
||||
@@ -15042,7 +15040,6 @@ F: Documentation/devicetree/bindings/sound/nxp,tfa989x.yaml
|
||||
F: sound/soc/codecs/tfa989x.c
|
||||
|
||||
NXP-NCI NFC DRIVER
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
S: Orphan
|
||||
F: Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml
|
||||
F: drivers/nfc/nxp-nci
|
||||
@@ -18487,7 +18484,6 @@ F: include/media/drv-intf/s3c_camif.h
|
||||
|
||||
SAMSUNG S3FWRN5 NFC DRIVER
|
||||
M: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/net/nfc/samsung,s3fwrn5.yaml
|
||||
F: drivers/nfc/s3fwrn5
|
||||
@@ -20980,7 +20976,6 @@ F: drivers/iio/magnetometer/tmag5273.c
|
||||
TI TRF7970A NFC DRIVER
|
||||
M: Mark Greer <mgreer@animalcreek.com>
|
||||
L: linux-wireless@vger.kernel.org
|
||||
L: linux-nfc@lists.01.org (subscribers-only)
|
||||
S: Supported
|
||||
F: Documentation/devicetree/bindings/net/nfc/ti,trf7970a.yaml
|
||||
F: drivers/nfc/trf7970a.c
|
||||
|
||||
@@ -216,6 +216,18 @@ static int b53_mmap_write64(struct b53_device *dev, u8 page, u8 reg,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int b53_mmap_phy_read16(struct b53_device *dev, int addr, int reg,
|
||||
u16 *value)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int b53_mmap_phy_write16(struct b53_device *dev, int addr, int reg,
|
||||
u16 value)
|
||||
{
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static const struct b53_io_ops b53_mmap_ops = {
|
||||
.read8 = b53_mmap_read8,
|
||||
.read16 = b53_mmap_read16,
|
||||
@@ -227,6 +239,8 @@ static const struct b53_io_ops b53_mmap_ops = {
|
||||
.write32 = b53_mmap_write32,
|
||||
.write48 = b53_mmap_write48,
|
||||
.write64 = b53_mmap_write64,
|
||||
.phy_read16 = b53_mmap_phy_read16,
|
||||
.phy_write16 = b53_mmap_phy_write16,
|
||||
};
|
||||
|
||||
static int b53_mmap_probe_of(struct platform_device *pdev,
|
||||
|
||||
@@ -958,15 +958,14 @@ int ksz8_fdb_dump(struct ksz_device *dev, int port,
|
||||
u16 entries = 0;
|
||||
u8 timestamp = 0;
|
||||
u8 fid;
|
||||
u8 member;
|
||||
struct alu_struct alu;
|
||||
u8 src_port;
|
||||
u8 mac[ETH_ALEN];
|
||||
|
||||
do {
|
||||
alu.is_static = false;
|
||||
ret = ksz8_r_dyn_mac_table(dev, i, alu.mac, &fid, &member,
|
||||
ret = ksz8_r_dyn_mac_table(dev, i, mac, &fid, &src_port,
|
||||
×tamp, &entries);
|
||||
if (!ret && (member & BIT(port))) {
|
||||
ret = cb(alu.mac, alu.fid, alu.is_static, data);
|
||||
if (!ret && port == src_port) {
|
||||
ret = cb(mac, fid, false, data);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -82,22 +82,16 @@ static const struct regmap_bus regmap_smi[] = {
|
||||
{
|
||||
.read = ksz8863_mdio_read,
|
||||
.write = ksz8863_mdio_write,
|
||||
.max_raw_read = 1,
|
||||
.max_raw_write = 1,
|
||||
},
|
||||
{
|
||||
.read = ksz8863_mdio_read,
|
||||
.write = ksz8863_mdio_write,
|
||||
.val_format_endian_default = REGMAP_ENDIAN_BIG,
|
||||
.max_raw_read = 2,
|
||||
.max_raw_write = 2,
|
||||
},
|
||||
{
|
||||
.read = ksz8863_mdio_read,
|
||||
.write = ksz8863_mdio_write,
|
||||
.val_format_endian_default = REGMAP_ENDIAN_BIG,
|
||||
.max_raw_read = 4,
|
||||
.max_raw_write = 4,
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,7 +102,6 @@ static const struct regmap_config ksz8863_regmap_config[] = {
|
||||
.pad_bits = 24,
|
||||
.val_bits = 8,
|
||||
.cache_type = REGCACHE_NONE,
|
||||
.use_single_read = 1,
|
||||
.lock = ksz_regmap_lock,
|
||||
.unlock = ksz_regmap_unlock,
|
||||
},
|
||||
@@ -118,7 +111,6 @@ static const struct regmap_config ksz8863_regmap_config[] = {
|
||||
.pad_bits = 24,
|
||||
.val_bits = 16,
|
||||
.cache_type = REGCACHE_NONE,
|
||||
.use_single_read = 1,
|
||||
.lock = ksz_regmap_lock,
|
||||
.unlock = ksz_regmap_unlock,
|
||||
},
|
||||
@@ -128,7 +120,6 @@ static const struct regmap_config ksz8863_regmap_config[] = {
|
||||
.pad_bits = 24,
|
||||
.val_bits = 32,
|
||||
.cache_type = REGCACHE_NONE,
|
||||
.use_single_read = 1,
|
||||
.lock = ksz_regmap_lock,
|
||||
.unlock = ksz_regmap_unlock,
|
||||
}
|
||||
|
||||
@@ -404,13 +404,13 @@ static const u32 ksz8863_masks[] = {
|
||||
[VLAN_TABLE_VALID] = BIT(19),
|
||||
[STATIC_MAC_TABLE_VALID] = BIT(19),
|
||||
[STATIC_MAC_TABLE_USE_FID] = BIT(21),
|
||||
[STATIC_MAC_TABLE_FID] = GENMASK(29, 26),
|
||||
[STATIC_MAC_TABLE_FID] = GENMASK(25, 22),
|
||||
[STATIC_MAC_TABLE_OVERRIDE] = BIT(20),
|
||||
[STATIC_MAC_TABLE_FWD_PORTS] = GENMASK(18, 16),
|
||||
[DYNAMIC_MAC_TABLE_ENTRIES_H] = GENMASK(5, 0),
|
||||
[DYNAMIC_MAC_TABLE_MAC_EMPTY] = BIT(7),
|
||||
[DYNAMIC_MAC_TABLE_ENTRIES_H] = GENMASK(1, 0),
|
||||
[DYNAMIC_MAC_TABLE_MAC_EMPTY] = BIT(2),
|
||||
[DYNAMIC_MAC_TABLE_NOT_READY] = BIT(7),
|
||||
[DYNAMIC_MAC_TABLE_ENTRIES] = GENMASK(31, 28),
|
||||
[DYNAMIC_MAC_TABLE_ENTRIES] = GENMASK(31, 24),
|
||||
[DYNAMIC_MAC_TABLE_FID] = GENMASK(19, 16),
|
||||
[DYNAMIC_MAC_TABLE_SRC_PORT] = GENMASK(21, 20),
|
||||
[DYNAMIC_MAC_TABLE_TIMESTAMP] = GENMASK(23, 22),
|
||||
@@ -420,10 +420,10 @@ static u8 ksz8863_shifts[] = {
|
||||
[VLAN_TABLE_MEMBERSHIP_S] = 16,
|
||||
[STATIC_MAC_FWD_PORTS] = 16,
|
||||
[STATIC_MAC_FID] = 22,
|
||||
[DYNAMIC_MAC_ENTRIES_H] = 3,
|
||||
[DYNAMIC_MAC_ENTRIES_H] = 8,
|
||||
[DYNAMIC_MAC_ENTRIES] = 24,
|
||||
[DYNAMIC_MAC_FID] = 16,
|
||||
[DYNAMIC_MAC_TIMESTAMP] = 24,
|
||||
[DYNAMIC_MAC_TIMESTAMP] = 22,
|
||||
[DYNAMIC_MAC_SRC_PORT] = 20,
|
||||
};
|
||||
|
||||
|
||||
@@ -3354,9 +3354,14 @@ static int mv88e6xxx_setup_port(struct mv88e6xxx_chip *chip, int port)
|
||||
* If this is the upstream port for this switch, enable
|
||||
* forwarding of unknown unicasts and multicasts.
|
||||
*/
|
||||
reg = MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP |
|
||||
MV88E6185_PORT_CTL0_USE_TAG | MV88E6185_PORT_CTL0_USE_IP |
|
||||
reg = MV88E6185_PORT_CTL0_USE_TAG | MV88E6185_PORT_CTL0_USE_IP |
|
||||
MV88E6XXX_PORT_CTL0_STATE_FORWARDING;
|
||||
/* Forward any IPv4 IGMP or IPv6 MLD frames received
|
||||
* by a USER port to the CPU port to allow snooping.
|
||||
*/
|
||||
if (dsa_is_user_port(ds, port))
|
||||
reg |= MV88E6XXX_PORT_CTL0_IGMP_MLD_SNOOP;
|
||||
|
||||
err = mv88e6xxx_port_write(chip, port, MV88E6XXX_PORT_CTL0, reg);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/overflow.h>
|
||||
#include <linux/regmap.h>
|
||||
|
||||
#include "realtek.h"
|
||||
@@ -152,7 +153,9 @@ static int realtek_mdio_probe(struct mdio_device *mdiodev)
|
||||
if (!var)
|
||||
return -EINVAL;
|
||||
|
||||
priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
priv = devm_kzalloc(&mdiodev->dev,
|
||||
size_add(sizeof(*priv), var->chip_data_sz),
|
||||
GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
@@ -672,6 +672,18 @@ static int bnx2x_fill_frag_skb(struct bnx2x *bp, struct bnx2x_fastpath *fp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct sk_buff *
|
||||
bnx2x_build_skb(const struct bnx2x_fastpath *fp, void *data)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
|
||||
if (fp->rx_frag_size)
|
||||
skb = build_skb(data, fp->rx_frag_size);
|
||||
else
|
||||
skb = slab_build_skb(data);
|
||||
return skb;
|
||||
}
|
||||
|
||||
static void bnx2x_frag_free(const struct bnx2x_fastpath *fp, void *data)
|
||||
{
|
||||
if (fp->rx_frag_size)
|
||||
@@ -779,7 +791,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp,
|
||||
dma_unmap_single(&bp->pdev->dev, dma_unmap_addr(rx_buf, mapping),
|
||||
fp->rx_buf_size, DMA_FROM_DEVICE);
|
||||
if (likely(new_data))
|
||||
skb = build_skb(data, fp->rx_frag_size);
|
||||
skb = bnx2x_build_skb(fp, data);
|
||||
|
||||
if (likely(skb)) {
|
||||
#ifdef BNX2X_STOP_ON_ERROR
|
||||
@@ -1046,7 +1058,7 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget)
|
||||
dma_unmap_addr(rx_buf, mapping),
|
||||
fp->rx_buf_size,
|
||||
DMA_FROM_DEVICE);
|
||||
skb = build_skb(data, fp->rx_frag_size);
|
||||
skb = bnx2x_build_skb(fp, data);
|
||||
if (unlikely(!skb)) {
|
||||
bnx2x_frag_free(fp, data);
|
||||
bnx2x_fp_qstats(bp, fp)->
|
||||
|
||||
@@ -175,12 +175,12 @@ static const struct pci_device_id bnxt_pci_tbl[] = {
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1750), .driver_data = BCM57508 },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1751), .driver_data = BCM57504 },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1752), .driver_data = BCM57502 },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57508_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1800), .driver_data = BCM57502_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1801), .driver_data = BCM57504_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57502_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57508_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1802), .driver_data = BCM57508_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1803), .driver_data = BCM57502_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1804), .driver_data = BCM57504_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57502_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0x1805), .driver_data = BCM57508_NPAR },
|
||||
{ PCI_VDEVICE(BROADCOM, 0xd802), .driver_data = BCM58802 },
|
||||
{ PCI_VDEVICE(BROADCOM, 0xd804), .driver_data = BCM58804 },
|
||||
#ifdef CONFIG_BNXT_SRIOV
|
||||
|
||||
@@ -1226,6 +1226,7 @@ struct bnxt_link_info {
|
||||
#define BNXT_LINK_SPEED_40GB PORT_PHY_QCFG_RESP_LINK_SPEED_40GB
|
||||
#define BNXT_LINK_SPEED_50GB PORT_PHY_QCFG_RESP_LINK_SPEED_50GB
|
||||
#define BNXT_LINK_SPEED_100GB PORT_PHY_QCFG_RESP_LINK_SPEED_100GB
|
||||
#define BNXT_LINK_SPEED_200GB PORT_PHY_QCFG_RESP_LINK_SPEED_200GB
|
||||
u16 support_speeds;
|
||||
u16 support_pam4_speeds;
|
||||
u16 auto_link_speeds; /* fw adv setting */
|
||||
|
||||
@@ -1714,6 +1714,8 @@ u32 bnxt_fw_to_ethtool_speed(u16 fw_link_speed)
|
||||
return SPEED_50000;
|
||||
case BNXT_LINK_SPEED_100GB:
|
||||
return SPEED_100000;
|
||||
case BNXT_LINK_SPEED_200GB:
|
||||
return SPEED_200000;
|
||||
default:
|
||||
return SPEED_UNKNOWN;
|
||||
}
|
||||
@@ -3738,6 +3740,7 @@ static void bnxt_self_test(struct net_device *dev, struct ethtool_test *etest,
|
||||
bnxt_ulp_stop(bp);
|
||||
rc = bnxt_close_nic(bp, true, false);
|
||||
if (rc) {
|
||||
etest->flags |= ETH_TEST_FL_FAILED;
|
||||
bnxt_ulp_start(bp, rc);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ static int i40e_diag_reg_pattern_test(struct i40e_hw *hw,
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct i40e_diag_reg_test_info i40e_reg_list[] = {
|
||||
const struct i40e_diag_reg_test_info i40e_reg_list[] = {
|
||||
/* offset mask elements stride */
|
||||
{I40E_QTX_CTL(0), 0x0000FFBF, 1,
|
||||
I40E_QTX_CTL(1) - I40E_QTX_CTL(0)},
|
||||
@@ -78,27 +78,28 @@ int i40e_diag_reg_test(struct i40e_hw *hw)
|
||||
{
|
||||
int ret_code = 0;
|
||||
u32 reg, mask;
|
||||
u32 elements;
|
||||
u32 i, j;
|
||||
|
||||
for (i = 0; i40e_reg_list[i].offset != 0 &&
|
||||
!ret_code; i++) {
|
||||
|
||||
elements = i40e_reg_list[i].elements;
|
||||
/* set actual reg range for dynamically allocated resources */
|
||||
if (i40e_reg_list[i].offset == I40E_QTX_CTL(0) &&
|
||||
hw->func_caps.num_tx_qp != 0)
|
||||
i40e_reg_list[i].elements = hw->func_caps.num_tx_qp;
|
||||
elements = hw->func_caps.num_tx_qp;
|
||||
if ((i40e_reg_list[i].offset == I40E_PFINT_ITRN(0, 0) ||
|
||||
i40e_reg_list[i].offset == I40E_PFINT_ITRN(1, 0) ||
|
||||
i40e_reg_list[i].offset == I40E_PFINT_ITRN(2, 0) ||
|
||||
i40e_reg_list[i].offset == I40E_QINT_TQCTL(0) ||
|
||||
i40e_reg_list[i].offset == I40E_QINT_RQCTL(0)) &&
|
||||
hw->func_caps.num_msix_vectors != 0)
|
||||
i40e_reg_list[i].elements =
|
||||
hw->func_caps.num_msix_vectors - 1;
|
||||
elements = hw->func_caps.num_msix_vectors - 1;
|
||||
|
||||
/* test register access */
|
||||
mask = i40e_reg_list[i].mask;
|
||||
for (j = 0; j < i40e_reg_list[i].elements && !ret_code; j++) {
|
||||
for (j = 0; j < elements && !ret_code; j++) {
|
||||
reg = i40e_reg_list[i].offset +
|
||||
(j * i40e_reg_list[i].stride);
|
||||
ret_code = i40e_diag_reg_pattern_test(hw, reg, mask);
|
||||
|
||||
@@ -20,7 +20,7 @@ struct i40e_diag_reg_test_info {
|
||||
u32 stride; /* bytes between each element */
|
||||
};
|
||||
|
||||
extern struct i40e_diag_reg_test_info i40e_reg_list[];
|
||||
extern const struct i40e_diag_reg_test_info i40e_reg_list[];
|
||||
|
||||
int i40e_diag_reg_test(struct i40e_hw *hw);
|
||||
int i40e_diag_eeprom_test(struct i40e_hw *hw);
|
||||
|
||||
@@ -2788,7 +2788,7 @@ static int
|
||||
ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
|
||||
u16 vsi_handle, unsigned long *tc_bitmap)
|
||||
{
|
||||
struct ice_sched_agg_vsi_info *agg_vsi_info, *old_agg_vsi_info = NULL;
|
||||
struct ice_sched_agg_vsi_info *agg_vsi_info, *iter, *old_agg_vsi_info = NULL;
|
||||
struct ice_sched_agg_info *agg_info, *old_agg_info;
|
||||
struct ice_hw *hw = pi->hw;
|
||||
int status = 0;
|
||||
@@ -2806,11 +2806,13 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
|
||||
if (old_agg_info && old_agg_info != agg_info) {
|
||||
struct ice_sched_agg_vsi_info *vtmp;
|
||||
|
||||
list_for_each_entry_safe(old_agg_vsi_info, vtmp,
|
||||
list_for_each_entry_safe(iter, vtmp,
|
||||
&old_agg_info->agg_vsi_list,
|
||||
list_entry)
|
||||
if (old_agg_vsi_info->vsi_handle == vsi_handle)
|
||||
if (iter->vsi_handle == vsi_handle) {
|
||||
old_agg_vsi_info = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* check if entry already exist */
|
||||
|
||||
@@ -1780,18 +1780,36 @@ ice_update_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
|
||||
int
|
||||
ice_cfg_rdma_fltr(struct ice_hw *hw, u16 vsi_handle, bool enable)
|
||||
{
|
||||
struct ice_vsi_ctx *ctx;
|
||||
struct ice_vsi_ctx *ctx, *cached_ctx;
|
||||
int status;
|
||||
|
||||
ctx = ice_get_vsi_ctx(hw, vsi_handle);
|
||||
cached_ctx = ice_get_vsi_ctx(hw, vsi_handle);
|
||||
if (!cached_ctx)
|
||||
return -ENOENT;
|
||||
|
||||
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
return -EIO;
|
||||
return -ENOMEM;
|
||||
|
||||
ctx->info.q_opt_rss = cached_ctx->info.q_opt_rss;
|
||||
ctx->info.q_opt_tc = cached_ctx->info.q_opt_tc;
|
||||
ctx->info.q_opt_flags = cached_ctx->info.q_opt_flags;
|
||||
|
||||
ctx->info.valid_sections = cpu_to_le16(ICE_AQ_VSI_PROP_Q_OPT_VALID);
|
||||
|
||||
if (enable)
|
||||
ctx->info.q_opt_flags |= ICE_AQ_VSI_Q_OPT_PE_FLTR_EN;
|
||||
else
|
||||
ctx->info.q_opt_flags &= ~ICE_AQ_VSI_Q_OPT_PE_FLTR_EN;
|
||||
|
||||
return ice_update_vsi(hw, vsi_handle, ctx, NULL);
|
||||
status = ice_update_vsi(hw, vsi_handle, ctx, NULL);
|
||||
if (!status) {
|
||||
cached_ctx->info.q_opt_flags = ctx->info.q_opt_flags;
|
||||
cached_ctx->info.valid_sections |= ctx->info.valid_sections;
|
||||
}
|
||||
|
||||
kfree(ctx);
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -938,6 +938,7 @@ ice_reuse_rx_page(struct ice_rx_ring *rx_ring, struct ice_rx_buf *old_buf)
|
||||
* ice_get_rx_buf - Fetch Rx buffer and synchronize data for use
|
||||
* @rx_ring: Rx descriptor ring to transact packets on
|
||||
* @size: size of buffer to add to skb
|
||||
* @ntc: index of next to clean element
|
||||
*
|
||||
* This function will pull an Rx buffer from the ring and synchronize it
|
||||
* for use by the CPU.
|
||||
@@ -1026,7 +1027,6 @@ ice_build_skb(struct ice_rx_ring *rx_ring, struct xdp_buff *xdp)
|
||||
/**
|
||||
* ice_construct_skb - Allocate skb and populate it
|
||||
* @rx_ring: Rx descriptor ring to transact packets on
|
||||
* @rx_buf: Rx buffer to pull data from
|
||||
* @xdp: xdp_buff pointing to the data
|
||||
*
|
||||
* This function allocates an skb. It then populates it with the page
|
||||
|
||||
@@ -438,6 +438,7 @@ busy:
|
||||
* ice_finalize_xdp_rx - Bump XDP Tx tail and/or flush redirect map
|
||||
* @xdp_ring: XDP ring
|
||||
* @xdp_res: Result of the receive batch
|
||||
* @first_idx: index to write from caller
|
||||
*
|
||||
* This function bumps XDP Tx tail and/or flush redirect map, and
|
||||
* should be called when a batch of packets has been processed in the
|
||||
|
||||
@@ -541,6 +541,72 @@ static void ice_vc_fdir_rem_prof_all(struct ice_vf *vf)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_vc_fdir_has_prof_conflict
|
||||
* @vf: pointer to the VF structure
|
||||
* @conf: FDIR configuration for each filter
|
||||
*
|
||||
* Check if @conf has conflicting profile with existing profiles
|
||||
*
|
||||
* Return: true on success, and false on error.
|
||||
*/
|
||||
static bool
|
||||
ice_vc_fdir_has_prof_conflict(struct ice_vf *vf,
|
||||
struct virtchnl_fdir_fltr_conf *conf)
|
||||
{
|
||||
struct ice_fdir_fltr *desc;
|
||||
|
||||
list_for_each_entry(desc, &vf->fdir.fdir_rule_list, fltr_node) {
|
||||
struct virtchnl_fdir_fltr_conf *existing_conf;
|
||||
enum ice_fltr_ptype flow_type_a, flow_type_b;
|
||||
struct ice_fdir_fltr *a, *b;
|
||||
|
||||
existing_conf = to_fltr_conf_from_desc(desc);
|
||||
a = &existing_conf->input;
|
||||
b = &conf->input;
|
||||
flow_type_a = a->flow_type;
|
||||
flow_type_b = b->flow_type;
|
||||
|
||||
/* No need to compare two rules with different tunnel types or
|
||||
* with the same protocol type.
|
||||
*/
|
||||
if (existing_conf->ttype != conf->ttype ||
|
||||
flow_type_a == flow_type_b)
|
||||
continue;
|
||||
|
||||
switch (flow_type_a) {
|
||||
case ICE_FLTR_PTYPE_NONF_IPV4_UDP:
|
||||
case ICE_FLTR_PTYPE_NONF_IPV4_TCP:
|
||||
case ICE_FLTR_PTYPE_NONF_IPV4_SCTP:
|
||||
if (flow_type_b == ICE_FLTR_PTYPE_NONF_IPV4_OTHER)
|
||||
return true;
|
||||
break;
|
||||
case ICE_FLTR_PTYPE_NONF_IPV4_OTHER:
|
||||
if (flow_type_b == ICE_FLTR_PTYPE_NONF_IPV4_UDP ||
|
||||
flow_type_b == ICE_FLTR_PTYPE_NONF_IPV4_TCP ||
|
||||
flow_type_b == ICE_FLTR_PTYPE_NONF_IPV4_SCTP)
|
||||
return true;
|
||||
break;
|
||||
case ICE_FLTR_PTYPE_NONF_IPV6_UDP:
|
||||
case ICE_FLTR_PTYPE_NONF_IPV6_TCP:
|
||||
case ICE_FLTR_PTYPE_NONF_IPV6_SCTP:
|
||||
if (flow_type_b == ICE_FLTR_PTYPE_NONF_IPV6_OTHER)
|
||||
return true;
|
||||
break;
|
||||
case ICE_FLTR_PTYPE_NONF_IPV6_OTHER:
|
||||
if (flow_type_b == ICE_FLTR_PTYPE_NONF_IPV6_UDP ||
|
||||
flow_type_b == ICE_FLTR_PTYPE_NONF_IPV6_TCP ||
|
||||
flow_type_b == ICE_FLTR_PTYPE_NONF_IPV6_SCTP)
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* ice_vc_fdir_write_flow_prof
|
||||
* @vf: pointer to the VF structure
|
||||
@@ -677,6 +743,13 @@ ice_vc_fdir_config_input_set(struct ice_vf *vf, struct virtchnl_fdir_add *fltr,
|
||||
enum ice_fltr_ptype flow;
|
||||
int ret;
|
||||
|
||||
ret = ice_vc_fdir_has_prof_conflict(vf, conf);
|
||||
if (ret) {
|
||||
dev_dbg(dev, "Found flow profile conflict for VF %d\n",
|
||||
vf->vf_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
flow = input->flow_type;
|
||||
ret = ice_vc_fdir_alloc_prof(vf, flow);
|
||||
if (ret) {
|
||||
|
||||
@@ -3549,6 +3549,8 @@ static void mvneta_txq_sw_deinit(struct mvneta_port *pp,
|
||||
|
||||
netdev_tx_reset_queue(nq);
|
||||
|
||||
txq->buf = NULL;
|
||||
txq->tso_hdrs = NULL;
|
||||
txq->descs = NULL;
|
||||
txq->last_desc = 0;
|
||||
txq->next_desc_to_proc = 0;
|
||||
|
||||
@@ -62,35 +62,38 @@ static const struct mvpp2_cls_flow cls_flows[MVPP2_N_PRS_FLOWS] = {
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_UNTAG,
|
||||
MVPP22_CLS_HEK_IP4_2T,
|
||||
MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4 |
|
||||
MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK),
|
||||
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_UNTAG,
|
||||
MVPP22_CLS_HEK_IP4_2T,
|
||||
MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4_OPT |
|
||||
MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK),
|
||||
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_UNTAG,
|
||||
MVPP22_CLS_HEK_IP4_2T,
|
||||
MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4_OTHER |
|
||||
MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK),
|
||||
|
||||
/* TCP over IPv4 flows, fragmented, with vlan tag */
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_TAG,
|
||||
MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED,
|
||||
MVPP2_PRS_RI_L3_IP4 | MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_RI_L3_IP4 | MVPP2_PRS_RI_IP_FRAG_TRUE |
|
||||
MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_IP_MASK),
|
||||
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_TAG,
|
||||
MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED,
|
||||
MVPP2_PRS_RI_L3_IP4_OPT | MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_RI_L3_IP4_OPT | MVPP2_PRS_RI_IP_FRAG_TRUE |
|
||||
MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_IP_MASK),
|
||||
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_TAG,
|
||||
MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED,
|
||||
MVPP2_PRS_RI_L3_IP4_OTHER | MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_RI_L3_IP4_OTHER | MVPP2_PRS_RI_IP_FRAG_TRUE |
|
||||
MVPP2_PRS_RI_L4_TCP,
|
||||
MVPP2_PRS_IP_MASK),
|
||||
|
||||
/* UDP over IPv4 flows, Not fragmented, no vlan tag */
|
||||
@@ -132,35 +135,38 @@ static const struct mvpp2_cls_flow cls_flows[MVPP2_N_PRS_FLOWS] = {
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_UNTAG,
|
||||
MVPP22_CLS_HEK_IP4_2T,
|
||||
MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4 |
|
||||
MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK),
|
||||
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_UNTAG,
|
||||
MVPP22_CLS_HEK_IP4_2T,
|
||||
MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4_OPT |
|
||||
MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK),
|
||||
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_UNTAG,
|
||||
MVPP22_CLS_HEK_IP4_2T,
|
||||
MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4_OTHER |
|
||||
MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK),
|
||||
|
||||
/* UDP over IPv4 flows, fragmented, with vlan tag */
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_TAG,
|
||||
MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED,
|
||||
MVPP2_PRS_RI_L3_IP4 | MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_RI_L3_IP4 | MVPP2_PRS_RI_IP_FRAG_TRUE |
|
||||
MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_IP_MASK),
|
||||
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_TAG,
|
||||
MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED,
|
||||
MVPP2_PRS_RI_L3_IP4_OPT | MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_RI_L3_IP4_OPT | MVPP2_PRS_RI_IP_FRAG_TRUE |
|
||||
MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_IP_MASK),
|
||||
|
||||
MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_TAG,
|
||||
MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED,
|
||||
MVPP2_PRS_RI_L3_IP4_OTHER | MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_RI_L3_IP4_OTHER | MVPP2_PRS_RI_IP_FRAG_TRUE |
|
||||
MVPP2_PRS_RI_L4_UDP,
|
||||
MVPP2_PRS_IP_MASK),
|
||||
|
||||
/* TCP over IPv6 flows, not fragmented, no vlan tag */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user