* Re: [PATCH] net: ethernet: chelsio: cxgb3: mc5.c: Remove some unused functions
From: David Miller @ 2015-01-02 21:39 UTC (permalink / raw)
To: rickard_strandqvist; +Cc: santosh, netdev, linux-kernel
In-Reply-To: <1420130996-29910-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
From: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Date: Thu, 1 Jan 2015 17:49:55 +0100
> Removes some functions that are not used anywhere:
> dbgi_rd_rsp3() dbgi_wr_addr3()
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Applied.
^ permalink raw reply
* Re: [PATCH] net: ethernet: micrel: ksz884x.c: Remove some unused functions
From: David Miller @ 2015-01-02 21:35 UTC (permalink / raw)
To: rickard_strandqvist
Cc: akpm, w-lkml, ebiederm, benoit.taine, Julia.Lawall,
manuel.schoelling, joe, netdev, linux-kernel
In-Reply-To: <1420131623-30749-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
From: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Date: Thu, 1 Jan 2015 18:00:23 +0100
> Removes some functions that are not used anywhere:
> hw_w_phy_link_md() hw_r_phy_link_md() hw_w_phy_polarity()
> hw_r_phy_polarity() hw_w_phy_crossover() hw_r_phy_crossover()
> hw_r_phy_rem_cap() hw_w_phy_auto_neg() hw_r_phy_auto_neg()
> hw_r_phy_link_stat() sw_get_addr() port_chk_prio() port_chk_replace_vid()
> port_chk_802_1p() port_chk_diffserv() sw_chk_unk_def_port()
> sw_cfg_unk_def_port() sw_cfg_chk_unk_def_deliver() sw_cfg_unk_def_deliver()
> port_chk_in_filter() port_chk_dis_non_vid() port_cfg_in_filter()
> port_cfg_dis_non_vid() port_chk_rmv_tag() port_chk_ins_tag()
> port_cfg_rmv_tag() port_cfg_ins_tag() sw_flush_dyn_mac_table() port_cfg_tx()
> port_cfg_rx() port_chk_force_flow_ctrl() port_chk_back_pressure()
> port_cfg_force_flow_ctrl() port_chk_broad_storm() hw_ena_intr_bit()
>
> This was partially found by using a static code analysis program called cppcheck.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
This causes a cascade of new warnings because now functions like
phy_chk() are unused in some configurations.
I'm really not thrilled to even review change from you of this nature
if you aren't going to be careful about attending to details like
that.
Just blindly removing functions and not looking at the context or
other potential side effects is not really acceptable.
^ permalink raw reply
* Re: [PATCH] net: wireless: b43legacy: radio.c: Remove unused function
From: Rafał Miłecki @ 2015-01-02 21:34 UTC (permalink / raw)
To: Rickard Strandqvist
Cc: Sedat Dilek, Larry Finger, Stefano Brivio, Network Development,
linux-wireless@vger.kernel.org, Linux Kernel Mailing List,
b43-dev
In-Reply-To: <CAKXHbyO70WdWekSYCY9spMbX2+_kdKTp3JoreDKpCdUBzFwYqw@mail.gmail.com>
On 2 January 2015 at 18:46, Rickard Strandqvist
<rickard_strandqvist@spectrumdigital.se> wrote:
> 2015-01-02 13:14 GMT+01:00 Sedat Dilek <sedat.dilek@gmail.com>:
>>
>> On Fri, Jan 2, 2015 at 1:06 PM, Rafał Miłecki <zajec5@gmail.com> wrote:
>> > On 2 January 2015 at 13:05, Rafał Miłecki <zajec5@gmail.com> wrote:
>> >> On 1 January 2015 at 16:46, Rickard Strandqvist
>> >> <rickard_strandqvist@spectrumdigital.se> wrote:
>> >>> Remove the function b43legacy_radio_set_tx_iq() that is not used
>> >>> anywhere.
>> >>>
>> >>> This was partially found by using a static code analysis program
>> >>> called cppcheck.
>> >>
>> >> It seems to be for A-PHY based hardware (with 0x2060 radio id) which
>> >> is not handled by b43legacy. Should be safe to drop this code (we
>> >> won't likely need it).
>> >>
>> >> Ack
>> >
>> > For future, we prefix patches with just a driver name. So this could
>> > be simply called
>> > b43legacy: radio.c: Remove unused function
>> >
>>
>> Alternatively...
>>
>> "b43legacy: Remove unused function in radio.c"
>>
>> BTW, as Arnd Bergmann pointed out [1] how did you test with cppcheck
>> to get such stuff?
>>
>> - Sedat -
>>
>> [1] https://lkml.org/lkml/2015/1/2/51
>
>
>
> Hi Rafal and Sedat
>
> Rafal do you mean I should remove the entire b43legacy part?
1) I gave you Ack for the changes
2) You could drop "net: wireless: " or better use something Sedat proposed
--
Rafał
^ permalink raw reply
* Re: [PATCH v2][Nios2-dev] Altera TSE: Add missing phydev
From: David Miller @ 2015-01-02 21:26 UTC (permalink / raw)
To: bkostya; +Cc: nios2-dev, netdev
In-Reply-To: <SNT146-W703EA22E7BC894479746F0B65D0@phx.gbl>
From: Kostya Belezko <bkostya@hotmail.com>
Date: Fri, 2 Jan 2015 16:16:34 -0500
> Yes, this is what the patch intends to achieve. It keeps phydev
> non-NULL and calls phy_stop, shy_start respectively. phy_disconnect
> is called upon rmmod.
Aha, ok I see. Looks good to me.
^ permalink raw reply
* RE: [PATCH v2][Nios2-dev] Altera TSE: Add missing phydev
From: Kostya Belezko @ 2015-01-02 21:16 UTC (permalink / raw)
To: David Miller; +Cc: nios2-dev@lists.rocketboards.org, netdev@vger.kernel.org
In-Reply-To: <20150102.160703.2063675003050187496.davem@davemloft.net>
----------------------------------------
> Date: Fri, 2 Jan 2015 16:07:03 -0500
> To: bkostya@hotmail.com
> CC: nios2-dev@lists.rocketboards.org; netdev@vger.kernel.org
> Subject: Re: [PATCH v2][Nios2-dev] Altera TSE: Add missing phydev
> From: davem@davemloft.net
>
> From: Kostya Belezko <bkostya@hotmail.com>
> Date: Fri, 2 Jan 2015 15:57:29 -0500
>
>> What do you mean by phy_disconnect() is down?
>> Originally priv->phydev is NULL (and remains null forever) right after 'ifdown eth0'
>
> I'm saying that the code should probably keep phydev non-NULL and just
> take the PHY down/up during these events.
Yes, this is what the patch intends to achieve. It keeps phydev non-NULL and calls phy_stop, shy_start respectively.
phy_disconnect is called upon rmmod.
^ permalink raw reply
* Re: [net-next PATCH v1 08/11] net: rocker: add get flow API operation
From: John Fastabend @ 2015-01-02 21:15 UTC (permalink / raw)
To: Rami Rosen
Cc: simon.horman, Jamal Hadi Salim, Scott Feldman, David Miller,
Andy Gospodarek, Thomas Graf, Netdev, Jiří Pírko
In-Reply-To: <CAKoUArm4z_i6Su9Q4ODB1QYR_Z098MjT2yN=WR7LbN387AvPsg@mail.gmail.com>
On 01/02/2015 12:46 PM, Rami Rosen wrote:
> Nice work!
>
>
> בתאריך 31 בדצמ 2014
>
>
> > +static int rocker_get_flows(struct sk_buff *skb, struct net_device *dev,
> > + int table, int min, int max)
> > +{
> > + struct rocker_port *rocker_port = netdev_priv(dev);
> > + struct net_flow_flow flow;
> > + struct rocker_flow_tbl_entry *entry;
> > + struct rocker_group_tbl_entry *group;
> > + struct hlist_node *tmp;
> > + unsigned long flags;
> > + int bkt, err;
> > +
> > + spin_lock_irqsave(&rocker_port->rocker->flow_tbl_lock, flags);
> > + hash_for_each_safe(rocker_port->rocker->flow_tbl,
> > + bkt, tmp, entry, entry) {
> > + struct rocker_flow_tbl_key *key = &entry->key;
> > +
> > + if (rocker_goto_value(table) != key->tbl_id)
> > + continue;
> > +
> > + flow.table_id = table;
> > + flow.uid = entry->cookie;
> > + flow.priority = key->priority;
> > +
> > + switch (table) {
> > + case ROCKER_FLOW_TABLE_ID_INGRESS_PORT:
> > + err = rocker_ig_port_to_flow(key, &flow);
> > + if (err)
> > + return err;
> > + break;
> > + case ROCKER_FLOW_TABLE_ID_VLAN:
> > + err = rocker_vlan_to_flow(key, &flow);
> > + if (err)
> > + return err;
> > + break;
> > + case ROCKER_FLOW_TABLE_ID_TERMINATION_MAC:
> > + err = rocker_term_to_flow(key, &flow);
>
> Shouldn't it be here (and in the following 3 case entries) also:
>
Yes, thanks for catching this. I'll update it in v2. Along with the
other fixes for dev_put misses.
.John
--
John Fastabend Intel Corporation
^ permalink raw reply
* Re: [PATCH net] openvswitch: Consistently include VLAN header in flow and port stats.
From: David Miller @ 2015-01-02 21:14 UTC (permalink / raw)
To: blp; +Cc: netdev, dev, pshelar, mshindo
In-Reply-To: <1420044346-27957-1-git-send-email-blp@nicira.com>
From: Ben Pfaff <blp@nicira.com>
Date: Wed, 31 Dec 2014 08:45:46 -0800
> Until now, when VLAN acceleration was in use, the bytes of the VLAN header
> were not included in port or flow byte counters. They were however
> included when VLAN acceleration was not used. This commit corrects the
> inconsistency, by always including the VLAN header in byte counters.
>
> Previous discussion at
> http://openvswitch.org/pipermail/dev/2014-December/049521.html
>
> Reported-by: Motonori Shindo <mshindo@vmware.com>
> Signed-off-by: Ben Pfaff <blp@nicira.com>
Applied, thank you.
^ permalink raw reply
* Re: tcp: Do not apply TSO segment limit to non-TSO packets
From: David Miller @ 2015-01-02 21:13 UTC (permalink / raw)
To: herbert; +Cc: thomas.jarosch, netdev, edumazet, steffen.klassert, bhutchings
In-Reply-To: <20141231133923.GA30248@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 1 Jan 2015 00:39:23 +1100
> Thomas Jarosch reported IPsec TCP stalls when a PMTU event occurs.
>
> In fact the problem was completely unrelated to IPsec. The bug is
> also reproducible if you just disable TSO/GSO.
>
> The problem is that when the MSS goes down, existing queued packet
> on the TX queue that have not been transmitted yet all look like
> TSO packets and get treated as such.
>
> This then triggers a bug where tcp_mss_split_point tells us to
> generate a zero-sized packet on the TX queue. Once that happens
> we're screwed because the zero-sized packet can never be removed
> by ACKs.
>
> Fixes: 1485348d242 ("tcp: Apply device TSO segment limit earlier")
> Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied and queued up for -stable, thanks Herbert.
^ permalink raw reply
* Re: [PATCH v2][Nios2-dev] Altera TSE: Add missing phydev
From: David Miller @ 2015-01-02 21:07 UTC (permalink / raw)
To: bkostya; +Cc: nios2-dev, netdev
In-Reply-To: <SNT146-W41ED8A3C5CE762B5F35C15B65D0@phx.gbl>
From: Kostya Belezko <bkostya@hotmail.com>
Date: Fri, 2 Jan 2015 15:57:29 -0500
> What do you mean by phy_disconnect() is down?
> Originally priv->phydev is NULL (and remains null forever) right after 'ifdown eth0'
I'm saying that the code should probably keep phydev non-NULL and just
take the PHY down/up during these events.
^ permalink raw reply
* Re: [PATCH net-next] net: skbuff: don't zero tc members when freeing skb
From: David Miller @ 2015-01-02 21:05 UTC (permalink / raw)
To: fw; +Cc: netdev
In-Reply-To: <1420029221-4296-1-git-send-email-fw@strlen.de>
From: Florian Westphal <fw@strlen.de>
Date: Wed, 31 Dec 2014 13:33:41 +0100
> Not needed, only four cases:
> - kfree_skb (or one of its aliases).
> Don't need to zero, memory will be freed.
> - kfree_skb_partial and head was stolen: memory will be freed.
> - skb_morph: The skb header fields (including tc ones) will be
> copied over from the 'to-be-morphed' skb right after
> skb_release_head_state returns.
> - skb_segment: Same as before, all the skb header
> fields are copied over from the original skb right away.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Agreed, applied, thanks Florian.
^ permalink raw reply
* Re: pull request: bluetooth-next 2014-12-31
From: David Miller @ 2015-01-02 21:04 UTC (permalink / raw)
To: johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
linux-bluetooth-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20141231072549.GA11458-ae+CCJ+dGXjCW7GOcxkI+ioyn5ZhHHrn@public.gmane.org>
From: Johan Hedberg <johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Wed, 31 Dec 2014 09:25:49 +0200
> Here's the first batch of bluetooth patches for 3.20.
>
> - Cleanups & fixes to ieee802154 drivers
> - Fix synchronization of mgmt commands with respective HCI commands
> - Add self-tests for LE pairing crypto functionality
> - Remove 'BlueFritz!' specific handling from core using a new quirk flag
> - Public address configuration support for ath3012
> - Refactor debugfs support into a dedicated file
> - Initial support for LE Data Length Extension feature from Bluetooth 4.2
>
> Please let me know if there are any issues pulling. Thanks.
Pulled, thanks Johan.
^ permalink raw reply
* RE: [PATCH v2][Nios2-dev] Altera TSE: Add missing phydev
From: Kostya Belezko @ 2015-01-02 20:57 UTC (permalink / raw)
To: David Miller; +Cc: nios2-dev@lists.rocketboards.org, netdev@vger.kernel.org
In-Reply-To: <20150102.154500.2104526152897268790.davem@davemloft.net>
----------------------------------------
> Date: Fri, 2 Jan 2015 15:45:00 -0500
> To: bkostya@hotmail.com
> CC: nios2-dev@lists.rocketboards.org; netdev@vger.kernel.org
> Subject: Re: [PATCH v2][Nios2-dev] Altera TSE: Add missing phydev
> From: davem@davemloft.net
>
> From: Kostya Belezko <bkostya@hotmail.com>
> Date: Tue, 30 Dec 2014 12:27:09 -0500
>
>> Altera network device doesn't come up after
>>
>> ifconfig eth0 down
>> ifconfig eth0 up
>>
>> The reason behind is clearing priv->phydev during tse_shutdown().
>> The phydev is not restored back at tse_open().
>>
>> Resubmiting as to follow Tobias Klauser suggestion.
>> phy_start/phy_stop are called on each ifup/ifdown and
>> phy_disconnect is called once during the module removal.
>>
>> Signed-off-by: Kostya Belezko <bkostya@hotmail.com>
>
> I'll apply this, but I'm pretty sure the phy_disconnect() is down
> so that the PHY is powered down when the device is not up.
Hi David,
What do you mean by phy_disconnect() is down?
Originally priv->phydev is NULL (and remains null forever) right after 'ifdown eth0'
^ permalink raw reply
* Re: [PATCH net-next] net: More vlan tests before registering netdevice
From: David Miller @ 2015-01-02 20:57 UTC (permalink / raw)
To: Yuval.Mintz; +Cc: netdev
In-Reply-To: <20150102.155621.2190810414905057279.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Fri, 02 Jan 2015 15:56:21 -0500 (EST)
> From: Yuval Mintz <Yuval.Mintz@qlogic.com>
> Date: Wed, 31 Dec 2014 08:35:36 +0200
>
>> When register_netdevice() is called, netdevice's vlan filtering feature
>> and supplied callbacks are checked to see the vlan implementation is
>> not buggy.
>> This adds an additional test - see that the vlan_features were filled
>> correctly, as the vlan devices inherits those as its own features;
>> Incorrect values set there would later prevent the vlan interface from being
>> registered itself [as it doesn't implement the filtering ndos].
>>
>> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
> ...
>> Not sure why take such a defensive approach regarding this feature.
>> Perhaps it would have been better to simply remove these checks altogether.
>
> I guess this is fine as a defensive test, so I'll apply this.
Actually, reverted.
Nothing makes me more angry than a patch that wasn't even build tested:
net/core/dev.c: In function ‘register_netdevice’:
net/core/dev.c:6285:57: error: expected ‘)’ before ‘{’ token
net/core/dev.c:6378:1: error: expected expression before ‘}’ token
net/core/dev.c:6277:4: error: label ‘out’ used but not defined
net/core/dev.c:6378:1: warning: control reaches end of non-void function [-Wreturn-type]
^ permalink raw reply
* Re: [PATCH net-next] net: More vlan tests before registering netdevice
From: David Miller @ 2015-01-02 20:56 UTC (permalink / raw)
To: Yuval.Mintz; +Cc: netdev
In-Reply-To: <1420007736-30822-1-git-send-email-Yuval.Mintz@qlogic.com>
From: Yuval Mintz <Yuval.Mintz@qlogic.com>
Date: Wed, 31 Dec 2014 08:35:36 +0200
> When register_netdevice() is called, netdevice's vlan filtering feature
> and supplied callbacks are checked to see the vlan implementation is
> not buggy.
> This adds an additional test - see that the vlan_features were filled
> correctly, as the vlan devices inherits those as its own features;
> Incorrect values set there would later prevent the vlan interface from being
> registered itself [as it doesn't implement the filtering ndos].
>
> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
...
> Not sure why take such a defensive approach regarding this feature.
> Perhaps it would have been better to simply remove these checks altogether.
I guess this is fine as a defensive test, so I'll apply this.
But do you actually know of any devices which have violated this rule
either now or in the past? I quickly tried to audit the entire tree
for this right now and found no problems.
^ permalink raw reply
* Re: [PATCH net-next 1/3] net: add IPv4 routing FIB support for swdev
From: roopa @ 2015-01-02 20:55 UTC (permalink / raw)
To: Scott Feldman
Cc: Netdev, Jiří Pírko, john fastabend, Thomas Graf,
Jamal Hadi Salim, Andy Gospodarek
In-Reply-To: <CAE4R7bBJa8LiDHw8PhL6ARfK5nOfUXg36tfnggwWs=tynBw6Jw@mail.gmail.com>
On 1/2/15, 12:00 AM, Scott Feldman wrote:
> On Thu, Jan 1, 2015 at 9:49 PM, roopa <roopa@cumulusnetworks.com> wrote:
>> On 1/1/15, 7:29 PM, sfeldma@gmail.com wrote:
>>> From: Scott Feldman <sfeldma@gmail.com>
>>>
>>> To offload IPv4 L3 routing functions to swdev device, the swdev device
>>> driver
>>> implements two new ndo ops (ndo_switch_fib_ipv4_add/del). The ops are
>>> called
>>> by the core IPv4 FIB code when installing/removing FIB entries to/from the
>>> kernel FIB. On install, the driver should return 0 if FIB entry (route)
>>> can be
>>> installed to device for offloading, -EOPNOTSUPP if route cannot be
>>> installed
>>> due to device limitations, and other negative error code on failure to
>>> install
>>> route to device. On failure error code, the route is not installed to
>>> device,
>>> and not installed in kernel FIB, and the return code is propagated back to
>>> the
>>> user-space caller (via netlink). An -EOPNOTSUPP error code is skipped for
>>> the
>>> device but installed in the kernel FIB.
>>>
>>> The FIB entry (route) nexthop list is used to find the swdev device port
>>> to
>>> anchor the ndo op call. The route's fib_dev (the first nexthop's dev) is
>>> used
>>> find the swdev port by recursively traversing the fib_dev's lower_dev list
>>> until a swdev port is found. The ndo op is called on this swdev port.
>>
>> scott, I posted a similar api for bridge attribute sets. But, nobody
>> supported it.
>> http://marc.info/?l=linux-netdev&m=141820234410602&w=2
>>
>> If this is acceptable, I will be resubmitting my api as well.
>>
> This may get shot down as well, who knows?
concern about traversing the stacked devices came from jiri.
I was wondering if we changed our minds on this. Hence my last comment.
> For routes, the nexthop dev may be a bridge or a bond for an IP on the
> router, so we have no choice but to walk down from the bridge or the
> bond to find a swport dev to call the ndo op to install the route.
I understand, During my patches, i did bring up l3 ops and that this
would be needed for l3 when nexthops are stacked devices on switch ports
as well. So, it was a generic concept for all such ops.
>
> For bridge settings, I remember someone raised the issue that settings
> should be propagated down the dev hierarchy, with parent calling
> child's op and so on. I'll go back and look at your post.
AFAIR it was jiri.
>
>>
>>> Since the FIB entry is "naked" when push from the kernel, the
>>> driver/device
>>> is responsible for resolving the route's nexthops to neighbor MAC
>>> addresses.
>>> This can be done by the driver by monitoring NETEVENT_NEIGH_UPDATE
>>> netevent notifier to watch for ARP activity. Once a nexthop is resolved
>>> to
>>> neighbor MAC address, it can be installed to the device and the device
>>> will
>>> do the L3 routing offload in HW, for that nexthop.
>>>
>>> Signed-off-by: Scott Feldman <sfeldma@gmail.com>
>>> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>>> ---
>>> include/linux/netdevice.h | 22 +++++++++++
>>> include/net/switchdev.h | 18 +++++++++
>>> net/ipv4/fib_trie.c | 17 ++++++++-
>>> net/switchdev/switchdev.c | 89
>>> +++++++++++++++++++++++++++++++++++++++++++++
>>> 4 files changed, 145 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
>>> index 679e6e9..b66d22b 100644
>>> --- a/include/linux/netdevice.h
>>> +++ b/include/linux/netdevice.h
>>> @@ -767,6 +767,8 @@ struct netdev_phys_item_id {
>>> typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
>>> struct sk_buff *skb);
>>> +struct fib_info;
>>> +
>>> /*
>>> * This structure defines the management hooks for network devices.
>>> * The following hooks can be defined; unless noted otherwise, they are
>>> @@ -1030,6 +1032,14 @@ typedef u16 (*select_queue_fallback_t)(struct
>>> net_device *dev,
>>> * int (*ndo_switch_port_stp_update)(struct net_device *dev, u8 state);
>>> * Called to notify switch device port of bridge port STP
>>> * state change.
>>> + * int (*ndo_sw_parent_fib_ipv4_add)(struct net_device *dev, __be32 dst,
>>> + * int dst_len, struct fib_info *fi,
>>> + * u8 tos, u8 type, u32 tb_id);
>>> + * Called to add IPv4 route to switch device.
>>> + * int (*ndo_sw_parent_fib_ipv4_del)(struct net_device *dev, __be32 dst,
>>> + * int dst_len, struct fib_info *fi,
>>> + * u8 tos, u8 type, u32 tb_id);
>>> + * Called to delete IPv4 route from switch device.
>>> */
>>> struct net_device_ops {
>>> int (*ndo_init)(struct net_device *dev);
>>> @@ -1189,6 +1199,18 @@ struct net_device_ops {
>>> struct
>>> netdev_phys_item_id *psid);
>>> int (*ndo_switch_port_stp_update)(struct
>>> net_device *dev,
>>> u8 state);
>>> + int (*ndo_switch_fib_ipv4_add)(struct
>>> net_device *dev,
>>> + __be32 dst,
>>> + int dst_len,
>>> + struct fib_info
>>> *fi,
>>> + u8 tos, u8
>>> type,
>>> + u32 tb_id);
>>> + int (*ndo_switch_fib_ipv4_del)(struct
>>> net_device *dev,
>>> + __be32 dst,
>>> + int dst_len,
>>> + struct fib_info
>>> *fi,
>>> + u8 tos, u8
>>> type,
>>> + u32 tb_id);
>>> #endif
>>> };
>>> diff --git a/include/net/switchdev.h b/include/net/switchdev.h
>>> index 8a6d164..caebc2a 100644
>>> --- a/include/net/switchdev.h
>>> +++ b/include/net/switchdev.h
>>> @@ -17,6 +17,10 @@
>>> int netdev_switch_parent_id_get(struct net_device *dev,
>>> struct netdev_phys_item_id *psid);
>>> int netdev_switch_port_stp_update(struct net_device *dev, u8 state);
>>> +int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
>>> + u8 tos, u8 type, u32 tb_id);
>>> +int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
>>> + u8 tos, u8 type, u32 tb_id);
>>> #else
>>> @@ -32,6 +36,20 @@ static inline int
>>> netdev_switch_port_stp_update(struct net_device *dev,
>>> return -EOPNOTSUPP;
>>> }
>>> +static inline int netdev_switch_fib_ipv4_add(u32 dst, int dst_len,
>>> + struct fib_info *fi,
>>> + u8 tos, u8 type, u32 tb_id)
>>> +{
>>> + return -EOPNOTSUPP;
>>> +}
>>> +
>>> +static inline int netdev_switch_fib_ipv4_del(u32 dst, int dst_len,
>>> + struct fib_info *fi,
>>> + u8 tos, u8 type, u32 tb_id)
>>> +{
>>> + return -EOPNOTSUPP;
>>> +}
>>> +
>>> #endif
>>> #endif /* _LINUX_SWITCHDEV_H_ */
>>> diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
>>> index 281e5e0..ea2dc17 100644
>>> --- a/net/ipv4/fib_trie.c
>>> +++ b/net/ipv4/fib_trie.c
>>> @@ -79,6 +79,7 @@
>>> #include <net/tcp.h>
>>> #include <net/sock.h>
>>> #include <net/ip_fib.h>
>>> +#include <net/switchdev.h>
>>> #include "fib_lookup.h"
>>> #define MAX_STAT_DEPTH 32
>>> @@ -1201,6 +1202,8 @@ int fib_table_insert(struct fib_table *tb, struct
>>> fib_config *cfg)
>>> fib_release_info(fi_drop);
>>> if (state & FA_S_ACCESSED)
>>> rt_cache_flush(cfg->fc_nlinfo.nl_net);
>>> + netdev_switch_fib_ipv4_add(key, plen, fi,
>>> fa->fa_tos,
>>> + cfg->fc_type,
>>> tb->tb_id);
>>> rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen,
>>> tb->tb_id, &cfg->fc_nlinfo,
>>> NLM_F_REPLACE);
>>> @@ -1229,6 +1232,13 @@ int fib_table_insert(struct fib_table *tb, struct
>>> fib_config *cfg)
>>> new_fa->fa_tos = tos;
>>> new_fa->fa_type = cfg->fc_type;
>>> new_fa->fa_state = 0;
>>> +
>>> + /* (Optionally) offload fib info to switch hardware. */
>>> + err = netdev_switch_fib_ipv4_add(key, plen, fi, tos,
>>> + cfg->fc_type, tb->tb_id);
>>> + if (err && err != -EOPNOTSUPP)
>>> + goto out_free_new_fa;
>>> +
>>> /*
>>> * Insert new entry to the list.
>>> */
>>> @@ -1237,7 +1247,7 @@ int fib_table_insert(struct fib_table *tb, struct
>>> fib_config *cfg)
>>> fa_head = fib_insert_node(t, key, plen);
>>> if (unlikely(!fa_head)) {
>>> err = -ENOMEM;
>>> - goto out_free_new_fa;
>>> + goto out_sw_fib_del;
>>> }
>>> }
>>> @@ -1253,6 +1263,8 @@ int fib_table_insert(struct fib_table *tb, struct
>>> fib_config *cfg)
>>> succeeded:
>>> return 0;
>>> +out_sw_fib_del:
>>> + netdev_switch_fib_ipv4_del(key, plen, fi, tos, cfg->fc_type,
>>> tb->tb_id);
>>> out_free_new_fa:
>>> kmem_cache_free(fn_alias_kmem, new_fa);
>>> out:
>>> @@ -1529,6 +1541,9 @@ int fib_table_delete(struct fib_table *tb, struct
>>> fib_config *cfg)
>>> rtmsg_fib(RTM_DELROUTE, htonl(key), fa, plen, tb->tb_id,
>>> &cfg->fc_nlinfo, 0);
>>> + netdev_switch_fib_ipv4_del(key, plen, fa->fa_info, tos,
>>> + cfg->fc_type, tb->tb_id);
>>> +
>>> list_del_rcu(&fa->fa_list);
>>> if (!plen)
>>> diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
>>> index d162b21..211a8a0 100644
>>> --- a/net/switchdev/switchdev.c
>>> +++ b/net/switchdev/switchdev.c
>>> @@ -12,6 +12,7 @@
>>> #include <linux/types.h>
>>> #include <linux/init.h>
>>> #include <linux/netdevice.h>
>>> +#include <net/ip_fib.h>
>>> #include <net/switchdev.h>
>>> /**
>>> @@ -50,3 +51,91 @@ int netdev_switch_port_stp_update(struct net_device
>>> *dev, u8 state)
>>> return ops->ndo_switch_port_stp_update(dev, state);
>>> }
>>> EXPORT_SYMBOL(netdev_switch_port_stp_update);
>>> +
>>> +static struct net_device *netdev_switch_get_by_fib_dev(struct net_device
>>> *dev)
>>> +{
>>> + const struct net_device_ops *ops = dev->netdev_ops;
>>> + struct net_device *lower_dev;
>>> + struct net_device *port_dev;
>>> + struct list_head *iter;
>>> +
>>> + /* Recusively search from fib_dev down until we find
>>> + * a sw port dev. (A sw port dev supports
>>> + * ndo_switch_parent_id_get).
>>> + */
>>> +
>>> + if (ops->ndo_switch_parent_id_get)
>>> + return dev;
>>> +
>>> + netdev_for_each_lower_dev(dev, lower_dev, iter) {
>>> + port_dev = netdev_switch_get_by_fib_dev(lower_dev);
>>> + if (port_dev)
>>> + return port_dev;
>>> + }
>>> +
>>> + return NULL;
>>> +}
>>> +
>>> +/**
>>> + * netdev_switch_fib_ipv4_add - Add IPv4 route entry to switch
>>> + *
>>> + * @dst: route's IPv4 destination address
>>> + * @dst_len: destination address length (prefix length)
>>> + * @fi: route FIB info structure
>>> + * @tos: route TOS
>>> + * @type: route type
>>> + * @tb_id: route table ID
>>> + *
>>> + * Add IPv4 route entry to switch device.
>>> + */
>>> +int netdev_switch_fib_ipv4_add(u32 dst, int dst_len, struct fib_info *fi,
>>> + u8 tos, u8 type, u32 tb_id)
>>> +{
>>> + struct net_device *dev;
>>> + const struct net_device_ops *ops;
>>> + int err = -EOPNOTSUPP;
>>> +
>>> + dev = netdev_switch_get_by_fib_dev(fi->fib_dev);
>>> + if (!dev)
>>> + return -EOPNOTSUPP;
>>> + ops = dev->netdev_ops;
>>> +
>>> + if (ops->ndo_switch_fib_ipv4_add)
>>> + err = ops->ndo_switch_fib_ipv4_add(dev, htonl(dst),
>>> dst_len,
>>> + fi, tos, type, tb_id);
>>> +
>>> + return err;
>>> +}
>>> +EXPORT_SYMBOL(netdev_switch_fib_ipv4_add);
>>> +
>>> +/**
>>> + * netdev_switch_fib_ipv4_del - Delete IPv4 route entry from switch
>>> + *
>>> + * @dst: route's IPv4 destination address
>>> + * @dst_len: destination address length (prefix length)
>>> + * @fi: route FIB info structure
>>> + * @tos: route TOS
>>> + * @type: route type
>>> + * @tb_id: route table ID
>>> + *
>>> + * Delete IPv4 route entry from switch device.
>>> + */
>>> +int netdev_switch_fib_ipv4_del(u32 dst, int dst_len, struct fib_info *fi,
>>> + u8 tos, u8 type, u32 tb_id)
>>> +{
>>> + struct net_device *dev;
>>> + const struct net_device_ops *ops;
>>> + int err = -EOPNOTSUPP;
>>> +
>>> + dev = netdev_switch_get_by_fib_dev(fi->fib_dev);
>>> + if (!dev)
>>> + return -EOPNOTSUPP;
>>> + ops = dev->netdev_ops;
>>> +
>>> + if (ops->ndo_switch_fib_ipv4_del)
>>> + err = ops->ndo_switch_fib_ipv4_del(dev, htonl(dst),
>>> dst_len,
>>> + fi, tos, type, tb_id);
>>> +
>>> + return err;
>>> +}
>>> +EXPORT_SYMBOL(netdev_switch_fib_ipv4_del);
>>
^ permalink raw reply
* Re: [PATCH net-next 2/2] geneve: Add Geneve GRO support
From: David Miller @ 2015-01-02 20:47 UTC (permalink / raw)
To: jesse; +Cc: netdev, joestringer
In-Reply-To: <1419995416-29987-2-git-send-email-jesse@nicira.com>
From: Jesse Gross <jesse@nicira.com>
Date: Tue, 30 Dec 2014 19:10:16 -0800
> From: Joe Stringer <joestringer@nicira.com>
>
> This results in an approximately 30% increase in throughput
> when handling encapsulated bulk traffic.
>
> Signed-off-by: Joe Stringer <joestringer@nicira.com>
> Signed-off-by: Jesse Gross <jesse@nicira.com>
Applied, looks great, thanks Jesse.
^ permalink raw reply
* Re: [PATCH net-next 1/2] net: Add Transparent Ethernet Bridging GRO support.
From: David Miller @ 2015-01-02 20:46 UTC (permalink / raw)
To: jesse; +Cc: netdev
In-Reply-To: <1419995416-29987-1-git-send-email-jesse@nicira.com>
From: Jesse Gross <jesse@nicira.com>
Date: Tue, 30 Dec 2014 19:10:15 -0800
> Currently the only tunnel protocol that supports GRO with encapsulated
> Ethernet is VXLAN. This pulls out the Ethernet code into a proper layer
> so that it can be used by other tunnel protocols such as GRE and Geneve.
>
> Signed-off-by: Jesse Gross <jesse@nicira.com>
Applied.
^ permalink raw reply
* Re: [PATCH v2][Nios2-dev] Altera TSE: Add missing phydev
From: David Miller @ 2015-01-02 20:45 UTC (permalink / raw)
To: bkostya; +Cc: nios2-dev, netdev
In-Reply-To: <BLU437-SMTP8237F72A0A7CCFCAF201F6B65E0@phx.gbl>
From: Kostya Belezko <bkostya@hotmail.com>
Date: Tue, 30 Dec 2014 12:27:09 -0500
> Altera network device doesn't come up after
>
> ifconfig eth0 down
> ifconfig eth0 up
>
> The reason behind is clearing priv->phydev during tse_shutdown().
> The phydev is not restored back at tse_open().
>
> Resubmiting as to follow Tobias Klauser suggestion.
> phy_start/phy_stop are called on each ifup/ifdown and
> phy_disconnect is called once during the module removal.
>
> Signed-off-by: Kostya Belezko <bkostya@hotmail.com>
I'll apply this, but I'm pretty sure the phy_disconnect() is down
so that the PHY is powered down when the device is not up.
^ permalink raw reply
* Re: [PATCH net 0/2] mlx4 driver fixes for 3.19-rc2
From: David Miller @ 2015-01-02 20:42 UTC (permalink / raw)
To: ogerlitz; +Cc: netdev, matanb, talal
In-Reply-To: <1419933590-9718-1-git-send-email-ogerlitz@mellanox.com>
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Tue, 30 Dec 2014 11:59:48 +0200
> Please push Maor's patch to -stable >= 3.17
>
> Jack's fixes error-flow issues introduced in 3.19-rc1, no need for -stable.
Series applied and patch #1 applied to -stable, thanks.
> thanks and EOY happy-holidays,
Thanks!
^ permalink raw reply
* Re: [PATCH 3/3][v2] net/fsl: remove hardcoded clock setting from xgmac_mdio
From: David Miller @ 2015-01-02 20:40 UTC (permalink / raw)
To: shh.xie; +Cc: netdev, Shaohui.Xie
In-Reply-To: <1419928101-2533-1-git-send-email-shh.xie@gmail.com>
From: <shh.xie@gmail.com>
Date: Tue, 30 Dec 2014 16:28:21 +0800
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
>
> There is no need to set the clock speed in read/write which will be performed
> unnecessarily for each mdio access. Init it during probe is enough.
>
> Also, the hardcoded clock value is not a proper way for all SoCs.
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Applied to net-next.
^ permalink raw reply
* Re: [PATCH 2/3][v2] net/fsl: remove irq assignment from xgmac_mdio
From: David Miller @ 2015-01-02 20:40 UTC (permalink / raw)
To: shh.xie; +Cc: netdev, Shaohui.Xie
In-Reply-To: <1419928080-2492-1-git-send-email-shh.xie@gmail.com>
From: <shh.xie@gmail.com>
Date: Tue, 30 Dec 2014 16:28:00 +0800
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
>
> Which is wrong and not used, so no extra space needed by
> mdiobus_alloc_size(), use mdiobus_alloc() instead.
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Applied to net-next.
^ permalink raw reply
* Re: [PATCH 1/3][v2] net/fsl: remove reset from xgmac_mdio
From: David Miller @ 2015-01-02 20:40 UTC (permalink / raw)
To: shh.xie; +Cc: netdev, Shaohui.Xie
In-Reply-To: <1419928053-2450-1-git-send-email-shh.xie@gmail.com>
From: <shh.xie@gmail.com>
Date: Tue, 30 Dec 2014 16:27:33 +0800
> From: Shaohui Xie <Shaohui.Xie@freescale.com>
>
> Since the reset is just clock setting, individual mdio reset is
> not available.
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Applied to net-next.
^ permalink raw reply
* Re: tcp: Do not apply TSO segment limit to non-TSO packets
From: David Miller @ 2015-01-02 20:36 UTC (permalink / raw)
To: eric.dumazet
Cc: herbert, thomas.jarosch, netdev, edumazet, steffen.klassert,
bhutchings
In-Reply-To: <1420223040.32621.6.camel@edumazet-glaptop2.roam.corp.google.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 02 Jan 2015 10:24:00 -0800
> On Thu, 2015-01-01 at 00:42 +1100, Herbert Xu wrote:
>> Firstly not many people test non-TSO code paths anymore so bugs
>> are likely to persist for a long time there. Perhaps it's time
>> to remove the non-TSO code path altogether? The GSO code path
>> should provide enough speed-up in terms of boosting the effective
>> MTU to offset the cost of copying.
>
>> Secondly why are we dealing with hardware TSO segment limits
>> by limiting the size of the TSO packet in the TCP stack? Surely
>> in this case GSO is free since there won't be any copying?
>
> It might depends on the device capabilities.
>
> Non TSO/GSO path is known to be better for devices unable to perform TX
> checksumming, as we compute the checksum at the time we copy data from
> user to kernel (csum_and_copy_from_user() from tcp_sendmsg())).
Non-SG capable devices suffer in this scenerio as well.
^ permalink raw reply
* Re: [net-next PATCH 00/17] fib_trie: Reduce time spent in fib_table_lookup by 35 to 75%
From: David Miller @ 2015-01-02 20:34 UTC (permalink / raw)
To: alexander.duyck; +Cc: alexander.h.duyck, netdev
In-Reply-To: <54A6C710.6000702@gmail.com>
From: Alexander Duyck <alexander.duyck@gmail.com>
Date: Fri, 02 Jan 2015 08:28:00 -0800
> I'm hoping that growing smaller nodes will help offset the fact that we
> have to restrict the larger nodes. For backtracing these large nodes
> come at a significant price as each bit value beyond what can be fit in
> a cache-line means one additional cache line being read when
> backtracking. So for example two 3 bit nodes on 64b require 4
> cache-lines when backtracking an all 1s value, but one 6 bit node will
> require reading 5 cache-lines.
If you load a full BGP table into fib_trie you will notice that
basically what it does is degenerate into what is essentially a trie
of huge hash tables. Largest will be the root node.
So a good test would be loading a sample full BGP table into fib_trie,
then iterate randomly choosing 15 or so routes to remove then re-add
over and over again. This would simulate route flaps, and you can
check to see how much deeper the trie is with your changes added.
> Also I hope to reduce the memory accesses/dependencies to half of what
> they currently are so hopefully the two will offset each other in the
> case where there were performance gains from having nodes larger than
> 256B that cannot reach the necessary value to inflate after the change.
> If nothing else I figure I can tune the utilization values based on the
> truesize so that we get the best memory utilization/performance ratio.
> If necessary I might relax the value from the 50% it is now as we pretty
> much have to be all full nodes in order to inflate based on the truesize
> beyond 256B.
See above.
^ permalink raw reply
* [PATCH] net: ethernet: cisco: enic: enic_dev: Remove some unused functions
From: Rickard Strandqvist @ 2015-01-02 20:29 UTC (permalink / raw)
To: Christian Benvenuti, Sujith Sankar
Cc: Rickard Strandqvist, Govindarajulu Varadarajan, Neel Patel,
netdev, linux-kernel
Removes some functions that are not used anywhere:
enic_dev_enable2_done() enic_dev_enable2() enic_dev_deinit_done()
enic_dev_init_prov2() enic_vnic_dev_deinit()
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
drivers/net/ethernet/cisco/enic/enic_dev.c | 56 ----------------------------
drivers/net/ethernet/cisco/enic/enic_dev.h | 5 ---
2 files changed, 61 deletions(-)
diff --git a/drivers/net/ethernet/cisco/enic/enic_dev.c b/drivers/net/ethernet/cisco/enic/enic_dev.c
index 87ddc44..f8d2a6a 100644
--- a/drivers/net/ethernet/cisco/enic/enic_dev.c
+++ b/drivers/net/ethernet/cisco/enic/enic_dev.c
@@ -177,40 +177,6 @@ int enic_dev_intr_coal_timer_info(struct enic *enic)
return err;
}
-int enic_vnic_dev_deinit(struct enic *enic)
-{
- int err;
-
- spin_lock_bh(&enic->devcmd_lock);
- err = vnic_dev_deinit(enic->vdev);
- spin_unlock_bh(&enic->devcmd_lock);
-
- return err;
-}
-
-int enic_dev_init_prov2(struct enic *enic, struct vic_provinfo *vp)
-{
- int err;
-
- spin_lock_bh(&enic->devcmd_lock);
- err = vnic_dev_init_prov2(enic->vdev,
- (u8 *)vp, vic_provinfo_size(vp));
- spin_unlock_bh(&enic->devcmd_lock);
-
- return err;
-}
-
-int enic_dev_deinit_done(struct enic *enic, int *status)
-{
- int err;
-
- spin_lock_bh(&enic->devcmd_lock);
- err = vnic_dev_deinit_done(enic->vdev, status);
- spin_unlock_bh(&enic->devcmd_lock);
-
- return err;
-}
-
/* rtnl lock is held */
int enic_vlan_rx_add_vid(struct net_device *netdev, __be16 proto, u16 vid)
{
@@ -237,28 +203,6 @@ int enic_vlan_rx_kill_vid(struct net_device *netdev, __be16 proto, u16 vid)
return err;
}
-int enic_dev_enable2(struct enic *enic, int active)
-{
- int err;
-
- spin_lock_bh(&enic->devcmd_lock);
- err = vnic_dev_enable2(enic->vdev, active);
- spin_unlock_bh(&enic->devcmd_lock);
-
- return err;
-}
-
-int enic_dev_enable2_done(struct enic *enic, int *status)
-{
- int err;
-
- spin_lock_bh(&enic->devcmd_lock);
- err = vnic_dev_enable2_done(enic->vdev, status);
- spin_unlock_bh(&enic->devcmd_lock);
-
- return err;
-}
-
int enic_dev_status_to_errno(int devcmd_status)
{
switch (devcmd_status) {
diff --git a/drivers/net/ethernet/cisco/enic/enic_dev.h b/drivers/net/ethernet/cisco/enic/enic_dev.h
index 10bb970..f5bb058 100644
--- a/drivers/net/ethernet/cisco/enic/enic_dev.h
+++ b/drivers/net/ethernet/cisco/enic/enic_dev.h
@@ -55,11 +55,6 @@ int enic_dev_set_ig_vlan_rewrite_mode(struct enic *enic);
int enic_dev_enable(struct enic *enic);
int enic_dev_disable(struct enic *enic);
int enic_dev_intr_coal_timer_info(struct enic *enic);
-int enic_vnic_dev_deinit(struct enic *enic);
-int enic_dev_init_prov2(struct enic *enic, struct vic_provinfo *vp);
-int enic_dev_deinit_done(struct enic *enic, int *status);
-int enic_dev_enable2(struct enic *enic, int arg);
-int enic_dev_enable2_done(struct enic *enic, int *status);
int enic_dev_status_to_errno(int devcmd_status);
#endif /* _ENIC_DEV_H_ */
--
1.7.10.4
^ 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