Netdev List
 help / color / mirror / Atom feed
* Re: [PATCH v3 2/2] ARM: dts: Add the ethernet and ethernet PHY to the cygnus core DT.
From: Florian Fainelli @ 2017-06-05 16:47 UTC (permalink / raw)
  To: Eric Anholt, Florian Fainelli, Vivien Didelot, Andrew Lunn,
	netdev, Rob Herring, Mark Rutland, devicetree
  Cc: linux-arm-kernel, linux-kernel, bcm-kernel-feedback-list, Ray Jui,
	Scott Branden, Jon Mason
In-Reply-To: <20170428222204.7103-2-eric@anholt.net>

On 04/28/2017 03:22 PM, Eric Anholt wrote:
> Cygnus has a single amac controller connected to the B53 switch with 2
> PHYs.  On the BCM911360_EP platform, those two PHYs are connected to
> the external ethernet jacks.
> 
> v2: Call the node "switch", just call the ports "port" (suggestions by
>     Florian), drop max-speed on the phys (suggestion by Andrew Lunn),
>     call the other nodes "ethernet" and "ethernet-phy" (suggestions by
>     Sergei Shtylyov)
> v3: Drop another max-speed (Andrew), keep mdio disabled in the shared
>     dtsi (Florian)
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>

Applied, thanks Eric!
-- 
Florian

^ permalink raw reply

* Re: [PATCH 3/6] net: phy: hook up clause 45 autonegotiation restart
From: Florian Fainelli @ 2017-06-05 16:30 UTC (permalink / raw)
  To: Russell King, Andrew Lunn; +Cc: netdev
In-Reply-To: <E1dHq68-0005Wy-Na@rmk-PC.armlinux.org.uk>

On 06/05/2017 04:23 AM, Russell King wrote:
> genphy_restart_aneg() can only restart autonegotiation on clause 22
> PHYs.  Add a phy_restart_aneg() function which selects between the
> clause 22 and clause 45 restart functionality depending on the PHY
> type and whether the Clause 45 PHY supports the Clause 22 register set.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH 2/6] net: phy: avoid genphy_aneg_done() for PHYs without clause 22 support
From: Florian Fainelli @ 2017-06-05 16:29 UTC (permalink / raw)
  To: Russell King, Andrew Lunn; +Cc: netdev
In-Reply-To: <E1dHq63-0005Wr-K2@rmk-PC.armlinux.org.uk>

On 06/05/2017 04:22 AM, Russell King wrote:
> Avoid calling genphy_aneg_done() for PHYs that do not implement the
> Clause 22 register set.
> 
> Clause 45 PHYs may implement the Clause 22 register set along with the
> Clause 22 extension MMD.  Hence, we can't simply block access to the
> Clause 22 functions based on the PHY being a Clause 45 PHY.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH 1/6] net: phy: add 802.3 clause 45 support to phylib
From: Florian Fainelli @ 2017-06-05 16:25 UTC (permalink / raw)
  To: Russell King, Andrew Lunn; +Cc: netdev
In-Reply-To: <E1dHq5y-0005Wk-Ca@rmk-PC.armlinux.org.uk>

On 06/05/2017 04:22 AM, Russell King wrote:
> Add generic helpers for 802.3 clause 45 PHYs for >= 10Gbps support.
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* Re: [PATCH 5/6] net: phy: add XAUI and 10GBASE-KR PHY connection types
From: Florian Fainelli @ 2017-06-05 16:24 UTC (permalink / raw)
  To: Russell King, Andrew Lunn; +Cc: Rob Herring, Mark Rutland, netdev, devicetree
In-Reply-To: <E1dHq6I-0005XE-VR@rmk-PC.armlinux.org.uk>

On 06/05/2017 04:23 AM, Russell King wrote:
> XAUI allows XGMII to reach an extended distance by using a XGXS layer at
> each end of the MAC to PHY link, operating over four Serdes lanes.
> 
> 10GBASE-KR is a single lane Serdes backplane ethernet connection method
> with autonegotiation on the link.  Some PHYs use this to connect to the
> ethernet interface at 10G speeds, switching to other connection types
> when utilising slower speeds.
> 
> 10GBASE-KR is also used for XFI and SFI to connect to XFP and SFP fiber
> modules.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply

* [PATCH 4.11 028/115] bonding: fix accounting of active ports in 3ad
From: Greg Kroah-Hartman @ 2017-06-05 16:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jay Vosburgh, Veaceslav Falico,
	Andy Gospodarek, netdev, Jarod Wilson, David S. Miller
In-Reply-To: <20170605153056.650217313@linuxfoundation.org>

4.11-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jarod Wilson <jarod@redhat.com>


[ Upstream commit 751da2a69b7cc82d83dc310ed7606225f2d6e014 ]

As of 7bb11dc9f59d and 0622cab0341c, bond slaves in a 3ad bond are not
removed from the aggregator when they are down, and the active slave count
is NOT equal to number of ports in the aggregator, but rather the number
of ports in the aggregator that are still enabled. The sysfs spew for
bonding_show_ad_num_ports() has a comment that says "Show number of active
802.3ad ports.", but it's currently showing total number of ports, both
active and inactive. Remedy it by using the same logic introduced in
0622cab0341c in __bond_3ad_get_active_agg_info(), so sysfs, procfs and
netlink all report the number of active ports. Note that this means that
IFLA_BOND_AD_INFO_NUM_PORTS really means NUM_ACTIVE_PORTS instead of
NUM_PORTS, and thus perhaps should be renamed for clarity.

Lightly tested on a dual i40e lacp bond, simulating link downs with an ip
link set dev <slave2> down, was able to produce the state where I could
see both in the same aggregator, but a number of ports count of 1.

MII Status: up
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 2 <---
Slave Interface: ens10
MII Status: up <---
Aggregator ID: 1
Slave Interface: ens11
MII Status: up
Aggregator ID: 1

MII Status: up
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 1 <---
Slave Interface: ens10
MII Status: down <---
Aggregator ID: 1
Slave Interface: ens11
MII Status: up
Aggregator ID: 1

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/bonding/bond_3ad.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2573,7 +2573,7 @@ int __bond_3ad_get_active_agg_info(struc
 		return -1;
 
 	ad_info->aggregator_id = aggregator->aggregator_identifier;
-	ad_info->ports = aggregator->num_of_ports;
+	ad_info->ports = __agg_active_ports(aggregator);
 	ad_info->actor_key = aggregator->actor_oper_aggregator_key;
 	ad_info->partner_key = aggregator->partner_oper_aggregator_key;
 	ether_addr_copy(ad_info->partner_system,

^ permalink raw reply

* [PATCH 4.9 25/94] bonding: fix accounting of active ports in 3ad
From: Greg Kroah-Hartman @ 2017-06-05 16:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jay Vosburgh, Veaceslav Falico,
	Andy Gospodarek, netdev, Jarod Wilson, David S. Miller
In-Reply-To: <20170605153103.156843111@linuxfoundation.org>

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jarod Wilson <jarod@redhat.com>


[ Upstream commit 751da2a69b7cc82d83dc310ed7606225f2d6e014 ]

As of 7bb11dc9f59d and 0622cab0341c, bond slaves in a 3ad bond are not
removed from the aggregator when they are down, and the active slave count
is NOT equal to number of ports in the aggregator, but rather the number
of ports in the aggregator that are still enabled. The sysfs spew for
bonding_show_ad_num_ports() has a comment that says "Show number of active
802.3ad ports.", but it's currently showing total number of ports, both
active and inactive. Remedy it by using the same logic introduced in
0622cab0341c in __bond_3ad_get_active_agg_info(), so sysfs, procfs and
netlink all report the number of active ports. Note that this means that
IFLA_BOND_AD_INFO_NUM_PORTS really means NUM_ACTIVE_PORTS instead of
NUM_PORTS, and thus perhaps should be renamed for clarity.

Lightly tested on a dual i40e lacp bond, simulating link downs with an ip
link set dev <slave2> down, was able to produce the state where I could
see both in the same aggregator, but a number of ports count of 1.

MII Status: up
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 2 <---
Slave Interface: ens10
MII Status: up <---
Aggregator ID: 1
Slave Interface: ens11
MII Status: up
Aggregator ID: 1

MII Status: up
Active Aggregator Info:
        Aggregator ID: 1
        Number of ports: 1 <---
Slave Interface: ens10
MII Status: down <---
Aggregator ID: 1
Slave Interface: ens11
MII Status: up
Aggregator ID: 1

CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: netdev@vger.kernel.org
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/bonding/bond_3ad.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -2573,7 +2573,7 @@ int __bond_3ad_get_active_agg_info(struc
 		return -1;
 
 	ad_info->aggregator_id = aggregator->aggregator_identifier;
-	ad_info->ports = aggregator->num_of_ports;
+	ad_info->ports = __agg_active_ports(aggregator);
 	ad_info->actor_key = aggregator->actor_oper_aggregator_key;
 	ad_info->partner_key = aggregator->partner_oper_aggregator_key;
 	ether_addr_copy(ad_info->partner_system,

^ permalink raw reply

* Re: [PATCH] net/ipv6: Fix CALIPSO causing GPF with datagram support
From: David Miller @ 2017-06-05 16:00 UTC (permalink / raw)
  To: paul; +Cc: richard_c_haines, netdev, selinux, linux-security-module
In-Reply-To: <CAHC9VhRwzC=XTRj5gNfd11T=XzpYSrVfu-jnx9f4__duMAji1Q@mail.gmail.com>

From: Paul Moore <paul@paul-moore.com>
Date: Mon, 5 Jun 2017 11:55:34 -0400

> On Mon, Jun 5, 2017 at 11:44 AM, Richard Haines
> <richard_c_haines@btinternet.com> wrote:
>> When using CALIPSO with IPPROTO_UDP it is possible to trigger a GPF as the
>> IP header may have moved.
>>
>> Also update the payload length after adding the CALIPSO option.
>>
>> Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
>> ---
>>  net/ipv6/calipso.c | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> Acked-by: Paul Moore <paul@paul-moore.com>
> 
> Thanks Richard.  DaveM, I assume you'll be pulling this into your tree?

Sure.

^ permalink raw reply

* Re: [PATCH] net/ipv6: Fix CALIPSO causing GPF with datagram support
From: Paul Moore @ 2017-06-05 15:55 UTC (permalink / raw)
  To: Richard Haines, netdev; +Cc: selinux, linux-security-module
In-Reply-To: <20170605154440.2434-1-richard_c_haines@btinternet.com>

On Mon, Jun 5, 2017 at 11:44 AM, Richard Haines
<richard_c_haines@btinternet.com> wrote:
> When using CALIPSO with IPPROTO_UDP it is possible to trigger a GPF as the
> IP header may have moved.
>
> Also update the payload length after adding the CALIPSO option.
>
> Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
> ---
>  net/ipv6/calipso.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

Acked-by: Paul Moore <paul@paul-moore.com>

Thanks Richard.  DaveM, I assume you'll be pulling this into your tree?

> diff --git a/net/ipv6/calipso.c b/net/ipv6/calipso.c
> index 37ac9de..8d772fe 100644
> --- a/net/ipv6/calipso.c
> +++ b/net/ipv6/calipso.c
> @@ -1319,7 +1319,7 @@ static int calipso_skbuff_setattr(struct sk_buff *skb,
>         struct ipv6hdr *ip6_hdr;
>         struct ipv6_opt_hdr *hop;
>         unsigned char buf[CALIPSO_MAX_BUFFER];
> -       int len_delta, new_end, pad;
> +       int len_delta, new_end, pad, payload;
>         unsigned int start, end;
>
>         ip6_hdr = ipv6_hdr(skb);
> @@ -1346,6 +1346,8 @@ static int calipso_skbuff_setattr(struct sk_buff *skb,
>         if (ret_val < 0)
>                 return ret_val;
>
> +       ip6_hdr = ipv6_hdr(skb); /* Reset as skb_cow() may have moved it */
> +
>         if (len_delta) {
>                 if (len_delta > 0)
>                         skb_push(skb, len_delta);
> @@ -1355,6 +1357,8 @@ static int calipso_skbuff_setattr(struct sk_buff *skb,
>                         sizeof(*ip6_hdr) + start);
>                 skb_reset_network_header(skb);
>                 ip6_hdr = ipv6_hdr(skb);
> +               payload = ntohs(ip6_hdr->payload_len);
> +               ip6_hdr->payload_len = htons(payload + len_delta);
>         }
>
>         hop = (struct ipv6_opt_hdr *)(ip6_hdr + 1);
> --
> 2.9.4
>



-- 
paul moore
www.paul-moore.com

^ permalink raw reply

* Re: [patch net-next 0/6] introduce trap control action to tc and offload it
From: Andrew Lunn @ 2017-06-05 15:46 UTC (permalink / raw)
  To: Jiri Pirko
  Cc: netdev, davem, jhs, xiyou.wangcong, edumazet, alexander.h.duyck,
	stephen, daniel, mlxsw
In-Reply-To: <20170605143832.7025-1-jiri@resnulli.us>

On Mon, Jun 05, 2017 at 04:38:26PM +0200, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@mellanox.com>
> 
> This patchset introduces a control action dedicated to indicate
> to trap the matched packet to CPU. This is specific action for
> HW offloads. Also, the patchset offloads the action to mlxsw driver.
> 
> Example usage:
> $ tc filter add dev enp3s0np19 parent ffff: protocol ip prio 20 flower skip_sw dst_ip 192.168.10.1 action trap

Hi Jiri

So i assume this means a frame ingressing on the switch port
enp3s0np19 matching the filter is now visible on the linux enp3s0np19
interface?  How do you avoid Linux processing it? If enp3s0np19 is a
member of a bridge, we don't want the software bridge processing it
and forwarding it out another port, since i assume the hardware has
already done this. Or does the trap stop further processing of the
frame by the hardware?

Thanks
      Andrew

^ permalink raw reply

* [PATCH] net/ipv6: Fix CALIPSO causing GPF with datagram support
From: Richard Haines @ 2017-06-05 15:44 UTC (permalink / raw)
  To: paul-r2n+y4ga6xFZroRs9YW3xA
  Cc: netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	selinux-+05T5uksL2qpZYMLLGbcSA

When using CALIPSO with IPPROTO_UDP it is possible to trigger a GPF as the
IP header may have moved.

Also update the payload length after adding the CALIPSO option.

Signed-off-by: Richard Haines <richard_c_haines-FhtRXb7CoQBt1OO0OYaSVA@public.gmane.org>
---
 net/ipv6/calipso.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/ipv6/calipso.c b/net/ipv6/calipso.c
index 37ac9de..8d772fe 100644
--- a/net/ipv6/calipso.c
+++ b/net/ipv6/calipso.c
@@ -1319,7 +1319,7 @@ static int calipso_skbuff_setattr(struct sk_buff *skb,
 	struct ipv6hdr *ip6_hdr;
 	struct ipv6_opt_hdr *hop;
 	unsigned char buf[CALIPSO_MAX_BUFFER];
-	int len_delta, new_end, pad;
+	int len_delta, new_end, pad, payload;
 	unsigned int start, end;
 
 	ip6_hdr = ipv6_hdr(skb);
@@ -1346,6 +1346,8 @@ static int calipso_skbuff_setattr(struct sk_buff *skb,
 	if (ret_val < 0)
 		return ret_val;
 
+	ip6_hdr = ipv6_hdr(skb); /* Reset as skb_cow() may have moved it */
+
 	if (len_delta) {
 		if (len_delta > 0)
 			skb_push(skb, len_delta);
@@ -1355,6 +1357,8 @@ static int calipso_skbuff_setattr(struct sk_buff *skb,
 			sizeof(*ip6_hdr) + start);
 		skb_reset_network_header(skb);
 		ip6_hdr = ipv6_hdr(skb);
+		payload = ntohs(ip6_hdr->payload_len);
+		ip6_hdr->payload_len = htons(payload + len_delta);
 	}
 
 	hop = (struct ipv6_opt_hdr *)(ip6_hdr + 1);
-- 
2.9.4

^ permalink raw reply related

* Re: [PATCH net] net/mlx4: Check if Granular QoS per VF has been enabled before updating QP qos_vport
From: David Miller @ 2017-06-05 15:32 UTC (permalink / raw)
  To: tariqt; +Cc: netdev, eranbe, idos, jackm
In-Reply-To: <1496648696-5457-1-git-send-email-tariqt@mellanox.com>

From: Tariq Toukan <tariqt@mellanox.com>
Date: Mon,  5 Jun 2017 10:44:56 +0300

> From: Ido Shamay <idos@mellanox.com>
> 
> The Granular QoS per VF feature must be enabled in FW before it can be
> used.
> 
> Thus, the driver cannot modify a QP's qos_vport value (via the UPDATE_QP FW
> command) if the feature has not been enabled -- the FW returns an error if
> this is attempted.
> 
> Fixes: 08068cd5683f ("net/mlx4: Added qos_vport QP configuration in VST mode")
> Signed-off-by: Ido Shamay <idos@mellanox.com>
> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
> Signed-off-by: Tariq Toukan <tariqt@mellanox.com>

Applied.

^ permalink raw reply

* Re: [PATCH] net: phy: fix kernel-doc warnings
From: David Miller @ 2017-06-05 15:29 UTC (permalink / raw)
  To: rdunlap; +Cc: netdev, andrew, f.fainelli
In-Reply-To: <3d006e19-8c96-a752-fbcb-bf8fc7ccb386@infradead.org>

From: Randy Dunlap <rdunlap@infradead.org>
Date: Sun, 4 Jun 2017 19:46:53 -0700

> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix kernel-doc warnings (typo) in drivers/net/phy/phy.c:
> 
> ..//drivers/net/phy/phy.c:259: warning: No description found for parameter 'features'
> ..//drivers/net/phy/phy.c:259: warning: Excess function parameter 'feature' description in 'phy_lookup_setting'
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>

Applied, thanks Randy.

^ permalink raw reply

* Re: [PATCH v2] devlink: fix potential memort leak
From: David Miller @ 2017-06-05 15:28 UTC (permalink / raw)
  To: yanhaishuang; +Cc: arkadis, jiri, netdev, linux-kernel
In-Reply-To: <1496624241-25794-1-git-send-email-yanhaishuang@cmss.chinamobile.com>

From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Mon,  5 Jun 2017 08:57:21 +0800

> We must free allocated skb when genlmsg_put() return fails.
> 
> Fixes: 1555d204e743 ("devlink: Support for pipeline debug (dpipe)")
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
> 
> ---
> Changes in v2:
>   - Fix same issue in headers_fill.

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] net-next: stmmac: dwmac-sun8i: ensure the EPHY is properly reseted
From: David Miller @ 2017-06-05 15:23 UTC (permalink / raw)
  To: icenowy-h8G6r0blFSE
  Cc: clabbe.montjoie-Re5JQEeQqe8AvxtiuMwx3w,
	netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw
In-Reply-To: <20170604175323.62124-1-icenowy-h8G6r0blFSE@public.gmane.org>

From: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>
Date: Mon,  5 Jun 2017 01:53:23 +0800

> The EPHY may be already enabled by bootloaders which have Ethernet
> capability (e.g. current U-Boot). Thus it should be reseted properly
> before doing the enabling sequence in the dwmac-sun8i driver, otherwise
> the EMAC reset process may fail if no cable is plugged, and then fail
> the dwmac-sun8i probing.
> 
> Tested on Orange Pi PC, One and Zero. All the boards fail to have
> dwmac-sun8i probed with "EMAC reset timeout" without cable plugged
> before, and with this fix they're now all able to successfully probe the
> EMAC without cable plugged and then use the connection after a cable is
> hot-plugged in.
> 
> Fixes: 9f93ac8d408 ("net-next: stmmac: Add dwmac-sun8i")
> Signed-off-by: Icenowy Zheng <icenowy-h8G6r0blFSE@public.gmane.org>

Applied, thanks.

^ permalink raw reply

* Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova
From: Jason Gunthorpe @ 2017-06-05 15:17 UTC (permalink / raw)
  To: Ilan Tayari
  Cc: Alexei Starovoitov, Saeed Mahameed, David S. Miller, Doug Ledford,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jsorensen-b10kYP2dOMg@public.gmane.org, Andy Shevchenko,
	linux-fpga-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alan Tull,
	yi1.li-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, Boris Pismenny
In-Reply-To: <AM4PR0501MB19404B83A69B87AFB1326B45DBF50-dp/nxUn679gfNUYDR5dMTsDSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>

On Sun, Jun 04, 2017 at 07:51:24AM +0000, Ilan Tayari wrote:
> > From: Jason Gunthorpe [mailto:jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org]
> > Subject: Re: [for-next 4/6] net/mlx5: FPGA, Add basic support for Innova
> > 
> > On Mon, May 29, 2017 at 04:09:06PM +0000, Ilan Tayari wrote:
> > 
> > > > For IPSec, this is already in the kernel.
> > > > See this patchset:
> > > > http://www.mail-archive.com/netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org/msg162876.html
> > >
> > > Sorry, I pointed at the RFC by mistake.
> > >
> > > This is the relevant pull request:
> > > https://patchwork.ozlabs.org/patch/752707/
> > 
> > This is connecting ipsec to a netdev, while Innova seems to be a
> 
> Jason,
> 
> "network connected ipsec accelerator configured using IP packets."
> No. This is incorrect.
> Where did you get that from?

That is what you described to me - you said the only way to configure
the FPGA was via IP packets in-band. It is not part of the NIC and the
NIC only loads the FPGA bitstream.

Maybe you should explain more how this works?

> So you configure it from userspace with regular IPSec 'ip xfrm
> state' commands or over netlink with your favorite IKE daemon.

But you don't give an ip xfrm configuration to the NIC when you submit
the work request? By your description it sounded liked the FPGA
pattern matches packets from the NIC side to apply the xfrm.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" 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

* Re: [PATCH] net/{mii,smsc}: Make mii_ethtool_get_link_ksettings and smc_netdev_get_ecmd return void
From: David Miller @ 2017-06-05 15:01 UTC (permalink / raw)
  To: yuval.shaia
  Cc: klassert, pcnet32, hsweeten, jeffrey.t.kirsher, cooldavid,
	mcuos.com, nic_swsd, ralf, romieu, nico, oneukum, tremyfr,
	paul.gortmaker, jarod, green.hu, f.fainelli, edumazet, shchers,
	stephen.boyd, fgao, tklauser, jay.vosburgh, robert.jarzmik,
	jeremy.linton, rmk+kernel, stephen, arnd, gerg, allan, chris.roth,
	hayeswang, mario_limonciello, netdev, linux-parisc@
In-Reply-To: <20170604172200.4177-1-yuval.shaia@oracle.com>

From: Yuval Shaia <yuval.shaia@oracle.com>
Date: Sun,  4 Jun 2017 20:22:00 +0300

> Make return value void since functions never returns meaningfull value.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>

Applied to net-next.

^ permalink raw reply

* Re: [PATCH] net/3com: Make el3_netdev_get_ecmd return void
From: David Miller @ 2017-06-05 15:01 UTC (permalink / raw)
  To: yuval.shaia; +Cc: jarod, tremyfr, dhowells, netdev
In-Reply-To: <20170604172446.4294-1-yuval.shaia@oracle.com>

From: Yuval Shaia <yuval.shaia@oracle.com>
Date: Sun,  4 Jun 2017 20:24:46 +0300

> Make return value void since function never returns meaningfull value.
> 
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>

Applied to net-next.

^ permalink raw reply

* Re: [PATCH] net/dec: Make __de_get_link_ksettings return void
From: David Miller @ 2017-06-05 15:01 UTC (permalink / raw)
  To: yuval.shaia; +Cc: jarod, tklauser, tremyfr, netdev, linux-parisc
In-Reply-To: <20170604170851.3808-1-yuval.shaia@oracle.com>

From: Yuval Shaia <yuval.shaia@oracle.com>
Date: Sun,  4 Jun 2017 20:08:51 +0300

> Make return value void since function never return meaningfull value
> 
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>

Applied to net-next.

^ permalink raw reply

* Re: [patch net-next] net: sched: select cls when cls_act is enabled
From: David Miller @ 2017-06-05 14:57 UTC (permalink / raw)
  To: jiri; +Cc: netdev, jhs, xiyou.wangcong, fengguang.wu, mlxsw
In-Reply-To: <20170604164928.15569-1-jiri@resnulli.us>

From: Jiri Pirko <jiri@resnulli.us>
Date: Sun,  4 Jun 2017 18:49:28 +0200

> From: Jiri Pirko <jiri@mellanox.com>
> 
> It really makes no sense to have cls_act enabled without cls. In that
> case, the cls_act code is dead. So select it.
> 
> This also fixes an issue recently reported by kbuild robot:
> [linux-next:master 1326/4151] net/sched/act_api.c:37:18: error: implicit declaration of function 'tcf_chain_get'
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Fixes: db50514f9a9c ("net: sched: add termination action to allow goto chain")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>

Applied, thanks Jiri.

^ permalink raw reply

* Re: [PATCH v2 net-next] genetlink: remove ops_list from genetlink header.
From: David Miller @ 2017-06-05 14:55 UTC (permalink / raw)
  To: rami.rosen; +Cc: johannes.berg, netdev
In-Reply-To: <1496578801-9270-1-git-send-email-rami.rosen@intel.com>

From: Rami Rosen <rami.rosen@intel.com>
Date: Sun,  4 Jun 2017 15:20:01 +0300

> commit d91824c08fbc ("genetlink: register family ops as array") removed the 
> ops_list member from both genl_family and genl_ops; while the 
> documentation of genl_family was updated accordingly by this patch, 
> ops_list remained in the documentation of the genl_ops object. 
> This patch fixes it by removing ops_list from genl_ops documentation. 
> 
> Signed-off-by: Rami Rosen <rami.rosen@intel.com>

Applied, thank you.

^ permalink raw reply

* Re: [PATCH] net: Update TCP congestion control documentation
From: David Miller @ 2017-06-05 14:54 UTC (permalink / raw)
  To: me; +Cc: linux-doc, linux-kernel, netdev
In-Reply-To: <1496491854-17977-1-git-send-email-me@anmolsarma.in>

From: Anmol Sarma <me@anmolsarma.in>
Date: Sat,  3 Jun 2017 17:40:54 +0530

> Update tcp.txt to fix mandatory congestion control ops and default
> CCA selection. Also, fix comment in tcp.h for undo_cwnd.
> 
> Signed-off-by: Anmol Sarma <me@anmolsarma.in>

Applied, thank you.

^ permalink raw reply

* [patch iproute2/net-next] tc: add support for TRAP action
From: Jiri Pirko @ 2017-06-05 14:39 UTC (permalink / raw)
  To: netdev
  Cc: davem, jhs, xiyou.wangcong, edumazet, alexander.h.duyck, stephen,
	daniel, mlxsw
In-Reply-To: <20170605143832.7025-1-jiri@resnulli.us>

From: Jiri Pirko <jiri@mellanox.com>

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 include/linux/pkt_cls.h | 5 +++++
 tc/tc_util.c            | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h
index c6e8cf5..477ed05 100644
--- a/include/linux/pkt_cls.h
+++ b/include/linux/pkt_cls.h
@@ -37,6 +37,11 @@ enum {
 #define TC_ACT_QUEUED		5
 #define TC_ACT_REPEAT		6
 #define TC_ACT_REDIRECT		7
+#define TC_ACT_TRAP		8 /* For hw path, this means "trap to cpu",
+				   * for sw path, this is equivalent of
+				   * TC_ACT_STOLEN - drop the skb and act
+				   * like everything is allright.
+				   */
 
 /* There is a special kind of actions called "extended actions",
  * which need a value parameter. These have a local opcode located in
diff --git a/tc/tc_util.c b/tc/tc_util.c
index 4f7283d..5a0f96a 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -430,6 +430,8 @@ static const char *action_n2a(int action)
 		return "pipe";
 	case TC_ACT_STOLEN:
 		return "stolen";
+	case TC_ACT_TRAP:
+		return "trap";
 	default:
 		snprintf(buf, 64, "%d", action);
 		buf[63] = '\0';
@@ -462,6 +464,7 @@ static int action_a2n(char *arg, int *result, bool allow_num)
 		{"reclassify", TC_ACT_RECLASSIFY},
 		{"pipe", TC_ACT_PIPE},
 		{"goto", TC_ACT_GOTO_CHAIN},
+		{"trap", TC_ACT_TRAP},
 		{ NULL },
 	}, *iter;
 
-- 
2.9.3

^ permalink raw reply related

* [patch net-next 6/6] spectrum_flower: Implement gact trap TC action offload
From: Jiri Pirko @ 2017-06-05 14:38 UTC (permalink / raw)
  To: netdev
  Cc: davem, jhs, xiyou.wangcong, edumazet, alexander.h.duyck, stephen,
	daniel, mlxsw
In-Reply-To: <20170605143832.7025-1-jiri@resnulli.us>

From: Jiri Pirko <jiri@mellanox.com>

Just use the previously prepared infrastructure and offload the gact
trap action to ACL.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Yotam Gigi <yotamg@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
index 13af8e3..21bb2bf 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
@@ -67,6 +67,10 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
 			err = mlxsw_sp_acl_rulei_act_drop(rulei);
 			if (err)
 				return err;
+		} else if (is_tcf_gact_trap(a)) {
+			err = mlxsw_sp_acl_rulei_act_trap(rulei);
+			if (err)
+				return err;
 		} else if (is_tcf_mirred_egress_redirect(a)) {
 			int ifindex = tcf_mirred_ifindex(a);
 			struct net_device *out_dev;
-- 
2.9.3

^ permalink raw reply related

* [patch net-next 5/6] acl: Introduce ACL trap action
From: Jiri Pirko @ 2017-06-05 14:38 UTC (permalink / raw)
  To: netdev
  Cc: davem, jhs, xiyou.wangcong, edumazet, alexander.h.duyck, stephen,
	daniel, mlxsw
In-Reply-To: <20170605143832.7025-1-jiri@resnulli.us>

From: Jiri Pirko <jiri@mellanox.com>

Use trap/discard flex action to implement trap.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Yotam Gigi <yotamg@mellanox.com>
---
 .../mellanox/mlxsw/core_acl_flex_actions.c         | 40 ++++++++++++++++++++--
 .../mellanox/mlxsw/core_acl_flex_actions.h         |  1 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum.h     |  1 +
 drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c |  5 +++
 4 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
index 46304ff..5ae1101 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.c
@@ -40,6 +40,7 @@
 #include <linux/list.h>
 
 #include "item.h"
+#include "trap.h"
 #include "core_acl_flex_actions.h"
 
 enum mlxsw_afa_set_type {
@@ -662,6 +663,16 @@ EXPORT_SYMBOL(mlxsw_afa_block_append_vlan_modify);
 #define MLXSW_AFA_TRAPDISC_CODE 0x03
 #define MLXSW_AFA_TRAPDISC_SIZE 1
 
+enum mlxsw_afa_trapdisc_trap_action {
+	MLXSW_AFA_TRAPDISC_TRAP_ACTION_NOP = 0,
+	MLXSW_AFA_TRAPDISC_TRAP_ACTION_TRAP = 2,
+};
+
+/* afa_trapdisc_trap_action
+ * Trap Action.
+ */
+MLXSW_ITEM32(afa, trapdisc, trap_action, 0x00, 24, 4);
+
 enum mlxsw_afa_trapdisc_forward_action {
 	MLXSW_AFA_TRAPDISC_FORWARD_ACTION_DISCARD = 3,
 };
@@ -671,11 +682,20 @@ enum mlxsw_afa_trapdisc_forward_action {
  */
 MLXSW_ITEM32(afa, trapdisc, forward_action, 0x00, 0, 4);
 
+/* afa_trapdisc_trap_id
+ * Trap ID to configure.
+ */
+MLXSW_ITEM32(afa, trapdisc, trap_id, 0x04, 0, 9);
+
 static inline void
 mlxsw_afa_trapdisc_pack(char *payload,
-			enum mlxsw_afa_trapdisc_forward_action forward_action)
+			enum mlxsw_afa_trapdisc_trap_action trap_action,
+			enum mlxsw_afa_trapdisc_forward_action forward_action,
+			u16 trap_id)
 {
+	mlxsw_afa_trapdisc_trap_action_set(payload, trap_action);
 	mlxsw_afa_trapdisc_forward_action_set(payload, forward_action);
+	mlxsw_afa_trapdisc_trap_id_set(payload, trap_id);
 }
 
 int mlxsw_afa_block_append_drop(struct mlxsw_afa_block *block)
@@ -686,11 +706,27 @@ int mlxsw_afa_block_append_drop(struct mlxsw_afa_block *block)
 
 	if (!act)
 		return -ENOBUFS;
-	mlxsw_afa_trapdisc_pack(act, MLXSW_AFA_TRAPDISC_FORWARD_ACTION_DISCARD);
+	mlxsw_afa_trapdisc_pack(act, MLXSW_AFA_TRAPDISC_TRAP_ACTION_NOP,
+				MLXSW_AFA_TRAPDISC_FORWARD_ACTION_DISCARD, 0);
 	return 0;
 }
 EXPORT_SYMBOL(mlxsw_afa_block_append_drop);
 
+int mlxsw_afa_block_append_trap(struct mlxsw_afa_block *block)
+{
+	char *act = mlxsw_afa_block_append_action(block,
+						  MLXSW_AFA_TRAPDISC_CODE,
+						  MLXSW_AFA_TRAPDISC_SIZE);
+
+	if (!act)
+		return -ENOBUFS;
+	mlxsw_afa_trapdisc_pack(act, MLXSW_AFA_TRAPDISC_TRAP_ACTION_TRAP,
+				MLXSW_AFA_TRAPDISC_FORWARD_ACTION_DISCARD,
+				MLXSW_TRAP_ID_ACL0);
+	return 0;
+}
+EXPORT_SYMBOL(mlxsw_afa_block_append_trap);
+
 /* Forwarding Action
  * -----------------
  * Forwarding Action can be used to implement Policy Based Switching (PBS)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h
index bd8b91d..f99c341 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/core_acl_flex_actions.h
@@ -60,6 +60,7 @@ u32 mlxsw_afa_block_first_set_kvdl_index(struct mlxsw_afa_block *block);
 void mlxsw_afa_block_continue(struct mlxsw_afa_block *block);
 void mlxsw_afa_block_jump(struct mlxsw_afa_block *block, u16 group_id);
 int mlxsw_afa_block_append_drop(struct mlxsw_afa_block *block);
+int mlxsw_afa_block_append_trap(struct mlxsw_afa_block *block);
 int mlxsw_afa_block_append_fwd(struct mlxsw_afa_block *block,
 			       u8 local_port, bool in_port);
 int mlxsw_afa_block_append_vlan_modify(struct mlxsw_afa_block *block,
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
index 99760fd..4a7a39a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h
@@ -460,6 +460,7 @@ void mlxsw_sp_acl_rulei_act_continue(struct mlxsw_sp_acl_rule_info *rulei);
 void mlxsw_sp_acl_rulei_act_jump(struct mlxsw_sp_acl_rule_info *rulei,
 				 u16 group_id);
 int mlxsw_sp_acl_rulei_act_drop(struct mlxsw_sp_acl_rule_info *rulei);
+int mlxsw_sp_acl_rulei_act_trap(struct mlxsw_sp_acl_rule_info *rulei);
 int mlxsw_sp_acl_rulei_act_fwd(struct mlxsw_sp *mlxsw_sp,
 			       struct mlxsw_sp_acl_rule_info *rulei,
 			       struct net_device *out_dev);
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
index 1da889a..01a1501 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
@@ -347,6 +347,11 @@ int mlxsw_sp_acl_rulei_act_drop(struct mlxsw_sp_acl_rule_info *rulei)
 	return mlxsw_afa_block_append_drop(rulei->act_block);
 }
 
+int mlxsw_sp_acl_rulei_act_trap(struct mlxsw_sp_acl_rule_info *rulei)
+{
+	return mlxsw_afa_block_append_trap(rulei->act_block);
+}
+
 int mlxsw_sp_acl_rulei_act_fwd(struct mlxsw_sp *mlxsw_sp,
 			       struct mlxsw_sp_acl_rule_info *rulei,
 			       struct net_device *out_dev)
-- 
2.9.3

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox