[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o7iuof4b.fsf@intel.com>
Date: Fri, 25 Aug 2023 16:51:16 -0700
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: Ferenc Fejes <ferenc.fejes@...csson.com>, "jesse.brandeburg@...el.com"
<jesse.brandeburg@...el.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "sasha.neftin@...el.com"
<sasha.neftin@...el.com>, "intel-wired-lan@...ts.osuosl.org"
<intel-wired-lan@...ts.osuosl.org>, "anthony.l.nguyen@...el.com"
<anthony.l.nguyen@...el.com>
Cc: "hawk@...nel.org" <hawk@...nel.org>
Subject: Re: BUG(?): igc link up and XDP program init fails
Hi Ferenc,
Vinicius Costa Gomes <vinicius.gomes@...el.com> writes:
> Hi Ferenc,
>
> Ferenc Fejes <ferenc.fejes@...csson.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
Powered by blists - more mailing lists