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 486D343CE7; Mon, 18 Mar 2024 16:06:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DFF8B40289; Mon, 18 Mar 2024 16:06:11 +0100 (CET) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id A715D4027F for ; Mon, 18 Mar 2024 16:06:10 +0100 (CET) Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-29df0ca87d1so2826230a91.2 for ; Mon, 18 Mar 2024 08:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1710774370; x=1711379170; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=ctrbEkBOZuU22J6h29pEAgyrntcAc80kEmdSbJa67Aw=; b=HQfwAIAYbAm21IkJmabgwio1fsl1leT2RhWtMoj1wmo0XV6QhjJ1lygiBFBCIVrWLQ 8pfTWWLTSpqYrgOMbRWFLFHcnT6/Tcjfz6Xj/BNwZOtPkwxz48URlD5eJ9kujRLdYRB9 jNJVzGoqpIYbCnDhv9sgN/2C9BHP93TcK18AJu0ks2iVn4qlsx8MdGp5bppjkDJgbFl8 c4zUiQCD/GD0bYe0FZPBEqLfwPgXwf5GgCKj+LrUoby3o5sAu1TjQb1AWob8We/DHkSL iJJhPp1gscXwbcwDgiOiy/IypNWFm8sdUlhwOhFYtrK8awMM7/9fGtIXnvHAkzfoTMBd Qiaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710774370; x=1711379170; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ctrbEkBOZuU22J6h29pEAgyrntcAc80kEmdSbJa67Aw=; b=BnCQfy0uU4aPeMSZiZoRiTYotNtGytmkNon5y24yKNv0XKwDmQluP2t3ZPeEu9R2Lw SycBbjv5+rXlKrMn1qdJQNj2owVF5CPyDNkRU7ezRSIdAilEj4UHzc5EjG1PcYTYKEre MeM9wUVj3zKnFut7AbpDCibl5n8PFIWnQcEbDJO0vbp1Xr8JQpgtX2oBFcNVHEko13oR 9wCFjC3jcyW3LktKpolyeZlUuUmR8iH64uWysKHzPv725aYX3+0yMTFdpq/+FUbRE/Be v35dcHG4Lsv4l4d8HtPCvPs3MIkpvuVHYu3SO4lcDclcodz1i4zcvQj+l6W9rXubjOeb ymSQ== X-Gm-Message-State: AOJu0YwU3oQbSn8GJbHj+F7qOYekXVmFU1qytYupkXkhKZRLC1x9VCcC HxRIgnBdFzcd2CZTDcYDQjNmuHIxup7X/MonHCeWQ4mbZTcWuCZSfoHtpCe7XwItVya5nYQ+mQ1 n X-Google-Smtp-Source: AGHT+IEGj7Caqp6uiF7wehs7CjKBo3GkhIr2oQN/T09huQtg30KrxJGxiw5BW/I9A69ZJkVdT6LyGg== X-Received: by 2002:a17:90a:6446:b0:29b:b28d:ac66 with SMTP id y6-20020a17090a644600b0029bb28dac66mr9468596pjm.5.1710774369562; Mon, 18 Mar 2024 08:06:09 -0700 (PDT) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id ie15-20020a17090b400f00b0029de90f4d44sm7175460pjb.9.2024.03.18.08.06.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 08:06:09 -0700 (PDT) Date: Mon, 18 Mar 2024 08:06:07 -0700 From: Stephen Hemminger To: "junwang01@cestc.cn" Cc: dev Subject: Re: dumpcap coredump for 82599 NIC Message-ID: <20240318080607.0f277b96@hermes.local> In-Reply-To: <2024031810480057847316@cestc.cn> References: <202403131000157988276@cestc.cn> <20240313092953.517ac6c7@hermes.local> <2024031417223703681414@cestc.cn> <2024031810480057847316@cestc.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, 18 Mar 2024 10:48:03 +0800 "junwang01@cestc.cn" wrote: > The issue indeed lies with the ixgbe driver. After making the following modifications, dpdk-dumpcap is now functioning properly. > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c > index d6cf00317e77b64f9822c155115f388ae62241eb..99b26f3c758b3c7ced5d59c6b27f305efe6cc33c 100644 > --- a/drivers/net/ixgbe/ixgbe_ethdev.c > +++ b/drivers/net/ixgbe/ixgbe_ethdev.c > @@ -4301,48 +4301,50 @@ ixgbe_dev_link_update_share(struct rte_eth_dev *dev, > wait = 1; > #endif > > - if (vf) > - diag = ixgbevf_check_link(hw, &link_speed, &link_up, wait); > - else > - diag = ixgbe_check_link(hw, &link_speed, &link_up, wait); > + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { > + if (vf) > + diag = ixgbevf_check_link(hw, &link_speed, &link_up, wait); > + else > + diag = ixgbe_check_link(hw, &link_speed, &link_up, wait); > > - if (diag != 0) { > - link.link_speed = RTE_ETH_SPEED_NUM_100M; > - link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX; > - return rte_eth_linkstatus_set(dev, &link); > - } > + if (diag != 0) { > + link.link_speed = RTE_ETH_SPEED_NUM_100M; > + link.link_duplex = RTE_ETH_LINK_FULL_DUPLEX; > + return rte_eth_linkstatus_set(dev, &link); > + } > + > + if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber && > + !ad->sdp3_no_tx_disable) { > + esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP); > + if ((esdp_reg & IXGBE_ESDP_SDP3)) > + link_up = 0; > + } > > - if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber && > - !ad->sdp3_no_tx_disable) { > - esdp_reg = IXGBE_READ_REG(hw, IXGBE_ESDP); > - if ((esdp_reg & IXGBE_ESDP_SDP3)) > - link_up = 0; > - } > - > - if (link_up == 0) { > - if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) { > - ixgbe_dev_wait_setup_link_complete(dev, 0); > - /* NOTE: review for potential ordering optimization */ > - if (!__atomic_test_and_set(&ad->link_thread_running, __ATOMIC_SEQ_CST)) { > - /* To avoid race condition between threads, set > - * the IXGBE_FLAG_NEED_LINK_CONFIG flag only > - * when there is no link thread running. > - */ > - intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG; > - if (rte_thread_create_internal_control(&ad->link_thread_tid, > - "ixgbe-link", > - ixgbe_dev_setup_link_thread_handler, dev) < 0) { > + if (link_up == 0) { > + if (ixgbe_get_media_type(hw) == ixgbe_media_type_fiber) { > + ixgbe_dev_wait_setup_link_complete(dev, 0); > + /* NOTE: review for potential ordering optimization */ > + if (!__atomic_test_and_set(&ad->link_thread_running, __ATOMIC_SEQ_CST)) { > + /* To avoid race condition between threads, set > + * the IXGBE_FLAG_NEED_LINK_CONFIG flag only > + * when there is no link thread running. > + */ > + intr->flags |= IXGBE_FLAG_NEED_LINK_CONFIG; > + if (rte_thread_create_internal_control(&ad->link_thread_tid, > + "ixgbe-link", > + ixgbe_dev_setup_link_thread_handler, dev) < 0) { > + PMD_DRV_LOG(ERR, > + "Create link thread failed!"); > + /* NOTE: review for potential ordering optimization */ > + __atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST); > + } > + } else { > PMD_DRV_LOG(ERR, > - "Create link thread failed!"); > - /* NOTE: review for potential ordering optimization */ > - __atomic_clear(&ad->link_thread_running, __ATOMIC_SEQ_CST); > + "Other link thread is running now!"); > } > - } else { > - PMD_DRV_LOG(ERR, > - "Other link thread is running now!"); > } > + return rte_eth_linkstatus_set(dev, &link); > } > - return rte_eth_linkstatus_set(dev, &link); > } > > link.link_status = RTE_ETH_LINK_UP; > > Please send this to mailing list. Ideally it would go to Ixgbe maintainer but there doesn't appear to be one right now.