public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@intel•com>
To: Ferenc Fejes <ferenc.fejes@ericsson•com>,
	"jesse.brandeburg@intel•com" <jesse.brandeburg@intel•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>,
	"sasha.neftin@intel•com" <sasha.neftin@intel•com>,
	"intel-wired-lan@lists•osuosl.org"
	<intel-wired-lan@lists•osuosl.org>,
	"anthony.l.nguyen@intel•com" <anthony.l.nguyen@intel•com>
Cc: "hawk@kernel•org" <hawk@kernel•org>
Subject: Re: BUG(?): igc link up and XDP program init fails
Date: Fri, 25 Aug 2023 16:51:16 -0700	[thread overview]
Message-ID: <87o7iuof4b.fsf@intel.com> (raw)
In-Reply-To: <87ttsmohoe.fsf@intel.com>

Hi Ferenc,

Vinicius Costa Gomes <vinicius.gomes@intel•com> writes:

> Hi Ferenc,
>
> Ferenc Fejes <ferenc.fejes@ericsson•com> writes:
>

[...]

> I don't think there's anything wrong with your setup.
>
> I am considering this a bug, I don't have any patches from the top of my
> head for you to try, but taking a look.
>

See if the following patch works. Doesn't look too bad, but I have to
think a bit more about it.

--8<---------------cut here---------------start------------->8---
diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c
index e7701866d8b4..d1b3c897c3ac 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -6462,7 +6462,7 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames,
 	struct igc_ring *ring;
 	int i, drops;
 
-	if (unlikely(test_bit(__IGC_DOWN, &adapter->state)))
+	if (unlikely(!netif_carrier_ok(dev)))
 		return -ENETDOWN;
 
 	if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK))
--8<---------------cut here---------------end--------------->8---

Cheers,
-- 
Vinicius

  reply	other threads:[~2023-08-25 23:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 13:43 BUG(?): igc link up and XDP program init fails Ferenc Fejes
2023-08-25 22:56 ` Vinicius Costa Gomes
2023-08-25 23:51   ` Vinicius Costa Gomes [this message]
2023-09-04 12:29   ` Ferenc Fejes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7iuof4b.fsf@intel.com \
    --to=vinicius.gomes@intel$(echo .)com \
    --cc=anthony.l.nguyen@intel$(echo .)com \
    --cc=ferenc.fejes@ericsson$(echo .)com \
    --cc=hawk@kernel$(echo .)org \
    --cc=intel-wired-lan@lists$(echo .)osuosl.org \
    --cc=jesse.brandeburg@intel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=sasha.neftin@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox