* Re: [PATCH V3] neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d"
From: David Miller @ 2017-05-31 23:26 UTC (permalink / raw)
To: sowmini.varadhan; +Cc: netdev, stephen
In-Reply-To: <1496188346-83229-1-git-send-email-sowmini.varadhan@oracle.com>
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Date: Tue, 30 May 2017 16:52:26 -0700
Just as a side note in the future, if you could fix the date
and time on your computer, that would be awesome :-)
^ permalink raw reply
* Re: [PATCH net-next 1/1] netvsc: Add #include's for csum_* function declarations
From: David Miller @ 2017-05-31 23:25 UTC (permalink / raw)
To: joe
Cc: olaf, sthemmin, netdev, jasowang, linux-kernel, mikelley,
marcelo.cerri, apw, devel, leann.ogasawara
In-Reply-To: <1496271571.2618.56.camel@perches.com>
From: Joe Perches <joe@perches.com>
Date: Wed, 31 May 2017 15:59:31 -0700
> On Wed, 2017-05-31 at 13:59 -0400, David Miller wrote:
>> From: Michael Kelley <mikelley@microsoft.com>
>> Date: Tue, 30 May 2017 10:43:04 -0700
>>
>> > Add direct #include statements for declarations of csum_tcpudp_magic()
>> > and csum_ipv6_magic(). While the needed #include's are picked up
>> > indirectly for the x86 architecture, they aren't on other
>> > architectures, resulting in compile errors.
>> >
>> > Signed-off-by: Michael Kelley <mikelley@microsoft.com>
>>
>> Applied, thank you.
>
> Did you apply this one or the v2?
I got v2 which used net/checksum.h et al.
^ permalink raw reply
* Re: loosing netdevices with namespaces and unshare?
From: Harald Welte @ 2017-05-31 23:13 UTC (permalink / raw)
To: Cong Wang; +Cc: Linux Kernel Network Developers
In-Reply-To: <CAM_iQpWicK0XySQ+L+DtVi2e2hUZx7w9CL0hC-kOaQsdbpXKtw@mail.gmail.com>
Hi Cong,
On Wed, May 31, 2017 at 03:40:33PM -0700, Cong Wang wrote:
> But you have other choices than using the physical interface
> directly in non-root ns, for example, creating a virtual pair and
> connect it with the physical one with a bridge. There are various
> ways to achieve this.
Yes, but then those "workarounds" expose the given physical device to
the root namespace, which is exactly what I try to avoid here. The
interface has no purpose outside of the specific target namespace, and
under no circumstances should the various applications on a normal Linux
system (whether it's network manager or whatever else) start to use the
device. The same also applies to the kernel itself. It is not
desirable to have the "root netns" start to do things like ipv6
stateless autoconfiguration, etc.
I of course know that all of those things can be individually disabled.
I just think having a physical netdev inside "single application"
namespaces is more complicated than it could be.
However, I have sufficiently made my argument clear, and I understand
that you don't share my concern. This is perfectly fine. We agree to
disagree :)
I simply have to find the least intrusive work-around to my liking for
the intentional but so far undocumented behavior of netdevices vanishing
into thin air. I'll manage.
--
- Harald Welte <laforge@gnumonks.org> http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
^ permalink raw reply
* Re: [PATCH net-next 1/1] netvsc: Add #include's for csum_* function declarations
From: Joe Perches @ 2017-05-31 22:59 UTC (permalink / raw)
To: David Miller, mikelley
Cc: netdev, linux-kernel, devel, olaf, apw, jasowang, leann.ogasawara,
marcelo.cerri, sthemmin
In-Reply-To: <20170531.135952.1314266532351768088.davem@davemloft.net>
On Wed, 2017-05-31 at 13:59 -0400, David Miller wrote:
> From: Michael Kelley <mikelley@microsoft.com>
> Date: Tue, 30 May 2017 10:43:04 -0700
>
> > Add direct #include statements for declarations of csum_tcpudp_magic()
> > and csum_ipv6_magic(). While the needed #include's are picked up
> > indirectly for the x86 architecture, they aren't on other
> > architectures, resulting in compile errors.
> >
> > Signed-off-by: Michael Kelley <mikelley@microsoft.com>
>
> Applied, thank you.
Did you apply this one or the v2?
^ permalink raw reply
* Re: net/ipv6: use-after-free in ip6_dst_ifdown
From: Cong Wang @ 2017-05-31 22:49 UTC (permalink / raw)
To: Eric Dumazet
Cc: Andrey Konovalov, David S. Miller, Alexey Kuznetsov, James Morris,
Hideaki YOSHIFUJI, Patrick McHardy, netdev, LKML, David Ahern,
Dmitry Vyukov, Kostya Serebryany, syzkaller
In-Reply-To: <CANn89iJ0Qd6FHXBva1sztCL0cVNk70J+3sQ9S0VAbVyTTD41fg@mail.gmail.com>
On Wed, May 31, 2017 at 9:55 AM, Eric Dumazet <edumazet@google.com> wrote:
> On Wed, May 31, 2017 at 9:45 AM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
>> On Wed, May 31, 2017 at 2:42 AM, Andrey Konovalov <andreyknvl@google.com> wrote:
>>> Hi,
>>>
>>> I've got the following error report while fuzzing the kernel with syzkaller.
>>>
>>> On commit 5ed02dbb497422bf225783f46e6eadd237d23d6b (4.12-rc3).
>>>
>>> Unfortunately it's not reproducible.
>>>
>>> ==================================================================
>>> BUG: KASAN: use-after-free in ip6_dst_ifdown+0x3cc/0x400 net/ipv6/route.c:422
>>> Read of size 8 at addr ffff88006afa4ad8 by task syz-executor6/23554
>>
>>
>> This one is very interesting.
>>
>> Here we are at:
>>
>> if (dev != loopback_dev) {
>> if (idev && idev->dev == dev) {
>> struct inet6_dev *loopback_idev =
>> in6_dev_get(loopback_dev);
>> if (loopback_idev) {
>> rt->rt6i_idev = loopback_idev;
>> in6_dev_put(idev);
>> }
>> }
>> }
>>
>> clearly no skb involved, it looks like idev is the one used-after-free.
>>
>> But below it is actually skb which is allocated and freed...
>>
>
> skb->head was a kmalloc(X) with X = 1024 in this case.
>
> So it is very possible the two different objects (skb->head and idev )
> were accidentally using the same slab (1024 bytes).
>
> KASAN only remember the last pair of alloc/free for a particular memory zone.
I see. So that memory area was freed for idev and then allocated
and freed again for skb->head, this happened so quick that the
use-after-free happened after it... Therefore we lost the track on where
we free the idev.
^ permalink raw reply
* Re: [PATCH V3] neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d"
From: Julian Anastasov @ 2017-05-31 22:41 UTC (permalink / raw)
To: Sowmini Varadhan; +Cc: netdev, davem, stephen
In-Reply-To: <20170531214639.GH9362@oracle.com>
Hello,
On Wed, 31 May 2017, Sowmini Varadhan wrote:
> On (06/01/17 00:41), Julian Anastasov wrote:
> >
> > So, we do not hold reference to neigh while accessing
> > its fields. I suspect we need to move the table lock from
> > neigh_remove_one here, for example:
>
> good point, let me think over your suggestion carefully (it sounds
> right, I want to make sure I dont miss any other race-windows)
> and post patch v4 tomorrow..
Another problem is that neigh_update() changes the
state but before we go and unlink the entry another CPU
can reactivate the entry, i.e. NUD_INCOMPLETE entered
in __neigh_event_send(). So, there will be always some
small window where surprises can happen and the entry is
not really deleted.
Checking for NUD_FAILED may not be needed, the
atomic_read(&n->refcnt) == 1 check under lock ensures
that we are in some state without timer, i.e. not in
NUD_INCOMPLETE, so it is ok to remove the entry.
> > Another solution to cause faster removal would be
> > to cancel the gc_work and to schedule it after 1 jiffie.
> > It helps when many entries are deleted at once but the
> > work prefers to just sleep when gc_thresh1 is not reached,
> > so such solution is not good enough.
>
> Right the other drawback of relying on gc for cleanup is
> that it doesn't give higher preference to cleaning up FAILED
> entries first- so it can end up cleaning up other useful entries
> (as I was pointing out to David Ahern)
I see, ok.
Regards
^ permalink raw reply
* Re: [PATCH net-next 6/9] bpf: fix stack_depth usage by test_bpf.ko
From: Alexei Starovoitov @ 2017-05-31 22:41 UTC (permalink / raw)
To: David Miller; +Cc: daniel, netdev, kernel-team
In-Reply-To: <f79ef874-55a1-cd58-a0e4-9859401a9249@fb.com>
On 5/31/17 11:45 AM, Alexei Starovoitov wrote:
> On 5/31/17 11:43 AM, David Miller wrote:
>> From: Alexei Starovoitov <ast@fb.com>
>> Date: Wed, 31 May 2017 11:39:37 -0700
>>
>>> On 5/31/17 11:15 AM, David Miller wrote:
>>>> From: Alexei Starovoitov <ast@fb.com>
>>>> Date: Tue, 30 May 2017 13:31:32 -0700
>>>>
>>>>> test_bpf.ko doesn't call verifier before selecting interpreter or
>>>>> JITing,
>>>>> hence the tests need to manually specify the amount of stack they
>>>>> consume.
>>>>>
>>>>> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
>>>>> Acked-by: Daniel Borkmann <daniel@iogearbox.net>
>>>>
>>>> I do not like this and the previous patch, it seems so error prone.
>>>
>>> in what sense 'error prone' ?
>>
>> In the sense that a human computes these numbers, and nothing checks
>> if it is correct or not until program perhaps crashes if the value is
>> wrong.
>
> right. that's how all these tests are.
> See bpf_fill_ld_abs_vlan_push_pop() for example.
> If that codegen has a bug, it will crash the kernel.
> That's why it's done from kernel module to do things
> that user space cannot do.
btw, when added a bunch of these '.stack_depth = 40'
I was thinking to randomize these values in [40, 512]
range to stress test interpreter and JITs more,
but then decided not to do that to avoid questions
why these numbers don't match the instructions.
Now I'm thinking we should actually do it for two reasons:
- to stress test stuff
- and to demonstrate more clearly that test_bpf.ko can
really do things that user space cannot and that's the
purpose of this .ko
Thoughts?
^ permalink raw reply
* Re: loosing netdevices with namespaces and unshare?
From: Cong Wang @ 2017-05-31 22:40 UTC (permalink / raw)
To: Harald Welte; +Cc: Linux Kernel Network Developers
In-Reply-To: <20170531181108.3kv5xqszwv5ub7cy@nataraja>
On Wed, May 31, 2017 at 11:11 AM, Harald Welte <laforge@gnumonks.org> wrote:
> I mean, what is the *use case* for loosing any refrence to a physical
> network device and unregistering it from the stack? Is there any API by
> which a new netdevice structure can be instantiated on the actual
> hardware? Registering the netdev is what the driver does during
> discovering the system hardware. If there's a method to "automagically"
> loose devices, at the very least I wold expect some reasonable method to
> resurrect them. Unloading the kernel module and reloading it is for
> sure not elegant, particularly not if you have multiple Ethernet
> devices/ports sharing the same driver.
>
> One could e.g. also think of something like a special namespace that
> collects all the "orphan" netdevices. Something analogous to the old
> Unix tradition of "pid 1" collecting all the orphan tasks whose parents
> died. Transferring them into that "netdev orphanage" could
> automatically set the link down so that no accidential
> routing/forwarding of traffic between the devices is possible.
Understand.
But you have other choices than using the physical interface
directly in non-root ns, for example, creating a virtual pair and
connect it with the physical one with a bridge. There are various
ways to achieve this.
^ permalink raw reply
* Re: [PATCH V3] neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d"
From: Sowmini Varadhan @ 2017-05-31 22:07 UTC (permalink / raw)
To: Julian Anastasov; +Cc: netdev, davem, stephen
In-Reply-To: <alpine.LFD.2.20.1705312337280.5775@ja.home.ssi.bg>
On (06/01/17 00:41), Julian Anastasov wrote:
>
> So, we do not hold reference to neigh while accessing
> its fields. I suspect we need to move the table lock from
> neigh_remove_one here, for example:
Another thought is to have neigh_remove_one to remove
a neigh only if it is NUD_FAILED - that may potentially remove
more than one entry, but that's probably harmless?
--Sowmini
^ permalink raw reply
* Re: [PATCH net-next 0/9] nfp: move BPF offload code into app
From: David Miller @ 2017-05-31 21:58 UTC (permalink / raw)
To: jakub.kicinski; +Cc: netdev, oss-drivers
In-Reply-To: <20170531150651.16873-1-jakub.kicinski@netronome.com>
From: Jakub Kicinski <jakub.kicinski@netronome.com>
Date: Wed, 31 May 2017 08:06:42 -0700
> This series moves the eBPF offload code out of netdev/vNIC handling and
> starts building the nfp_app. Port init is moved into the apps as well
> because various apps associate vNICs, representors with ports differently.
>
> First patch adds a helper for updating tc stats which has been waiting
> in my tree to be included in any moderately related series.
>
> Next series will bring communicating with FW using control messages,
> then representors, BPF maps, tc flower... :)
Looks good, series applied.
^ permalink raw reply
* Re: [net-next 00/15][pull request] 10GbE Intel Wired LAN Driver Updates 2017-05-31
From: David Miller @ 2017-05-31 21:55 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene
In-Reply-To: <20170531211936.63417-1-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 31 May 2017 14:19:21 -0700
> This series contains updates to ixgbe and ixgbevf only.
Pulled, thanks Jeff.
^ permalink raw reply
* Re: [net-next 0/9][pull request] 40GbE Intel Wired LAN Driver Updates 2017-05-31
From: David Miller @ 2017-05-31 21:51 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, nhorman, sassmann, jogreene
In-Reply-To: <20170531104856.47929-1-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 31 May 2017 03:48:47 -0700
> This series contains updates to i40e and i40evf only.
>
> Jesse provides a couple of fixes, starting with cleaning up duplicate
> lines of code. Fixed a missing line which enables RSS as a negotiated
> feature. Since the VF does not have any way of reporting FCoE enabled,
> so just force the code to always report FCoE as disabled.
>
> Jake provides several fixes and changes, starting with fixing a race
> condition in i40e. The hardware has a limitation on transmit PTP packets,
> which requires us to limit the driver to timestamping a single packet at
> once. This is done using a state bitlock which enforces that only one
> timestamp request is honored at a time, unfortunately this suffers from
> a race condition. Fixed a corner case where we failed to cleanup the
> bit lock after a failed transmit, and resulted in a state bit being
> locked forever. Added a new statistic which tracks when a transmit
> timestamp request is skipped/ignored, since the driver can only handle
> one transmit timestamp request at a time.
>
> Christophe Jaillet fixes a NULL pointer dereference if kzalloc fails.
Pulled, thanks Jeff.
^ permalink raw reply
* Re: [PATCH v2 1/2] ARM: dts: imx6ul-14x14-evk: Add ksz8081 phy properties
From: Florian Fainelli @ 2017-05-31 21:52 UTC (permalink / raw)
To: Leonard Crestez, David S. Miller, Andrew Lunn, Shawn Guo
Cc: Andy Duan, Johan Hovold, Alexandre Belloni, Philipp Zabel,
Fabio Estevam, netdev, linux-arm-kernel, linux-kernel
In-Reply-To: <1adf8f0d44afec4d11dec7f09d54d37d58cda5ff.1496224930.git.leonard.crestez@nxp.com>
On 05/31/2017 03:29 AM, Leonard Crestez wrote:
> Right now mach-imx6ul registers a fixup for the ksz8081 phy. The same
> register values can be set through the micrel phy driver by using dts
> properties.
>
> This seems preferable and allows cleanly fixing suspend/resume.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply
* Re: [PATCH v2 net 2/2] net: phy: micrel: Restore led_mode and clk_sel on resume
From: Florian Fainelli @ 2017-05-31 21:52 UTC (permalink / raw)
To: Leonard Crestez, David S. Miller, Andrew Lunn, Shawn Guo
Cc: Andy Duan, Johan Hovold, Alexandre Belloni, Philipp Zabel,
Fabio Estevam, netdev, linux-arm-kernel, linux-kernel
In-Reply-To: <1460beebce4ba23722cfb185b0f9f884cca3b9e9.1496224930.git.leonard.crestez@nxp.com>
On 05/31/2017 03:29 AM, Leonard Crestez wrote:
> These bits seem to be lost after a suspend/resume cycle so just set them
> again. Do this by splitting the handling of these bits into a function
> that is also called on resume.
>
> This patch fixes ethernet suspend/resume on imx6ul-14x14-evk boards.
>
> Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply
* Re: [PATCH net-next v2 4/8] net: ipv4: Convert inet_rtm_getroute to rcu versions of route lookup
From: David Ahern @ 2017-05-31 21:48 UTC (permalink / raw)
To: John Fastabend, Roopa Prabhu, davem, rami.rosen; +Cc: netdev, nikolay
In-Reply-To: <592F2373.7070909@gmail.com>
On 5/31/17 2:11 PM, John Fastabend wrote:
>> @@ -2721,14 +2724,14 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
>> skb->protocol = htons(ETH_P_IP);
>> skb->dev = dev;
>> skb->mark = mark;
>> - err = ip_route_input(skb, dst, src, rtm->rtm_tos, dev);
>> + err = ip_route_input_rcu(skb, dst, src, rtm->rtm_tos,
>> + dev, &res);
>>
>> rt = skb_rtable(skb);
>> if (err == 0 && rt->dst.error)
>> err = -rt->dst.error;
>> } else {
>> - rt = ip_route_output_key(net, &fl4);
>> -
>> + rt = ip_route_output_key_hash_rcu(net, &fl4, &res, skb);
>> err = 0;
>> if (IS_ERR(rt))
>> err = PTR_ERR(rt);
>> @@ -2737,7 +2740,6 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
>> if (err)
>> goto errout_free;
>>
>> - skb_dst_set(skb, &rt->dst);
>
>
> Why did you remove this? Neither ip_route_input() or ip_route_output_key()
> seem to justify this with a quick scan on my side. Feel free to correct me
> here.
>
original patch was done in January. I forget why I took it out. It is
clearly needed to release the dst. Might as well undo the argument
change to rt_fill_info since it is attached to the skb. Something like
this (whitespace damaged on paste - stupid Mac):
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index f1f2e5aaa2d6..93cca12a8319 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2547,8 +2547,9 @@ EXPORT_SYMBOL_GPL(ip_route_output_flow);
/* called with rcu_read_lock held */
static int rt_fill_info(struct net *net, __be32 dst, __be32 src, u32
table_id,
struct flowi4 *fl4, struct sk_buff *skb, u32 portid,
- u32 seq, struct rtable *rt)
+ u32 seq)
{
+ struct rtable *rt = skb_rtable(skb);
struct rtmsg *r;
struct nlmsghdr *nlh;
unsigned long expires = 0;
@@ -2750,6 +2751,8 @@ static int inet_rtm_getroute(struct sk_buff
*in_skb, struct nlmsghdr *nlh,
if (err)
goto errout_free;
+ skb_dst_set(skb, &rt->dst);
+
if (rtm->rtm_flags & RTM_F_NOTIFY)
rt->rt_flags |= RTCF_NOTIFY;
@@ -2763,8 +2766,7 @@ static int inet_rtm_getroute(struct sk_buff
*in_skb, struct nlmsghdr *nlh,
fl4.flowi4_tos, res.fi, 0);
else
err = rt_fill_info(net, dst, src, table_id, &fl4, skb,
- NETLINK_CB(in_skb).portid,
nlh->nlmsg_seq,
- rt);
+ NETLINK_CB(in_skb).portid,
nlh->nlmsg_seq);
if (err < 0)
goto errout_free;
Seems to work for me.
^ permalink raw reply related
* Re: [PATCH V3] neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d"
From: Sowmini Varadhan @ 2017-05-31 21:46 UTC (permalink / raw)
To: Julian Anastasov; +Cc: netdev, davem, stephen
In-Reply-To: <alpine.LFD.2.20.1705312337280.5775@ja.home.ssi.bg>
On (06/01/17 00:41), Julian Anastasov wrote:
>
> So, we do not hold reference to neigh while accessing
> its fields. I suspect we need to move the table lock from
> neigh_remove_one here, for example:
good point, let me think over your suggestion carefully (it sounds
right, I want to make sure I dont miss any other race-windows)
and post patch v4 tomorrow..
> Another solution to cause faster removal would be
> to cancel the gc_work and to schedule it after 1 jiffie.
> It helps when many entries are deleted at once but the
> work prefers to just sleep when gc_thresh1 is not reached,
> so such solution is not good enough.
Right the other drawback of relying on gc for cleanup is
that it doesn't give higher preference to cleaning up FAILED
entries first- so it can end up cleaning up other useful entries
(as I was pointing out to David Ahern)
--Sowmini
^ permalink raw reply
* Re: [i40e] regression on TCP stream and TCP maerts, kernel-4.12.0-0.rc2
From: Alexander Duyck @ 2017-05-31 21:42 UTC (permalink / raw)
To: Adrian Tomasov
Cc: Adam Okuliar, Mitch Williams, intel-wired-lan, Netdev,
Jeff Kirsher, Otto Sabart, Jirka Hladky
In-Reply-To: <1496238507.22688.4.camel@redhat.com>
On Wed, May 31, 2017 at 6:48 AM, Adrian Tomasov <atomasov@redhat.com> wrote:
> On Tue, 2017-05-30 at 18:27 -0700, Alexander Duyck wrote:
>> On Tue, May 30, 2017 at 8:41 AM, Alexander Duyck
>> <alexander.duyck@gmail.com> wrote:
>> >
>> > On Tue, May 30, 2017 at 6:43 AM, Adam Okuliar <aokuliar@redhat.com>
>> > wrote:
>> > >
>> > > Hello,
>> > >
>> > > we found regression on intel card(XL710) with i40e driver.
>> > > Regression is
>> > > about ~45%
>> > > on TCP_STREAM and TCP_MAERTS test for IPv4 and IPv6. Regression
>> > > was first
>> > > visible in kernel-4.12.0-0.rc1.
>> > >
>> > > More details about results you can see in uploaded images in
>> > > bugzilla. [0]
>> > >
>> > >
>> > > [0] https://bugzilla.kernel.org/show_bug.cgi?id=195923
>> > >
>> > >
>> > > Best regards, / S pozdravom,
>> > >
>> > > Adrián Tomašov
>> > > Kernel Performance QE
>> > > atomasov@redhat.com
>> >
>> > I have added the i40e driver maintainer and the intel-wired-lan
>> > mailing list so that we can make are developers aware of the issue.
>> >
>> > Thanks.
>> >
>> > - Alex
>>
>> Adam,
>>
>> We are having some issues trying to reproduce what you reported.
>>
>> Can you provide some additional data. Specifically we would be
>> looking
>> for an "ethtool -i", and an "ethtool -S" for the port before and
>> after
>> the test. If you can attach it to the bugzilla that would be
>> appreciated.
>>
>> Thanks.
>>
>> - Alex
>
> Hello Alex,
>
> requested files are updated in bugzilla.
>
> If you have any questions about testing feel free to ask.
>
>
> Best regards,
>
> Adrian
So looking at the data I wonder if we don't have an MTU mismatch in
the network config. I notice the "after" has rx_length_errors being
reported. Recent changes made it so that i40e doesn't support jumbo
frames by default, whereas before we could. You might want to check
for that as that could cause the kind of performance issues you are
seeing.
- Alex
^ permalink raw reply
* Re: [PATCH V3] neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d"
From: Julian Anastasov @ 2017-05-31 21:41 UTC (permalink / raw)
To: Sowmini Varadhan; +Cc: netdev, davem, stephen
In-Reply-To: <1496188346-83229-1-git-send-email-sowmini.varadhan@oracle.com>
Hello,
On Tue, 30 May 2017, Sowmini Varadhan wrote:
> @@ -1650,6 +1689,7 @@ static int neigh_delete(struct sk_buff *skb, struct nlmsghdr *nlh,
> NEIGH_UPDATE_F_ADMIN,
> NETLINK_CB(skb).portid);
> neigh_release(neigh);
> + neigh_remove_one(neigh, tbl);
So, we do not hold reference to neigh while accessing
its fields. I suspect we need to move the table lock from
neigh_remove_one here, for example:
+ write_lock_bh(&tbl->lock);
neigh_release(neigh);
+ neigh_remove_one(neigh, tbl);
+ write_unlock_bh(&tbl->lock);
Otherwise, neigh_forced_gc can call neigh_destroy
where neigh is freed (and replaced by another neigh entry) after
RCU grace period (which can end prematurely if there are no
running RCU read-side critical sections) and I'm not sure if
our thread can be delayed, so that such pointer replacement
can happen unnoticed by us.
Another solution to cause faster removal would be
to cancel the gc_work and to schedule it after 1 jiffie.
It helps when many entries are deleted at once but the
work prefers to just sleep when gc_thresh1 is not reached,
so such solution is not good enough.
Regards
^ permalink raw reply
* Re: [PATCH v4 2/2] dt-bindings: net: Add Cortina device tree bindings
From: Rob Herring @ 2017-05-31 21:27 UTC (permalink / raw)
To: Bogdan Purcareata
Cc: andrew-g2DYL2Zd6BY, f.fainelli-Re5JQEeQqe8AvxtiuMwx3w,
netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1496049091-4637-3-git-send-email-bogdan.purcareata-3arQi8VN3Tc@public.gmane.org>
On Mon, May 29, 2017 at 09:11:31AM +0000, Bogdan Purcareata wrote:
> Add device tree description info for Cortina 10G phy devices.
>
> Signed-off-by: Bogdan Purcareata <bogdan.purcareata-3arQi8VN3Tc@public.gmane.org>
> ---
> v3 -> v4:
> - Consistency nit between phy label and reg value.
> - Add CORTINNA trademark info.
>
> Patch introduced in v3 of the patchset.
>
> Documentation/devicetree/bindings/net/cortina.txt | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/cortina.txt
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [net-next 15/15] ixgbe: fix incorrect status check
From: Jeff Kirsher @ 2017-05-31 21:19 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
In-Reply-To: <20170531211936.63417-1-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
Check for ret_val instead of !ret_val to allow the rest of
the code to execute and configure the speed properly.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index 80824fec15d2..72d84a065e34 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1750,14 +1750,14 @@ ixgbe_setup_mac_link_sfp_n(struct ixgbe_hw *hw, ixgbe_link_speed speed,
if (ret_val == IXGBE_ERR_SFP_NOT_PRESENT)
return 0;
- if (!ret_val)
+ if (ret_val)
return ret_val;
/* Configure internal PHY for native SFI based on module type */
ret_val = hw->mac.ops.read_iosf_sb_reg(hw,
IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id),
IXGBE_SB_IOSF_TARGET_KR_PHY, ®_phy_int);
- if (!ret_val)
+ if (ret_val)
return ret_val;
reg_phy_int &= IXGBE_KRM_PMD_FLX_MASK_ST20_SFI_10G_DA;
@@ -1767,7 +1767,7 @@ ixgbe_setup_mac_link_sfp_n(struct ixgbe_hw *hw, ixgbe_link_speed speed,
ret_val = hw->mac.ops.write_iosf_sb_reg(hw,
IXGBE_KRM_PMD_FLX_MASK_ST20(hw->bus.lan_id),
IXGBE_SB_IOSF_TARGET_KR_PHY, reg_phy_int);
- if (!ret_val)
+ if (ret_val)
return ret_val;
/* Setup SFI internal link. */
@@ -1798,7 +1798,7 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
if (ret_val == IXGBE_ERR_SFP_NOT_PRESENT)
return 0;
- if (!ret_val)
+ if (ret_val)
return ret_val;
/* Configure internal PHY for KR/KX. */
--
2.12.2
^ permalink raw reply related
* [net-next 08/15] ixgbe: Resolve warnings for -Wimplicit-fallthrough
From: Jeff Kirsher @ 2017-05-31 21:19 UTC (permalink / raw)
To: davem; +Cc: Tony Nguyen, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
In-Reply-To: <20170531211936.63417-1-jeffrey.t.kirsher@intel.com>
From: Tony Nguyen <anthony.l.nguyen@intel.com>
This patch adds/changes fall through comments to address new warnings
produced by gcc 7.
Fixed formatting on a couple of comments in the function.
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c | 9 ++++++---
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 4 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 ++++++--
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 7 +++----
5 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
index c8ac46049f34..d602637ccc40 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82599.c
@@ -1589,15 +1589,17 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
switch (ntohs(input_mask->formatted.vlan_id) & 0xEFFF) {
case 0x0000:
- /* mask VLAN ID, fall through to mask VLAN priority */
+ /* mask VLAN ID */
fdirm |= IXGBE_FDIRM_VLANID;
+ /* fall through */
case 0x0FFF:
/* mask VLAN priority */
fdirm |= IXGBE_FDIRM_VLANP;
break;
case 0xE000:
- /* mask VLAN ID only, fall through */
+ /* mask VLAN ID only */
fdirm |= IXGBE_FDIRM_VLANID;
+ /* fall through */
case 0xEFFF:
/* no VLAN fields masked */
break;
@@ -1608,8 +1610,9 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,
switch (input_mask->formatted.flex_bytes & 0xFFFF) {
case 0x0000:
- /* Mask Flex Bytes, fall through */
+ /* Mask Flex Bytes */
fdirm |= IXGBE_FDIRM_FLEX;
+ /* fall through */
case 0xFFFF:
break;
default:
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 3af6127f0d44..76ad0e0bd542 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -155,7 +155,7 @@ s32 ixgbe_setup_fc_generic(struct ixgbe_hw *hw)
if (ret_val)
return ret_val;
- /* only backplane uses autoc so fall though */
+ /* fall through - only backplane uses autoc */
case ixgbe_media_type_fiber:
reg = IXGBE_READ_REG(hw, IXGBE_PCS1GANA);
@@ -3549,7 +3549,7 @@ void ixgbe_set_rxpba_generic(struct ixgbe_hw *hw,
rxpktsize <<= IXGBE_RXPBSIZE_SHIFT;
for (; i < (num_pb / 2); i++)
IXGBE_WRITE_REG(hw, IXGBE_RXPBSIZE(i), rxpktsize);
- /* Fall through to configure remaining packet buffers */
+ /* fall through - configure remaining packet buffers */
case (PBA_STRATEGY_EQUAL):
/* Divide the remaining Rx packet buffer evenly among the TCs */
rxpktsize = (pbsize / (num_pb - i)) << IXGBE_RXPBSIZE_SHIFT;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index cced74dd5a63..9113e8099b03 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -2668,6 +2668,7 @@ static int ixgbe_flowspec_to_flow_type(struct ethtool_rx_flow_spec *fsp,
*flow_type = IXGBE_ATR_FLOW_TYPE_IPV4;
break;
}
+ /* fall through */
default:
return 0;
}
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 0d2c54693cf3..54463f03b3db 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1452,7 +1452,7 @@ static int __ixgbe_notify_dca(struct device *dev, void *data)
IXGBE_DCA_CTRL_DCA_MODE_CB2);
break;
}
- /* Fall Through since DCA is disabled. */
+ /* fall through - DCA is disabled. */
case DCA_PROVIDER_REMOVE:
if (adapter->flags & IXGBE_FLAG_DCA_ENABLED) {
dca_remove_requester(dev);
@@ -2233,6 +2233,7 @@ static struct sk_buff *ixgbe_run_xdp(struct ixgbe_adapter *adapter,
break;
default:
bpf_warn_invalid_xdp_action(act);
+ /* fallthrough */
case XDP_ABORTED:
trace_xdp_exception(rx_ring->netdev, xdp_prog, act);
/* fallthrough -- handle aborts by dropping packet */
@@ -4177,7 +4178,7 @@ static void ixgbe_setup_rdrxctl(struct ixgbe_adapter *adapter)
case ixgbe_mac_x550em_a:
if (adapter->num_vfs)
rdrxctl |= IXGBE_RDRXCTL_PSP;
- /* fall through for older HW */
+ /* fall through */
case ixgbe_mac_82599EB:
case ixgbe_mac_X540:
/* Disable RSC for ACK packets */
@@ -6885,6 +6886,7 @@ void ixgbe_update_stats(struct ixgbe_adapter *adapter)
hwstats->o2bspc += IXGBE_READ_REG(hw, IXGBE_O2BSPC);
hwstats->b2ospc += IXGBE_READ_REG(hw, IXGBE_B2OSPC);
hwstats->b2ogprc += IXGBE_READ_REG(hw, IXGBE_B2OGPRC);
+ /* fall through */
case ixgbe_mac_82599EB:
for (i = 0; i < 16; i++)
adapter->hw_rx_no_dma_resources +=
@@ -8207,6 +8209,7 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,
if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
break;
+ /* fall through */
default:
return fallback(dev, skb);
}
@@ -9931,6 +9934,7 @@ bool ixgbe_wol_supported(struct ixgbe_adapter *adapter, u16 device_id,
/* only support first port */
if (hw->bus.func != 0)
break;
+ /* fall through */
case IXGBE_SUBDEV_ID_82599_SP_560FLR:
case IXGBE_SUBDEV_ID_82599_SFP:
case IXGBE_SUBDEV_ID_82599_RNDC:
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 13c96a13841e..e2766da5fe02 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -540,16 +540,15 @@ static s32 ixgbe_set_vf_lpe(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
case ixgbe_mbox_api_11:
case ixgbe_mbox_api_12:
case ixgbe_mbox_api_13:
- /*
- * Version 1.1 supports jumbo frames on VFs if PF has
+ /* Version 1.1 supports jumbo frames on VFs if PF has
* jumbo frames enabled which means legacy VFs are
* disabled
*/
if (pf_max_frame > ETH_FRAME_LEN)
break;
+ /* fall through */
default:
- /*
- * If the PF or VF are running w/ jumbo frames enabled
+ /* If the PF or VF are running w/ jumbo frames enabled
* we need to shut down the VF Rx path as we cannot
* support jumbo frames on legacy VFs
*/
--
2.12.2
^ permalink raw reply related
* [net-next 14/15] ixgbe: add missing configuration for rate select 1
From: Jeff Kirsher @ 2017-05-31 21:19 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
In-Reply-To: <20170531211936.63417-1-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
Add RS1 configuration to ixgbe_set_soft_rate_select_speed()
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 7af85f505bad..4e35e7017f3d 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -4278,4 +4278,23 @@ void ixgbe_set_soft_rate_select_speed(struct ixgbe_hw *hw,
hw_dbg(hw, "Failed to write Rx Rate Select RS0\n");
return;
}
+
+ /* Set RS1 */
+ status = hw->phy.ops.read_i2c_byte(hw, IXGBE_SFF_SFF_8472_ESCB,
+ IXGBE_I2C_EEPROM_DEV_ADDR2,
+ &eeprom_data);
+ if (status) {
+ hw_dbg(hw, "Failed to read Rx Rate Select RS1\n");
+ return;
+ }
+
+ eeprom_data = (eeprom_data & ~IXGBE_SFF_SOFT_RS_SELECT_MASK) | rs;
+
+ status = hw->phy.ops.write_i2c_byte(hw, IXGBE_SFF_SFF_8472_ESCB,
+ IXGBE_I2C_EEPROM_DEV_ADDR2,
+ eeprom_data);
+ if (status) {
+ hw_dbg(hw, "Failed to write Rx Rate Select RS1\n");
+ return;
+ }
}
--
2.12.2
^ permalink raw reply related
* [net-next 13/15] ixgbe: always call setup_mac_link for multispeed fiber
From: Jeff Kirsher @ 2017-05-31 21:19 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
In-Reply-To: <20170531211936.63417-1-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
Remove the logic which would previously skip the link configuration
in the case where we are already at the requested speed in
ixgbe_setup_mac_link_multispeed_fiber().
By exiting early we are skipping the link configuration and as such
the driver may not always configure the PHY correctly for SFP+.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
index 76ad0e0bd542..7af85f505bad 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c
@@ -4121,15 +4121,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
speedcnt++;
highest_link_speed = IXGBE_LINK_SPEED_10GB_FULL;
- /* If we already have link at this speed, just jump out */
- status = hw->mac.ops.check_link(hw, &link_speed, &link_up,
- false);
- if (status)
- return status;
-
- if (link_speed == IXGBE_LINK_SPEED_10GB_FULL && link_up)
- goto out;
-
/* Set the module link speed */
switch (hw->phy.media_type) {
case ixgbe_media_type_fiber:
@@ -4181,15 +4172,6 @@ s32 ixgbe_setup_mac_link_multispeed_fiber(struct ixgbe_hw *hw,
if (highest_link_speed == IXGBE_LINK_SPEED_UNKNOWN)
highest_link_speed = IXGBE_LINK_SPEED_1GB_FULL;
- /* If we already have link at this speed, just jump out */
- status = hw->mac.ops.check_link(hw, &link_speed, &link_up,
- false);
- if (status)
- return status;
-
- if (link_speed == IXGBE_LINK_SPEED_1GB_FULL && link_up)
- goto out;
-
/* Set the module link speed */
switch (hw->phy.media_type) {
case ixgbe_media_type_fiber:
--
2.12.2
^ permalink raw reply related
* [net-next 12/15] ixgbe: add write flush when configuring CS4223/7
From: Jeff Kirsher @ 2017-05-31 21:19 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
In-Reply-To: <20170531211936.63417-1-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
Make sure the writes are processed immediately. Without the flush it
is possible for operations on one port to spill over the other as the
resource is shared.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index 32b35efde2df..80824fec15d2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1824,12 +1824,28 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
/* Configure CS4227/CS4223 LINE side to proper mode. */
reg_slice = IXGBE_CS4227_LINE_SPARE24_LSB + slice_offset;
+
+ ret_val = hw->phy.ops.read_reg(hw, reg_slice,
+ IXGBE_MDIO_ZERO_DEV_TYPE, ®_phy_ext);
+ if (ret_val)
+ return ret_val;
+
+ reg_phy_ext &= ~((IXGBE_CS4227_EDC_MODE_CX1 << 1) |
+ (IXGBE_CS4227_EDC_MODE_SR << 1));
+
if (setup_linear)
reg_phy_ext = (IXGBE_CS4227_EDC_MODE_CX1 << 1) | 1;
else
reg_phy_ext = (IXGBE_CS4227_EDC_MODE_SR << 1) | 1;
- return hw->phy.ops.write_reg(hw, reg_slice, IXGBE_MDIO_ZERO_DEV_TYPE,
- reg_phy_ext);
+
+ ret_val = hw->phy.ops.write_reg(hw, reg_slice,
+ IXGBE_MDIO_ZERO_DEV_TYPE, reg_phy_ext);
+ if (ret_val)
+ return ret_val;
+
+ /* Flush previous write with a read */
+ return hw->phy.ops.read_reg(hw, reg_slice,
+ IXGBE_MDIO_ZERO_DEV_TYPE, ®_phy_ext);
}
/**
--
2.12.2
^ permalink raw reply related
* [net-next 11/15] ixgbe: correct CS4223/7 PHY identification
From: Jeff Kirsher @ 2017-05-31 21:19 UTC (permalink / raw)
To: davem; +Cc: Emil Tantilov, netdev, nhorman, sassmann, jogreene, Jeff Kirsher
In-Reply-To: <20170531211936.63417-1-jeffrey.t.kirsher@intel.com>
From: Emil Tantilov <emil.s.tantilov@intel.com>
Previous method was unreliable. Use a different register to
differentiate between the SKUs.
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 5 +++--
drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c | 8 ++++----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
index 5aa2c3cf7aec..b0cac961df3b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h
@@ -84,8 +84,9 @@
#define IXGBE_CS4227_GLOBAL_ID_LSB 0
#define IXGBE_CS4227_GLOBAL_ID_MSB 1
#define IXGBE_CS4227_SCRATCH 2
-#define IXGBE_CS4223_PHY_ID 0x7003 /* Quad port */
-#define IXGBE_CS4227_PHY_ID 0x3003 /* Dual port */
+#define IXGBE_CS4227_EFUSE_PDF_SKU 0x19F
+#define IXGBE_CS4223_SKU_ID 0x0010 /* Quad port */
+#define IXGBE_CS4227_SKU_ID 0x0014 /* Dual port */
#define IXGBE_CS4227_RESET_PENDING 0x1357
#define IXGBE_CS4227_RESET_COMPLETE 0x5AA5
#define IXGBE_CS4227_RETRIES 15
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
index 50aaa2bd3c81..32b35efde2df 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c
@@ -1807,16 +1807,16 @@ ixgbe_setup_mac_link_sfp_x550a(struct ixgbe_hw *hw, ixgbe_link_speed speed,
if (hw->phy.mdio.prtad == MDIO_PRTAD_NONE)
return IXGBE_ERR_PHY_ADDR_INVALID;
- /* Get external PHY device id */
- ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_GLOBAL_ID_MSB,
- IXGBE_MDIO_ZERO_DEV_TYPE, ®_phy_ext);
+ /* Get external PHY SKU id */
+ ret_val = hw->phy.ops.read_reg(hw, IXGBE_CS4227_EFUSE_PDF_SKU,
+ IXGBE_MDIO_ZERO_DEV_TYPE, ®_phy_ext);
if (ret_val)
return ret_val;
/* When configuring quad port CS4223, the MAC instance is part
* of the slice offset.
*/
- if (reg_phy_ext == IXGBE_CS4223_PHY_ID)
+ if (reg_phy_ext == IXGBE_CS4223_SKU_ID)
slice_offset = (hw->bus.lan_id +
(hw->bus.instance_id << 1)) << 12;
else
--
2.12.2
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox