From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 51BB442C8D for ; Sun, 11 Jun 2023 20:25:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 26F11400D5; Sun, 11 Jun 2023 20:25:49 +0200 (CEST) Received: from mail-qk1-f225.google.com (mail-qk1-f225.google.com [209.85.222.225]) by mails.dpdk.org (Postfix) with ESMTP id CF13C400D5 for ; Sun, 11 Jun 2023 20:25:46 +0200 (CEST) Received: by mail-qk1-f225.google.com with SMTP id af79cd13be357-75da00a1eddso359116485a.3 for ; Sun, 11 Jun 2023 11:25:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1686507946; x=1689099946; h=cc:to:from:subject:message-id:date:from:to:cc:subject:date :message-id:reply-to; bh=cnKtfzi+AfUdNYOsnCmMvVy5cbr/kaTjB2MyG1RkhvM=; b=QOZLF6t0yfyhR91d9GxPHnNMaXsPkQbp3rnxGaqJGhgE0TJvnMVjuoH7x0YEtvlIKN zvUywOR7Boh/kqPLl+rxDFTgIEXSclbglyrecfhpLDayS6qmRKrqOVGvPWU9kuMdlt3B lZ++8gNs7jtkC0EHrRC4kp5exNX1Za86yVRRE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686507946; x=1689099946; h=cc:to:from:subject:message-id:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cnKtfzi+AfUdNYOsnCmMvVy5cbr/kaTjB2MyG1RkhvM=; b=JhvQtj2nSMWD3W7JRwBjlmUiQ489T1usaoBGLVNMpQ1BLZSC96MpjXtl9Eelg1Yx5D piJs7Q9mD3o3scb3/m7GlfVhX5B/CtspQqWfAp1POkZgPIOnZVkbeJy+VFmadEfdP7oy OWwka1CJswC1z3q1D9qrNRXs6TzDjZjEJEiK1zWHjKUG0P4UxQqYT0M5AznpWEJXjY7U 3CDWJp9FJoq6BeUqHR2i/ZYdeFym3XtsKBQAE2nI0rC0hXHeZWsFqgKXEIeu2OfiHDQr n0T8rPUYcRrVAhMkaAS7bTrYysr7FdIrJ2gOLLkXFKsVga2WIgOrRSYqtZmpfSp9cd0z xyCw== X-Gm-Message-State: AC+VfDwH8XeTHqhCGZTdDQs8u5deUZB2TB5PcRfswV/cg5Lxc6yaWbDr VD5CtzgRqJnruTOnD1ZPMKCMDQH8lSFuZ57wjrDr0KHTO6gEObeYC6Xxqg== X-Google-Smtp-Source: ACHHUZ5c4/yH5kfzFlzvV4Qn3wLr7DRKlzlQAX1Yj9gKmyRuOuHa4jLsoGqBIZtbEBkQ3Sx5QR9+DjcHeqWx X-Received: by 2002:ac8:5781:0:b0:3f6:c5c5:a6e0 with SMTP id v1-20020ac85781000000b003f6c5c5a6e0mr9981558qta.53.1686507946100; Sun, 11 Jun 2023 11:25:46 -0700 (PDT) Received: from postal.iol.unh.edu (postal.iol.unh.edu. [132.177.123.84]) by smtp-relay.gmail.com with ESMTPS id m6-20020ac84446000000b003f6c0e197a4sm563188qtn.19.2023.06.11.11.25.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jun 2023 11:25:46 -0700 (PDT) X-Relaying-Domain: iol.unh.edu Date: Sun, 11 Jun 2023 11:25:46 -0700 (PDT) Message-ID: <648611aa.c80a0220.7edf0.e1e4SMTPIN_ADDED_MISSING@mx.google.com> Received: from [172.17.0.3] (unknown [172.18.0.215]) by postal.iol.unh.edu (Postfix) with ESMTP id B8A01605246B; Sun, 11 Jun 2023 14:25:45 -0400 (EDT) Subject: |WARNING| pw127667-127672 [PATCH] [11/11] net/hns3: remove log redundant line break From: dpdklab@iol.unh.edu To: test-report@dpdk.org Cc: dpdk-test-reports@iol.unh.edu Content-Type: text/plain X-BeenThere: test-report@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: automatic DPDK test reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: test-report-bounces@dpdk.org Test-Label: iol-testing Test-Status: WARNING http://dpdk.org/patch/127667 _apply patch failure_ Submitter: Dongdong Liu Date: Monday, May 29 2023 13:09:40 Applied on: CommitID:6322157adb518508feb8643707b33aad3bf85599 Apply patch set 127667-127672 failed: Checking patch drivers/net/hns3/hns3_ptp.c... error: while searching for: int hns3_ptp_init(struct hns3_hw *hw) { int ret; if (!hns3_dev_get_support(hw, PTP)) error: patch failed: drivers/net/hns3/hns3_ptp.c:59 error: while searching for: /* Start PTP timer */ hns3_write_dev(hw, HNS3_CFG_TIME_CYC_EN, 1); return 0; } error: patch failed: drivers/net/hns3/hns3_ptp.c:71 Applying patch drivers/net/hns3/hns3_ptp.c with 2 rejects... Rejected hunk #1. Rejected hunk #2. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c (rejected hunks) @@ -59,6 +59,8 @@ hns3_ptp_int_en(struct hns3_hw *hw, bool en) int hns3_ptp_init(struct hns3_hw *hw) { + struct timespec sys_time; + struct rte_eth_dev *dev; int ret; if (!hns3_dev_get_support(hw, PTP)) @@ -71,6 +73,11 @@ hns3_ptp_init(struct hns3_hw *hw) /* Start PTP timer */ hns3_write_dev(hw, HNS3_CFG_TIME_CYC_EN, 1); + /* Initializing the RTC. */ + dev = &rte_eth_devices[hw->data->port_id]; + clock_gettime(CLOCK_REALTIME, &sys_time); + (void)hns3_timesync_write_time(dev, &sys_time); + return 0; } Checking patch drivers/net/hns3/hns3_ethdev.c... Hunk #1 succeeded at 4423 (offset 11 lines). error: while searching for: goto err_intr_callback_register; } ret = hns3_ptp_init(hw); if (ret) goto err_get_config; /* Enable interrupt */ rte_intr_enable(pci_dev->intr_handle); hns3_pf_enable_irq0(hw); error: patch failed: drivers/net/hns3/hns3_ethdev.c:4573 Applying patch drivers/net/hns3/hns3_ethdev.c with 1 reject... Hunk #1 applied cleanly. Rejected hunk #2. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c (rejected hunks) @@ -4573,10 +4579,6 @@ hns3_init_pf(struct rte_eth_dev *eth_dev) goto err_intr_callback_register; } - ret = hns3_ptp_init(hw); - if (ret) - goto err_get_config; - /* Enable interrupt */ rte_intr_enable(pci_dev->intr_handle); hns3_pf_enable_irq0(hw); Checking patch drivers/net/hns3/hns3_ethdev.c... error: drivers/net/hns3/hns3_ethdev.c: does not match index Checking patch drivers/net/hns3/hns3_ethdev.h... error: while searching for: int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev, struct rte_eth_conf *conf); int hns3_ptp_init(struct hns3_hw *hw); int hns3_timesync_enable(struct rte_eth_dev *dev); int hns3_timesync_disable(struct rte_eth_dev *dev); int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev, error: patch failed: drivers/net/hns3/hns3_ethdev.h:1043 Checking patch drivers/net/hns3/hns3_ptp.c... error: while searching for: return ret; } int hns3_ptp_init(struct hns3_hw *hw) { struct timespec sys_time; struct rte_eth_dev *dev; int ret; if (!hns3_dev_get_support(hw, PTP)) return 0; ret = hns3_ptp_int_en(hw, true); if (ret) return ret; /* Start PTP timer */ hns3_write_dev(hw, HNS3_CFG_TIME_CYC_EN, 1); /* Initializing the RTC. */ dev = &rte_eth_devices[hw->data->port_id]; clock_gettime(CLOCK_REALTIME, &sys_time); (void)hns3_timesync_write_time(dev, &sys_time); return 0; } static int hns3_timesync_configure(struct hns3_adapter *hns, bool en) { error: patch failed: drivers/net/hns3/hns3_ptp.c:56 error: while searching for: return ret; } error: patch failed: drivers/net/hns3/hns3_ptp.c:301 Applying patch drivers/net/hns3/hns3_ethdev.h with 1 reject... Rejected hunk #1. Applying patch drivers/net/hns3/hns3_ptp.c with 2 rejects... Rejected hunk #1. Rejected hunk #2. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h (rejected hunks) @@ -1043,6 +1043,7 @@ int hns3_restore_ptp(struct hns3_adapter *hns); int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev, struct rte_eth_conf *conf); int hns3_ptp_init(struct hns3_hw *hw); +void hns3_ptp_uninit(struct hns3_hw *hw); int hns3_timesync_enable(struct rte_eth_dev *dev); int hns3_timesync_disable(struct rte_eth_dev *dev); int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev, diff a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c (rejected hunks) @@ -56,31 +56,6 @@ hns3_ptp_int_en(struct hns3_hw *hw, bool en) return ret; } -int -hns3_ptp_init(struct hns3_hw *hw) -{ - struct timespec sys_time; - struct rte_eth_dev *dev; - int ret; - - if (!hns3_dev_get_support(hw, PTP)) - return 0; - - ret = hns3_ptp_int_en(hw, true); - if (ret) - return ret; - - /* Start PTP timer */ - hns3_write_dev(hw, HNS3_CFG_TIME_CYC_EN, 1); - - /* Initializing the RTC. */ - dev = &rte_eth_devices[hw->data->port_id]; - clock_gettime(CLOCK_REALTIME, &sys_time); - (void)hns3_timesync_write_time(dev, &sys_time); - - return 0; -} - static int hns3_timesync_configure(struct hns3_adapter *hns, bool en) { @@ -301,3 +276,46 @@ hns3_restore_ptp(struct hns3_adapter *hns) return ret; } + +int +hns3_ptp_init(struct hns3_hw *hw) +{ + struct timespec sys_time; + struct rte_eth_dev *dev; + int ret; + + if (!hns3_dev_get_support(hw, PTP)) + return 0; + + ret = hns3_ptp_int_en(hw, true); + if (ret != 0) + return ret; + + /* Start PTP timer */ + hns3_write_dev(hw, HNS3_CFG_TIME_CYC_EN, 1); + + /* Initializing the RTC. */ + dev = &rte_eth_devices[hw->data->port_id]; + clock_gettime(CLOCK_REALTIME, &sys_time); + (void)hns3_timesync_write_time(dev, &sys_time); + + return 0; +} + +void +hns3_ptp_uninit(struct hns3_hw *hw) +{ + struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw); + int ret; + + if (!hns3_dev_get_support(hw, PTP)) + return; + + ret = hns3_ptp_int_en(hw, false); + if (ret != 0) + hns3_err(hw, "disable PTP interrupt failed, ret = %d.", ret); + + ret = hns3_timesync_configure(hns, false); + if (ret != 0) + hns3_err(hw, "disable timesync failed, ret = %d.", ret); +} Checking patch drivers/net/hns3/hns3_ethdev.c... error: drivers/net/hns3/hns3_ethdev.c: does not match index Checking patch drivers/net/hns3/hns3_ethdev.h... error: while searching for: uint32_t link_speed, uint8_t link_duplex); void hns3vf_update_push_lsc_cap(struct hns3_hw *hw, bool supported); int hns3_restore_ptp(struct hns3_adapter *hns); int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev, struct rte_eth_conf *conf); int hns3_ptp_init(struct hns3_hw *hw); void hns3_ptp_uninit(struct hns3_hw *hw); int hns3_timesync_enable(struct rte_eth_dev *dev); int hns3_timesync_disable(struct rte_eth_dev *dev); int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp, uint32_t flags __rte_unused); int hns3_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp); int hns3_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts); int hns3_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts); int hns3_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta); const char *hns3_get_media_type_name(uint8_t media_type); static inline bool error: patch failed: drivers/net/hns3/hns3_ethdev.h:1039 Checking patch drivers/net/hns3/hns3_ptp.c... error: while searching for: #include #include "hns3_ethdev.h" #include "hns3_regs.h" #include "hns3_logs.h" uint64_t hns3_timestamp_rx_dynflag; error: patch failed: drivers/net/hns3/hns3_ptp.c:7 Checking patch drivers/net/hns3/hns3_ptp.h... error: drivers/net/hns3/hns3_ptp.h: already exists in index Checking patch drivers/net/hns3/hns3_regs.h... error: while searching for: #define HNS3_TQP_INTR_RL_DEFAULT 0 #define HNS3_TQP_INTR_QL_DEFAULT 0 /* Register bit for 1588 event */ #define HNS3_VECTOR0_1588_INT_B 0 #define HNS3_PTP_BASE_ADDRESS 0x29000 #define HNS3_TX_1588_SEQID_BACK (HNS3_PTP_BASE_ADDRESS + 0x0) #define HNS3_TX_1588_TSP_BACK_0 (HNS3_PTP_BASE_ADDRESS + 0x4) #define HNS3_TX_1588_TSP_BACK_1 (HNS3_PTP_BASE_ADDRESS + 0x8) #define HNS3_TX_1588_TSP_BACK_2 (HNS3_PTP_BASE_ADDRESS + 0xc) #define HNS3_TX_1588_BACK_TSP_CNT (HNS3_PTP_BASE_ADDRESS + 0x30) #define HNS3_CFG_TIME_SYNC_H (HNS3_PTP_BASE_ADDRESS + 0x50) #define HNS3_CFG_TIME_SYNC_M (HNS3_PTP_BASE_ADDRESS + 0x54) #define HNS3_CFG_TIME_SYNC_L (HNS3_PTP_BASE_ADDRESS + 0x58) #define HNS3_CFG_TIME_SYNC_RDY (HNS3_PTP_BASE_ADDRESS + 0x5c) #define HNS3_CFG_TIME_CYC_EN (HNS3_PTP_BASE_ADDRESS + 0x70) #define HNS3_CURR_TIME_OUT_H (HNS3_PTP_BASE_ADDRESS + 0x74) #define HNS3_CURR_TIME_OUT_L (HNS3_PTP_BASE_ADDRESS + 0x78) #define HNS3_CURR_TIME_OUT_NS (HNS3_PTP_BASE_ADDRESS + 0x7c) /* gl_usec convert to hardware count, as writing each 1 represents 2us */ #define HNS3_GL_USEC_TO_REG(gl_usec) ((gl_usec) >> 1) /* rl_usec convert to hardware count, as writing each 1 represents 4us */ error: patch failed: drivers/net/hns3/hns3_regs.h:124 Applying patch drivers/net/hns3/hns3_ethdev.h with 1 reject... Rejected hunk #1. Applying patch drivers/net/hns3/hns3_ptp.c with 1 reject... Rejected hunk #1. Applying patch drivers/net/hns3/hns3_regs.h with 1 reject... Rejected hunk #1. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_ethdev.h b/drivers/net/hns3/hns3_ethdev.h (rejected hunks) @@ -1039,23 +1039,6 @@ void hns3vf_update_link_status(struct hns3_hw *hw, uint8_t link_status, uint32_t link_speed, uint8_t link_duplex); void hns3vf_update_push_lsc_cap(struct hns3_hw *hw, bool supported); -int hns3_restore_ptp(struct hns3_adapter *hns); -int hns3_mbuf_dyn_rx_timestamp_register(struct rte_eth_dev *dev, - struct rte_eth_conf *conf); -int hns3_ptp_init(struct hns3_hw *hw); -void hns3_ptp_uninit(struct hns3_hw *hw); -int hns3_timesync_enable(struct rte_eth_dev *dev); -int hns3_timesync_disable(struct rte_eth_dev *dev); -int hns3_timesync_read_rx_timestamp(struct rte_eth_dev *dev, - struct timespec *timestamp, - uint32_t flags __rte_unused); -int hns3_timesync_read_tx_timestamp(struct rte_eth_dev *dev, - struct timespec *timestamp); -int hns3_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts); -int hns3_timesync_write_time(struct rte_eth_dev *dev, - const struct timespec *ts); -int hns3_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta); - const char *hns3_get_media_type_name(uint8_t media_type); static inline bool diff a/drivers/net/hns3/hns3_ptp.c b/drivers/net/hns3/hns3_ptp.c (rejected hunks) @@ -7,7 +7,7 @@ #include #include "hns3_ethdev.h" -#include "hns3_regs.h" +#include "hns3_ptp.h" #include "hns3_logs.h" uint64_t hns3_timestamp_rx_dynflag; diff a/drivers/net/hns3/hns3_regs.h b/drivers/net/hns3/hns3_regs.h (rejected hunks) @@ -124,29 +124,6 @@ #define HNS3_TQP_INTR_RL_DEFAULT 0 #define HNS3_TQP_INTR_QL_DEFAULT 0 -/* Register bit for 1588 event */ -#define HNS3_VECTOR0_1588_INT_B 0 - -#define HNS3_PTP_BASE_ADDRESS 0x29000 - -#define HNS3_TX_1588_SEQID_BACK (HNS3_PTP_BASE_ADDRESS + 0x0) -#define HNS3_TX_1588_TSP_BACK_0 (HNS3_PTP_BASE_ADDRESS + 0x4) -#define HNS3_TX_1588_TSP_BACK_1 (HNS3_PTP_BASE_ADDRESS + 0x8) -#define HNS3_TX_1588_TSP_BACK_2 (HNS3_PTP_BASE_ADDRESS + 0xc) - -#define HNS3_TX_1588_BACK_TSP_CNT (HNS3_PTP_BASE_ADDRESS + 0x30) - -#define HNS3_CFG_TIME_SYNC_H (HNS3_PTP_BASE_ADDRESS + 0x50) -#define HNS3_CFG_TIME_SYNC_M (HNS3_PTP_BASE_ADDRESS + 0x54) -#define HNS3_CFG_TIME_SYNC_L (HNS3_PTP_BASE_ADDRESS + 0x58) -#define HNS3_CFG_TIME_SYNC_RDY (HNS3_PTP_BASE_ADDRESS + 0x5c) - -#define HNS3_CFG_TIME_CYC_EN (HNS3_PTP_BASE_ADDRESS + 0x70) - -#define HNS3_CURR_TIME_OUT_H (HNS3_PTP_BASE_ADDRESS + 0x74) -#define HNS3_CURR_TIME_OUT_L (HNS3_PTP_BASE_ADDRESS + 0x78) -#define HNS3_CURR_TIME_OUT_NS (HNS3_PTP_BASE_ADDRESS + 0x7c) - /* gl_usec convert to hardware count, as writing each 1 represents 2us */ #define HNS3_GL_USEC_TO_REG(gl_usec) ((gl_usec) >> 1) /* rl_usec convert to hardware count, as writing each 1 represents 4us */ Checking patch drivers/net/hns3/hns3_rxtx.c... error: while searching for: return -ENOTSUP; rte_spinlock_lock(&hw->lock); ret = hns3_reset_queue(hw, rx_queue_id, HNS3_RING_TYPE_RX); if (ret) { hns3_err(hw, "fail to reset Rx queue %u, ret = %d.", error: patch failed: drivers/net/hns3/hns3_rxtx.c:4523 error: while searching for: return -ENOTSUP; rte_spinlock_lock(&hw->lock); hns3_enable_rxq(rxq, false); hns3_rx_queue_release_mbufs(rxq); error: patch failed: drivers/net/hns3/hns3_rxtx.c:4569 error: while searching for: return -ENOTSUP; rte_spinlock_lock(&hw->lock); ret = hns3_reset_queue(hw, tx_queue_id, HNS3_RING_TYPE_TX); if (ret) { hns3_err(hw, "fail to reset Tx queue %u, ret = %d.", error: patch failed: drivers/net/hns3/hns3_rxtx.c:4591 error: while searching for: return -ENOTSUP; rte_spinlock_lock(&hw->lock); hns3_enable_txq(txq, false); hns3_tx_queue_release_mbufs(txq); /* error: patch failed: drivers/net/hns3/hns3_rxtx.c:4617 Applying patch drivers/net/hns3/hns3_rxtx.c with 4 rejects... Rejected hunk #1. Rejected hunk #2. Rejected hunk #3. Rejected hunk #4. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c (rejected hunks) @@ -4523,6 +4523,13 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) return -ENOTSUP; rte_spinlock_lock(&hw->lock); + + if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) { + hns3_err(hw, "fail to start Rx queue during resetting."); + rte_spinlock_unlock(&hw->lock); + return -EIO; + } + ret = hns3_reset_queue(hw, rx_queue_id, HNS3_RING_TYPE_RX); if (ret) { hns3_err(hw, "fail to reset Rx queue %u, ret = %d.", @@ -4569,6 +4576,13 @@ hns3_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) return -ENOTSUP; rte_spinlock_lock(&hw->lock); + + if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) { + hns3_err(hw, "fail to stop Rx queue during resetting."); + rte_spinlock_unlock(&hw->lock); + return -EIO; + } + hns3_enable_rxq(rxq, false); hns3_rx_queue_release_mbufs(rxq); @@ -4591,6 +4605,13 @@ hns3_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) return -ENOTSUP; rte_spinlock_lock(&hw->lock); + + if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) { + hns3_err(hw, "fail to start Tx queue during resetting."); + rte_spinlock_unlock(&hw->lock); + return -EIO; + } + ret = hns3_reset_queue(hw, tx_queue_id, HNS3_RING_TYPE_TX); if (ret) { hns3_err(hw, "fail to reset Tx queue %u, ret = %d.", @@ -4617,6 +4638,13 @@ hns3_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) return -ENOTSUP; rte_spinlock_lock(&hw->lock); + + if (__atomic_load_n(&hw->reset.resetting, __ATOMIC_RELAXED)) { + hns3_err(hw, "fail to stop Tx queue during resetting."); + rte_spinlock_unlock(&hw->lock); + return -EIO; + } + hns3_enable_txq(txq, false); hns3_tx_queue_release_mbufs(txq); /* Checking patch drivers/net/hns3/hns3_rxtx.c... error: while searching for: rxq->sw_ring[i].mbuf = NULL; } } } for (i = 0; i < rxq->bulk_mbuf_num; i++) error: patch failed: drivers/net/hns3/hns3_rxtx.c:50 error: while searching for: return ret; } ret = hns3_init_rxq(hns, rx_queue_id); if (ret) { hns3_err(hw, "fail to init Rx queue %u, ret = %d.", error: patch failed: drivers/net/hns3/hns3_rxtx.c:4538 Applying patch drivers/net/hns3/hns3_rxtx.c with 2 rejects... Rejected hunk #1. Rejected hunk #2. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c (rejected hunks) @@ -50,6 +50,8 @@ hns3_rx_queue_release_mbufs(struct hns3_rx_queue *rxq) rxq->sw_ring[i].mbuf = NULL; } } + for (i = 0; i < rxq->rx_rearm_nb; i++) + rxq->sw_ring[rxq->rx_rearm_start + i].mbuf = NULL; } for (i = 0; i < rxq->bulk_mbuf_num; i++) @@ -4538,6 +4540,9 @@ hns3_dev_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) return ret; } + if (rxq->sw_ring[0].mbuf != NULL) + hns3_rx_queue_release_mbufs(rxq); + ret = hns3_init_rxq(hns, rx_queue_id); if (ret) { hns3_err(hw, "fail to init Rx queue %u, ret = %d.", Checking patch drivers/net/hns3/hns3_ethdev_vf.c... error: while searching for: hns3_enable_rxd_adv_layout(hw); ret = hns3_init_queues(hns, reset_queue); if (ret) hns3_err(hw, "failed to init queues, ret = %d.", ret); return hns3_restore_filter(hns); } error: patch failed: drivers/net/hns3/hns3_ethdev_vf.c:1674 Applying patch drivers/net/hns3/hns3_ethdev_vf.c with 1 reject... Rejected hunk #1. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c (rejected hunks) @@ -1674,8 +1674,10 @@ hns3vf_do_start(struct hns3_adapter *hns, bool reset_queue) hns3_enable_rxd_adv_layout(hw); ret = hns3_init_queues(hns, reset_queue); - if (ret) + if (ret) { hns3_err(hw, "failed to init queues, ret = %d.", ret); + return ret; + } return hns3_restore_filter(hns); } Checking patch drivers/net/hns3/hns3_flow.c... error: while searching for: if (ret != 0) return ret; hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64, old_tuple_fields, new_tuple_fields); return 0; } error: patch failed: drivers/net/hns3/hns3_flow.c:1944 Applying patch drivers/net/hns3/hns3_flow.c with 1 reject... Rejected hunk #1. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c (rejected hunks) @@ -1944,8 +1944,9 @@ hns3_flow_set_rss_ptype_tuple(struct hns3_hw *hw, if (ret != 0) return ret; - hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64, - old_tuple_fields, new_tuple_fields); + if (!cfg_global_tuple) + hns3_info(hw, "RSS tuple fields changed from 0x%" PRIx64 " to 0x%" PRIx64, + old_tuple_fields, new_tuple_fields); return 0; } Checking patch drivers/net/hns3/hns3_regs.c... error: while searching for: hns3_cmd_setup_basic_desc(&desc[i], opcode, true); ret = hns3_cmd_send(hw, desc, bd_num); if (ret) { hns3_err(hw, "fail to query dfx registers, opcode = 0x%04X, " "ret = %d.\n", opcode, ret); } return ret; } error: patch failed: drivers/net/hns3/hns3_regs.c:385 Checking patch drivers/net/hns3/hns3_rxtx.c... error: while searching for: for (i = 0; i < hw->cfg_max_queues; i++) { ret = hns3pf_reset_tqp(hw, i); if (ret) { hns3_err(hw, "fail to reset tqp, queue_id = %d, ret = %d.", i, ret); return ret; } error: patch failed: drivers/net/hns3/hns3_rxtx.c:751 error: while searching for: { struct hns3_reset_tqp_queue_cmd *req; struct hns3_cmd_desc desc; int queue_direction; int ret; hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RESET_TQP_QUEUE_INDEP, false); req = (struct hns3_reset_tqp_queue_cmd *)desc.data; req->tqp_id = rte_cpu_to_le_16(queue_id); queue_direction = queue_type == HNS3_RING_TYPE_TX ? 0 : 1; req->queue_direction = rte_cpu_to_le_16(queue_direction); hns3_set_bit(req->reset_req, HNS3_TQP_RESET_B, enable ? 1 : 0); ret = hns3_cmd_send(hw, &desc, 1); error: patch failed: drivers/net/hns3/hns3_rxtx.c:829 error: while searching for: { struct hns3_reset_tqp_queue_cmd *req; struct hns3_cmd_desc desc; int queue_direction; int ret; hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RESET_TQP_QUEUE_INDEP, true); req = (struct hns3_reset_tqp_queue_cmd *)desc.data; req->tqp_id = rte_cpu_to_le_16(queue_id); queue_direction = queue_type == HNS3_RING_TYPE_TX ? 0 : 1; req->queue_direction = rte_cpu_to_le_16(queue_direction); ret = hns3_cmd_send(hw, &desc, 1); if (ret) { error: patch failed: drivers/net/hns3/hns3_rxtx.c:855 Applying patch drivers/net/hns3/hns3_regs.c with 1 reject... Rejected hunk #1. Applying patch drivers/net/hns3/hns3_rxtx.c with 3 rejects... Rejected hunk #1. Rejected hunk #2. Rejected hunk #3. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_regs.c b/drivers/net/hns3/hns3_regs.c (rejected hunks) @@ -385,10 +385,9 @@ hns3_dfx_reg_cmd_send(struct hns3_hw *hw, struct hns3_cmd_desc *desc, hns3_cmd_setup_basic_desc(&desc[i], opcode, true); ret = hns3_cmd_send(hw, desc, bd_num); - if (ret) { + if (ret) hns3_err(hw, "fail to query dfx registers, opcode = 0x%04X, " "ret = %d.\n", opcode, ret); - } return ret; } diff a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c (rejected hunks) @@ -751,7 +751,7 @@ hns3pf_reset_all_tqps(struct hns3_hw *hw) for (i = 0; i < hw->cfg_max_queues; i++) { ret = hns3pf_reset_tqp(hw, i); if (ret) { - hns3_err(hw, "fail to reset tqp, queue_id = %d, ret = %d.", + hns3_err(hw, "fail to reset tqp, queue_id = %u, ret = %d.", i, ret); return ret; } @@ -829,15 +829,13 @@ hns3_send_reset_queue_cmd(struct hns3_hw *hw, uint16_t queue_id, { struct hns3_reset_tqp_queue_cmd *req; struct hns3_cmd_desc desc; - int queue_direction; int ret; hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RESET_TQP_QUEUE_INDEP, false); req = (struct hns3_reset_tqp_queue_cmd *)desc.data; req->tqp_id = rte_cpu_to_le_16(queue_id); - queue_direction = queue_type == HNS3_RING_TYPE_TX ? 0 : 1; - req->queue_direction = rte_cpu_to_le_16(queue_direction); + req->queue_direction = queue_type == HNS3_RING_TYPE_TX ? 0 : 1; hns3_set_bit(req->reset_req, HNS3_TQP_RESET_B, enable ? 1 : 0); ret = hns3_cmd_send(hw, &desc, 1); @@ -855,15 +853,13 @@ hns3_get_queue_reset_status(struct hns3_hw *hw, uint16_t queue_id, { struct hns3_reset_tqp_queue_cmd *req; struct hns3_cmd_desc desc; - int queue_direction; int ret; hns3_cmd_setup_basic_desc(&desc, HNS3_OPC_RESET_TQP_QUEUE_INDEP, true); req = (struct hns3_reset_tqp_queue_cmd *)desc.data; req->tqp_id = rte_cpu_to_le_16(queue_id); - queue_direction = queue_type == HNS3_RING_TYPE_TX ? 0 : 1; - req->queue_direction = rte_cpu_to_le_16(queue_direction); + req->queue_direction = queue_type == HNS3_RING_TYPE_TX ? 0 : 1; ret = hns3_cmd_send(hw, &desc, 1); if (ret) { Checking patch drivers/net/hns3/hns3_rxtx.c... error: while searching for: ret = hns3_cmd_send(hw, &desc, 1); if (ret) hns3_err(hw, "TQP enable fail, ret = %d", ret); return ret; } error: patch failed: drivers/net/hns3/hns3_rxtx.c:586 error: while searching for: ret = hns3_fake_tx_queue_config(hw, tx_need_add_nb_q); if (ret) { hns3_err(hw, "Fail to configure fake rx queues: %d", ret); goto cfg_fake_tx_q_fail; } error: patch failed: drivers/net/hns3/hns3_rxtx.c:1635 Applying patch drivers/net/hns3/hns3_rxtx.c with 2 rejects... Rejected hunk #1. Rejected hunk #2. hint: Use 'git am --show-current-patch' to see the failed patch diff a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c (rejected hunks) @@ -586,7 +586,7 @@ hns3_tqp_enable(struct hns3_hw *hw, uint16_t queue_id, bool enable) ret = hns3_cmd_send(hw, &desc, 1); if (ret) - hns3_err(hw, "TQP enable fail, ret = %d", ret); + hns3_err(hw, "TQP %s fail, ret = %d", enable ? "enable" : "disable", ret); return ret; } @@ -1635,7 +1635,7 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q, ret = hns3_fake_tx_queue_config(hw, tx_need_add_nb_q); if (ret) { - hns3_err(hw, "Fail to configure fake rx queues: %d", ret); + hns3_err(hw, "Fail to configure fake tx queues: %d", ret); goto cfg_fake_tx_q_fail; } Checking patch drivers/net/hns3/hns3_ethdev.c... error: drivers/net/hns3/hns3_ethdev.c: does not match index hint: Use 'git am --show-current-patch' to see the failed patch https://lab.dpdk.org/results/dashboard/patchsets/26439/ UNH-IOL DPDK Community Lab