Re: [PATCH rdma-next 1/8] RDMA/core: Check if client supports IB device or not

2021-04-04 Thread Gal Pressman
On 05/04/2021 8:49, Leon Romanovsky wrote: > From: Parav Pandit > > RDMA devices are of different transport(iWarp, IB, RoCE) and have > different attributes. > Not all clients are interested in all type of devices. > > Implement a generic callback that each IB client can implement to decide > if

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-22 Thread Gal Pressman
On 22/09/2020 19:14, Jason Gunthorpe wrote: > On Tue, Sep 22, 2020 at 03:46:29PM +0300, Gal Pressman wrote: > >> I agree, that makes sense. >> But assuming Oded actually goes and implements all the needed verbs to get a >> basic functional libibverbs provider (assuming th

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-22 Thread Gal Pressman
On 22/09/2020 14:41, Jason Gunthorpe wrote: > On Mon, Sep 21, 2020 at 02:22:02PM +0300, Gal Pressman wrote: > >> What is considered a RoCE port in this case if it's not compliant with RoCE? >> Sounds like it's an implementation of RDMA over ethernet, not RoCE. >&g

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-21 Thread Gal Pressman
On 18/09/2020 18:28, Jason Gunthorpe wrote: > On Fri, Sep 18, 2020 at 06:15:52PM +0300, Oded Gabbay wrote: > >> I'm sorry, but you won't be able to convince me here that I need to >> "enslave" my entire code to RDMA, just because my ASIC "also" has some >> RDMA ports. > > You can't recreate commo

Re: [PATCH v3 00/14] Adding GAUDI NIC code to habanalabs driver

2020-09-18 Thread Gal Pressman
On 17/09/2020 20:18, Jason Gunthorpe wrote: > On Tue, Sep 15, 2020 at 11:46:58PM +0300, Oded Gabbay wrote: >> infrastructure for communication between multiple accelerators. Same >> as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. >> The RDMA implementation we did does NOT support s

Re: [RDMA RFC v6 14/16] RDMA/irdma: Add ABI definitions

2020-05-20 Thread Gal Pressman
On 20/05/2020 11:52, Greg KH wrote: > On Wed, May 20, 2020 at 10:54:25AM +0300, Gal Pressman wrote: >> On 20/05/2020 10:04, Jeff Kirsher wrote: >>> +struct i40iw_create_qp_resp { >>> + __u32 qp_id; >>> + __u32 actual_sq_size; >>> + __u3

Re: [RDMA RFC v6 14/16] RDMA/irdma: Add ABI definitions

2020-05-20 Thread Gal Pressman
On 20/05/2020 10:04, Jeff Kirsher wrote: > +struct i40iw_create_qp_resp { > + __u32 qp_id; > + __u32 actual_sq_size; > + __u32 actual_rq_size; > + __u32 i40iw_drv_opt; > + __u16 push_idx; > + __u8 lsmm; > + __u8 rsvd; > +}; This struct size should be 8 bytes aligned.

Re: [RDMA RFC v6 16/16] RDMA/irdma: Update MAINTAINERS file

2020-05-20 Thread Gal Pressman
On 20/05/2020 10:04, Jeff Kirsher wrote: > From: Shiraz Saleem > > Add maintainer entry for irdma driver. > > Signed-off-by: Mustafa Ismail > Signed-off-by: Shiraz Saleem > --- > MAINTAINERS | 8 > 1 file changed, 8 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 59

Re: [PATCH V6 mlx5-next 10/16] RDMA: Group create AH arguments in struct

2020-04-28 Thread Gal Pressman
gt;flags & RDMA_CREATE_AH_SLEEPABLE)) { > ibdev_dbg(&dev->ibdev, > "Create address handle is not supported in atomic > context\n"); > err = -EOPNOTSUPP; EFA part looks good, Acked-by: Gal Pressman

Re: [PATCH iproute2-next] rdma: Add driver QP type string

2019-08-05 Thread Gal Pressman
On 05/08/2019 22:08, David Ahern wrote: > On 8/4/19 2:07 AM, Gal Pressman wrote: >> RDMA resource tracker now tracks driver QPs as well, add driver QP type >> string to qp_types_to_str function. > > "now" means which kernel release? Leon: should this be in master or

[PATCH iproute2-next] rdma: Add driver QP type string

2019-08-04 Thread Gal Pressman
RDMA resource tracker now tracks driver QPs as well, add driver QP type string to qp_types_to_str function. Signed-off-by: Gal Pressman --- rdma/res.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rdma/res.c b/rdma/res.c index ef863f142eca..97a7b9640185 100644 --- a

Re: [PATCH rdma-next 2/3] IB/mlx5: Expose ODP for DC capabilities to user

2019-08-01 Thread Gal Pressman
On 01/08/2019 15:21, Leon Romanovsky wrote: > enum mlx5_user_cmds_supp_uhw { > @@ -147,6 +148,7 @@ struct mlx5_ib_alloc_ucontext_resp { > __u32 num_uars_per_page; > __u32 num_dyn_bfregs; > __u32 dump_fill_mkey; > + __u32 dc_odp_caps; This should be padded to 64 bits.

Re: [PATCH v6 rdma-next 1/6] RDMA/core: Create mmap database and cookie helper functions

2019-07-29 Thread Gal Pressman
On 29/07/2019 15:58, Michal Kalderon wrote: >> From: linux-rdma-ow...@vger.kernel.org > ow...@vger.kernel.org> On Behalf Of Jason Gunthorpe >> >>> + xa_lock(&ucontext->mmap_xa); >>> + if (check_add_overflow(ucontext->mmap_xa_page, >>> + (u32)(length >> PAGE_SHIFT), >>>

Re: [PATCH v6 rdma-next 1/6] RDMA/core: Create mmap database and cookie helper functions

2019-07-28 Thread Gal Pressman
On 26/07/2019 16:23, Jason Gunthorpe wrote: > On Fri, Jul 26, 2019 at 08:42:07AM +, Michal Kalderon wrote: > But we don't free entires from the xa_array ( only when ucontext is destroyed) so how will There be an empty element after we wrap ? >>> >>> Oh! >>> >>> That should be fixed u

Re: [PATCH iproute2-rc 8/8] rdma: Document counter statistic

2019-07-16 Thread Gal Pressman
On 10/07/2019 10:24, Leon Romanovsky wrote: > +.SH "EXAMPLES" > +.PP > +rdma statistic show > +.RS 4 > +Shows the state of the default counter of all RDMA devices on the system. > +.RE > +.PP > +rdma statistic show link mlx5_2/1 > +.RS 4 > +Shows the state of the default counter of specified RDMA p

Re: [PATCH v6 rdma-next 1/6] RDMA/core: Create mmap database and cookie helper functions

2019-07-10 Thread Gal Pressman
Signed-off-by: Ariel Elior > Signed-off-by: Michal Kalderon Reviewed-by: Gal Pressman

Re: [PATCH v6 rdma-next 2/6] RDMA/efa: Use the common mmap_xa helpers

2019-07-10 Thread Gal Pressman
On 09/07/2019 17:17, Michal Kalderon wrote: > Remove the functions related to managing the mmap_xa database. > This code was copied to the ib_core. Use the common API's instead. > > Signed-off-by: Ariel Elior > Signed-off-by: Michal Kalderon Thanks Michal, Acked-by: Gal Pressman

Re: [PATCH v6 rdma-next 0/6] RDMA/qedr: Use the doorbell overflow recovery mechanism for RDMA

2019-07-10 Thread Gal Pressman
cision is made, I only created the database API and modified > the efa and qedr driver to use it. The doorbell recovery code will be based > on the common code. > > Efa driver was compile tested only. For the whole series: Tested-by: Gal Pressman

Re: [PATCH v5 rdma-next 2/6] RDMA/efa: Use the common mmap_xa helpers

2019-07-09 Thread Gal Pressman
On 08/07/2019 12:14, Michal Kalderon wrote: Hi, a few nits: > Remove the functions related to managing the mmap_xa database. > This code was copied to the ib_core. Use the common API's instead. > > Signed-off-by: Michal Kalderon > --- > drivers/infiniband/hw/efa/efa.h | 3 +- > drivers

Re: [PATCH v5 rdma-next 1/6] RDMA/core: Create mmap database and cookie helper functions

2019-07-08 Thread Gal Pressman
On 08/07/2019 12:14, Michal Kalderon wrote: > diff --git a/drivers/infiniband/core/device.c > b/drivers/infiniband/core/device.c > index 8a6ccb936dfe..a830c2c5d691 100644 > --- a/drivers/infiniband/core/device.c > +++ b/drivers/infiniband/core/device.c > @@ -2521,6 +2521,7 @@ void ib_set_device_op

Re: [PATCH iproute2] rdma: Update node type strings

2019-05-19 Thread Gal Pressman
On 15/05/2019 9:58, Gal Pressman wrote: > Fix typo in usnic_udp node type and add a string for the unspecified > node type. > > Signed-off-by: Gal Pressman > --- > rdma/dev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/rdma/dev.c b/rdma

[PATCH iproute2] rdma: Update node type strings

2019-05-14 Thread Gal Pressman
Fix typo in usnic_udp node type and add a string for the unspecified node type. Signed-off-by: Gal Pressman --- rdma/dev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rdma/dev.c b/rdma/dev.c index 339625202200..904836221c1b 100644 --- a/rdma/dev.c +++ b/rdma/dev.c

Re: [net-next 06/14] net/mlx5e: XDP, Inline small packets into the TX MPWQE in XDP xmit flow

2019-04-23 Thread Gal Pressman
On 23-Apr-19 01:32, Saeed Mahameed wrote: > static inline void > -mlx5e_xdp_mpwqe_add_dseg(struct mlx5e_xdpsq *sq, dma_addr_t dma_addr, u16 > dma_len) > +mlx5e_xdp_mpwqe_add_dseg(struct mlx5e_xdpsq *sq, struct mlx5e_xdp_info *xdpi, > + struct mlx5e_xdpsq_stats *stats) Passin

Re: [net-next 13/15] net/mlx5: A write memory barrier is sufficient in EQ ci update

2019-04-04 Thread Gal Pressman
On 03-Apr-19 02:03, Saeed Mahameed wrote: > From: Tariq Toukan > > Soften the memory barrier call of mb() by a sufficient wmb() in the > consumer index update of the event queues. > > Signed-off-by: Tariq Toukan > Signed-off-by: Saeed Mahameed > --- > drivers/net/ethernet/mellanox/mlx5/core/e

Re: [RFC v1 12/19] RDMA/irdma: Implement device supported verb APIs

2019-02-26 Thread Gal Pressman
t; +static int irdma_modify_port(struct ib_device *ibdev, >>> +u8 port, >>> +int port_modify_mask, >>> + struct ib_port_modify *props) { >>> + return 0; >>> +} >> >> Same question as disacossiate_ucontext. > > This was likely added during early dev. and can be removed. > >> >>> + >>> +/** >>> + * irdma_query_gid_roce - Query port GID for Roce >>> + * @ibdev: device pointer from stack >>> + * @port: port number >>> + * @index: Entry index >>> + * @gid: Global ID >>> + */ >>> +static int irdma_query_gid_roce(struct ib_device *ibdev, >>> + u8 port, >>> + int index, >>> + union ib_gid *gid) >>> +{ >>> + int ret; >>> + >>> + ret = rdma_query_gid(ibdev, port, index, gid); >>> + if (ret == -EAGAIN) { >> >> I can't see a path where rdma_query_gid returns -EAGAIN. > > This function can be removed now. It's only applicable to non-Roce providers. > >> >>> + memcpy(gid, &zgid, sizeof(*gid)); >>> + return 0; >>> + } >>> + >>> + return ret; >>> +} >>> + >> >>> +/** >>> + * irdma_create_ah - create address handle >>> + * @ibpd: ptr to protection domain >>> + * @ah_attr: address handle attributes >> >> 'ah_attr' -> 'attr', missing flags and udata. > > Will fix all these hits in the driver. > > [..] >>> + */ >>> +static int irdma_destroy_ah(struct ib_ah *ibah, u32 flags) { >>> + struct irdma_device *iwdev = to_iwdev(ibah->device); >>> + struct irdma_ah *ah = to_iwah(ibah); >>> + int err; >>> + >>> + if (!ah->sc_ah.ah_info.ah_valid) >>> + return -EINVAL; >>> + >>> + err = irdma_ah_cqp_op(iwdev->rf, &ah->sc_ah, >> IRDMA_OP_AH_DESTROY, >>> + flags & RDMA_DESTROY_AH_SLEEPABLE, >>> + irdma_destroy_ah_cb, ah); >>> + if (!err) >>> + return 0; >> >> Why are the rest of the cleanups only in case of error? > > On success, the cleanup is done in the callback, irdma_destroy_ah_cb. > > [...] > > >>> +static __be64 irdma_mac_to_guid(struct net_device *ndev) { >>> + unsigned char *mac = ndev->dev_addr; >>> + __be64 guid; >>> + unsigned char *dst = (unsigned char *)&guid; >>> + >>> + dst[0] = mac[0] ^ 2; >>> + dst[1] = mac[1]; >>> + dst[2] = mac[2]; >>> + dst[3] = 0xff; >>> + dst[4] = 0xfe; >>> + dst[5] = mac[3]; >>> + dst[6] = mac[4]; >>> + dst[7] = mac[5]; >>> + >>> + return guid; >>> +} >> >> There's a variant of this function in irdma, bnxt_re, ocrdma and qedr. >> Maybe it's time to provide it in common code? > > Agreed. > Other than that: Reviewed-by: Gal Pressman

Re: [RFC v1 04/19] RDMA/irdma: Add driver framework definitions

2019-02-24 Thread Gal Pressman
On 15-Feb-19 19:10, Shiraz Saleem wrote: > +/* client interface functions */ > +static const struct i40e_client_ops i40e_ops = { > + .open = i40iw_open, > + .close = i40iw_close, > + .l2_param_change = i40iw_l2param_change, > + .virtchnl_receive = NULL, > + .vf_reset = NULL, > +

Re: [RFC v1 12/19] RDMA/irdma: Implement device supported verb APIs

2019-02-24 Thread Gal Pressman
On 15-Feb-19 19:10, Shiraz Saleem wrote: > /** > * irdma_dealloc_ucontext - deallocate the user context data structure > * @context: user context created during alloc > */ > static int irdma_dealloc_ucontext(struct ib_ucontext *context) > { > struct irdma_ucontext *ucontext = to_ucontext(c

Re: [RFC v1 08/19] RDMA/irdma: Add privileged UDA queue implementation

2019-02-24 Thread Gal Pressman
On 15-Feb-19 19:10, Shiraz Saleem wrote: > +/** > + * irdma_puda_poll_info - poll cq for completion > + * @cq: cq for poll > + * @info: info return for successful completion > + */ > +static enum irdma_status_code > +irdma_puda_poll_info(struct irdma_sc_cq *cq, struct irdma_puda_cmpl_info > *info)

Re: [RFC v1 10/19] RDMA/irdma: Add connection manager

2019-02-24 Thread Gal Pressman
On 15-Feb-19 19:10, Shiraz Saleem wrote: > +/** > + * irdma_cm_teardown_connections - teardown QPs > + * @iwdev: device pointer > + * @ipaddr: Pointer to IPv4 or IPv6 address > + * @ipv4: flag indicating IPv4 when true There is no ipv4 parameter. > + * @disconnect_all: flag indicating disconnect

Re: rfc: bool structure members (was Re: [PATCH V3] net/mlx4: Get rid of page operation after dma_alloc_coherent)

2018-12-25 Thread Gal Pressman
On 25-Dec-18 01:12, Jason Gunthorpe wrote: > On Sun, Dec 23, 2018 at 06:42:20PM +0200, Gal Pressman wrote: >> On 22-Dec-18 01:52, Jason Gunthorpe wrote: >>> On Thu, Dec 20, 2018 at 09:12:43PM -0800, Joe Perches wrote: >>>> Care to submit a coding_style.rst patch or &

Re: rfc: bool structure members (was Re: [PATCH V3] net/mlx4: Get rid of page operation after dma_alloc_coherent)

2018-12-23 Thread Gal Pressman
On 22-Dec-18 01:52, Jason Gunthorpe wrote: > On Thu, Dec 20, 2018 at 09:12:43PM -0800, Joe Perches wrote: >> Care to submit a coding_style.rst patch or >> improve the one below this? > > I took yours and revised it a little bit. I spent some time looking at > assembly and decided to drop the perfo

[PATCH net-next 1/2] net/mlx5e: Cleanup unused defines

2018-11-07 Thread Gal Pressman
Remove couple of defines that are no longer used. Signed-off-by: Gal Pressman --- drivers/net/ethernet/mellanox/mlx5/core/en.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h index d7fbd5b6ac95

[PATCH net-next 2/2] net/mlx5: Fix offsets of ifc reserved fields

2018-11-07 Thread Gal Pressman
Fix wrong offsets of reserved fields in ifc file. Issues found using pahole. Signed-off-by: Gal Pressman --- include/linux/mlx5/mlx5_ifc.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index

Re: [PATCH v2] net/mlx5: Delete unneeded function argument

2018-08-16 Thread Gal Pressman
On 16-Aug-18 12:00, Yuval Shaia wrote: > On Thu, Aug 16, 2018 at 09:41:34AM +0300, Gal Pressman wrote: >> On 15-Aug-18 18:08, Yuval Shaia wrote: >>> priv argument is not used by the function, delete it. >>> >>> Fixes: a89842811ea98 ("net/mlx5e: Merge per

Re: [PATCH v2] net/mlx5: Delete unneeded function argument

2018-08-15 Thread Gal Pressman
On 15-Aug-18 18:08, Yuval Shaia wrote: > priv argument is not used by the function, delete it. > > Fixes: a89842811ea98 ("net/mlx5e: Merge per priority stats groups") > Signed-off-by: Yuval Shaia nit: prefix should be net/mlx5e. > --- > v1 -> v2: > * Remove blank line as pointed by Leon.

[PATCH net] net: ena: Fix use of uninitialized DMA address bits field

2018-07-26 Thread Gal Pressman
et: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Gal Pressman --- drivers/net/ethernet/amazon/ena/ena_com.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/amazon/ena/ena_com.c b/drivers/net/ethernet/amazon/ena/ena_com.c index 1b9d3130a

Re: [PATCH ethtool 5/6] ethtool: correctly free hkey when get_stringset() fails

2018-06-08 Thread Gal Pressman
12 characters of the sha1 in the Fixes line. > Cc: Gal Pressman > Signed-off-by: Ivan Vecera > --- > ethtool.c | 13 ++--- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/ethtool.c b/ethtool.c > index 2b90984..fb93ae8 100644 > --- a/eth

[PATCH net-next] net: Call add/kill vid ndo on vlan filter feature toggling

2018-03-28 Thread Gal Pressman
gly. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan --- include/linux/if_vlan.h | 24 +++ include/linux/netdevice.h | 4 ++ net/8021q/vlan.c | 21 ++ net/8021q/vlan.h | 3 ++ net/8021q/vlan_core.c |

Re: [net-next 03/15] net/mlx5e: PFC stall prevention support

2018-03-27 Thread Gal Pressman
On 25-Mar-18 19:18, Andrew Lunn wrote: >>> Shouldn't you map a value of MLX5E_PFC_PREVEN_AUTO_TOUT_MSEC back to >>> PFC_STORM_PREVENTION_AUTO? >> >> We discussed this point internally, mapping MLX5E_PFC_PREVEN_AUTO_TOUT_MSEC >> (100) to >> PFC_STORM_PREVENTION_AUTO might cause confusion when the

Re: [net-next 02/15] ethtool: Add support for configuring PFC stall prevention in ethtool

2018-03-25 Thread Gal Pressman
On 24-Mar-18 17:57, Andrew Lunn wrote: > On Fri, Mar 23, 2018 at 03:39:12PM -0700, Saeed Mahameed wrote: >> From: Inbar Karmy >> >> In the event where the device unexpectedly becomes unresponsive >> for a long period of time, flow control mechanism may propagate >> pause frames which will cause co

Re: [net-next 03/15] net/mlx5e: PFC stall prevention support

2018-03-25 Thread Gal Pressman
On 24-Mar-18 18:07, Andrew Lunn wrote: > On Fri, Mar 23, 2018 at 03:39:13PM -0700, Saeed Mahameed wrote: >> From: Inbar Karmy >> >> Implement set/get functions to configure PFC stall prevention >> timeout by tunables api through ethtool. >> By default the stall prevention timeout is configured to

[PATCH net-next] net: Make RX-FCS and HW GRO mutually exclusive

2018-03-12 Thread Gal Pressman
Same as LRO, hardware GRO cannot be enabled with RX-FCS. When both are requested, hardware GRO will be dropped. Suggested-by: David Miller Signed-off-by: Gal Pressman --- net/core/dev.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/net/core/dev.c b/net

Re: [PATCH net-next] net: Make RX-FCS and LRO mutually exclusive

2018-03-05 Thread Gal Pressman
On 05-Mar-18 17:27, David Miller wrote: > From: Gal Pressman > Date: Sun, 4 Mar 2018 14:12:04 +0200 > >> LRO and RX-FCS offloads cannot be enabled at the same time since it is >> not clear what should happen to the FCS of each coalesced packet. >> The FCS is not rea

[PATCH net-next] net: Make RX-FCS and LRO mutually exclusive

2018-03-04 Thread Gal Pressman
: on Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan --- net/core/dev.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index c9d3058..1bc3792 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -7542,6 +7542,12 @@ static netdev_features_t

[PATCH net-next] net: Fix spelling mistake "greater then" -> "greater than"

2018-02-28 Thread Gal Pressman
Fix trivial spelling mistake "greater then" -> "greater than". Signed-off-by: Gal Pressman --- include/net/sch_generic.h | 2 +- net/core/dev.c| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/sch_generic.h b/include/net/sch_

Re: after adding > 200vlans to mlx nic no traffic

2018-02-04 Thread Gal Pressman
On 01-Feb-18 10:25, Paweł Staszewski wrote: > > > W dniu 31.01.2018 o 13:19, Gal Pressman pisze: >> On 30-Jan-18 17:57, Paweł Staszewski wrote: >>> >>> W dniu 30.01.2018 o 15:57, Gal Pressman pisze: >>>> On 30-Jan-18 02:29, Paweł Staszewski wrote: >

Re: after adding > 200vlans to mlx nic no traffic

2018-01-31 Thread Gal Pressman
On 30-Jan-18 17:57, Paweł Staszewski wrote: > > > W dniu 30.01.2018 o 15:57, Gal Pressman pisze: >> On 30-Jan-18 02:29, Paweł Staszewski wrote: >>> Weird thing with mellanox mlx5 (connectx-4) kernel 4.15-rc9 - from net-next >>> davem tree >>> &

Re: after adding > 200vlans to mlx nic no traffic

2018-01-30 Thread Gal Pressman
On 30-Jan-18 02:29, Paweł Staszewski wrote: > Weird thing with mellanox mlx5 (connectx-4) kernel 4.15-rc9 - from net-next > davem tree > > > > after: > > ip link add link enp175s0f1 name vlan1538 type vlan id 1538 > > ip link set up dev vlan1538 > > > traffic on vlan is working > > > But

[PATCH iproute2 2/3] ipaddress: Make sure VF min/max rate API is supported before using it

2018-01-16 Thread Gal Pressman
m and maximum Tx rate through ip tool") Cc: Sucheta Chakraborty Signed-off-by: Gal Pressman Reviewed-by: Eran Ben Elisha Reviewed-by: Leon Romanovsky --- ip/ipaddress.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ip/ipaddress.c b/ip/ipaddress.c index f150d91..953d673 10064

[PATCH iproute2 1/3] iplink: Validate minimum tx rate is less than maximum tx rate

2018-01-16 Thread Gal Pressman
e SR-IOV VF minimum and maximum Tx rate through ip tool") Cc: Sucheta Chakraborty Signed-off-by: Gal Pressman Reviewed-by: Eran Ben Elisha Reviewed-by: Leon Romanovsky --- ip/iplink.c | 8 1 file changed, 8 insertions(+) diff --git a/ip/iplink.c b/ip/iplink.c index 4c96711..22c9

[PATCH iproute2 0/3] Fixes for minimum/maximum VF rate API

2018-01-16 Thread Gal Pressman
Hi all, The following patches will fix some issues with the "new" VF rate API, and add some clarifications to the documentation. Thanks, Gal Gal Pressman (3): iplink: Validate minimum tx rate is less than maximum tx rate ipaddress: Make sure VF min/max rate API is supported befor

[PATCH iproute2 3/3] man: Document the meaning of zero in min/max_tx_rate parameters

2018-01-16 Thread Gal Pressman
Zero value in min/max_tx_rate has a special meaning of no rate limit, document it. Signed-off-by: Gal Pressman Reviewed-by: Eran Ben Elisha Reviewed-by: Leon Romanovsky --- man/man8/ip-link.8.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/man/man8/ip-link.8.in b/man/man8/ip-link.8

Re: [PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro

2018-01-09 Thread Gal Pressman
On 09-Jan-18 05:05, David Miller wrote: > From: Joe Perches > Date: Mon, 08 Jan 2018 18:42:01 -0800 > >> On Sun, 2018-01-07 at 12:08 +0200, Gal Pressman wrote: >>> netdev_WARN_ONCE is broken (whoops..), this fix will remove the >>> unnecessary "condition

[PATCH net-next v2 2/6] net: No line break on netdev_WARN* formatting

2018-01-07 Thread Gal Pressman
] [ cut here ] [86770.265191] netdevice: enp27s0f0: Message from the driver [...] Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed --- include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/netdevice.h b/include

[PATCH net-next v2 1/6] net: Fix netdev_WARN_ONCE macro

2018-01-07 Thread Gal Pressman
netdev_WARN_ONCE is broken (whoops..), this fix will remove the unnecessary "condition" parameter, add the missing comma and change "arg" to "args". Fixes: 375ef2b1f0d0 ("net: Introduce netdev_*_once functions") Signed-off-by: Gal Pressman Reviewe

[PATCH net-next v2 6/6] 8139cp: Replace WARN_ONCE with netdev_WARN_ONCE

2018-01-07 Thread Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro. Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed Cc: Realtek linux nic maintainers --- drivers/net/ethernet/realtek/8139cp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH net-next v2 3/6] net/mlx5e: Replace WARN_ONCE with netdev_WARN_ONCE

2018-01-07 Thread Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro. Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core

[PATCH net-next v2 5/6] bnx2x: Replace WARN_ONCE with netdev_WARN_ONCE

2018-01-07 Thread Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro. Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed Cc: Ariel Elior --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next v2 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE

2018-01-07 Thread Gal Pressman
Hi, This series will fix an issue in netdev_WARN_ONCE, improve its formatting and replace drivers' usage of WARN_ONCE to netdev_WARN_ONCE. Driver specific patches were compilation tested, in addition, functional tested on Mellanox NIC. v1->v2: - Addressed commit message comments in patch

[PATCH net-next v2 4/6] e1000: Replace WARN_ONCE with netdev_WARN_ONCE

2018-01-07 Thread Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro. Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed Cc: Jeff Kirsher --- drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet

Re: [PATCH net-next 1/6] net: Fix netdev_WARN_ONCE macro

2018-01-07 Thread Gal Pressman
On 05-Jan-18 20:35, David Miller wrote: > From: Gal Pressman > Date: Thu, 4 Jan 2018 16:55:58 +0200 > >> netdev_WARN_ONCE is broken (whoops..), fix it. > > You don't say how it is broken and how you are fixing that > brokenness, and you must do this. > >

[PATCH net-next 5/6] bnx2x: Replace WARN_ONCE with netdev_WARN_ONCE

2018-01-04 Thread Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro. Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed Cc: Ariel Elior --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 6/6] 8139cp: Replace WARN_ONCE with netdev_WARN_ONCE

2018-01-04 Thread Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro. Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed Cc: Realtek linux nic maintainers --- drivers/net/ethernet/realtek/8139cp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net

[PATCH net-next 4/6] e1000: Replace WARN_ONCE with netdev_WARN_ONCE

2018-01-04 Thread Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro. Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed Cc: Jeff Kirsher --- drivers/net/ethernet/intel/e1000/e1000_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet

[PATCH net-next 3/6] net/mlx5e: Replace WARN_ONCE with netdev_WARN_ONCE

2018-01-04 Thread Gal Pressman
Use the more appropriate netdev_WARN_ONCE instead of WARN_ONCE macro. Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core

[PATCH net-next 2/6] net: No line break on netdev_WARN* formatting

2018-01-04 Thread Gal Pressman
] [ cut here ] [86770.265191] netdevice: enp27s0f0: Message from the driver [...] Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed --- include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/netdevice.h b/include

[PATCH net-next 1/6] net: Fix netdev_WARN_ONCE macro

2018-01-04 Thread Gal Pressman
netdev_WARN_ONCE is broken (whoops..), fix it. Fixes: 375ef2b1f0d0 ("net: Introduce netdev_*_once functions") Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed --- include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/n

[PATCH net-next 0/6] Replace WARN_ONCE usages with netdev_WARN_ONCE

2018-01-04 Thread Gal Pressman
Hi, This series will fix an issue in netdev_WARN_ONCE, improve its formatting and replace drivers' usage of WARN_ONCE to netdev_WARN_ONCE. Driver specific patches were compilation tested, in addition, functional tested on Mellanox NIC. Gal Pressman (6): net: Fix netdev_WARN_ONCE macro

gso_type field for LRO packets

2017-12-12 Thread Gal Pressman
Hi all, I've been exploring hardware LRO related code in the stack and came across an inconsistency I don't quite understand. When receiving a hardware LRO packet, most of the drivers set skb_shinfo(skb)->gso_type (For example [1]) in order to prevent macvtap from breaking. According to include/

Re: [PATCH] ethtool: Add ETHTOOL_RESET support via --reset command

2017-12-05 Thread Gal Pressman
On 04-Dec-17 22:16, Scott Branden wrote: > Hi Gal, > > I do not understand you're comment - questions inline > > > On 17-12-03 12:07 AM, Gal Pressman wrote: >> On 30-Nov-17 21:24, Scott Branden wrote: >>> Add ETHTOOL_RESET support via --reset command

Re: [PATCH] ethtool: Add ETHTOOL_RESET support via --reset command

2017-12-03 Thread Gal Pressman
On 30-Nov-17 21:24, Scott Branden wrote: > Add ETHTOOL_RESET support via --reset command. > > ie. ethtool --reset DEVNAME > > flagnames currently match the ETH_RESET_xxx names: > mgmt,irq,dma,filter,offload,mac,phy,ram,dedicated,all > > Alternatively, you can specific component bitfield directly

[PATCH ethtool] ethtool: Add extended compliance codes parsing to sfp modules

2017-11-19 Thread Gal Pressman
Update parsing according to SFP28 spec with extended compliance codes. SFF-8472, SFF-8024 specify the description of module capability present in the 36th byte. Signed-off-by: Gal Pressman Reviewed-by: Eran Ben Elisha --- sfpid.c | 25 +++-- 1 file changed, 23 insertions

[PATCH ethtool] ethtool: Fix coding style warnings and errors reported by checkpatch

2017-10-26 Thread Gal Pressman
Checkpatch had a lot to say about ethtool.c, this will handle a lot of the reported issues. Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan --- ethtool.c | 189 +- 1 file changed, 89 insertions(+), 100 deletions(-) diff --git a

Re: Ethtool question

2017-10-17 Thread Gal Pressman
On 16-Oct-17 21:10, Ben Greear wrote: > On 10/12/2017 03:00 PM, Roopa Prabhu wrote: >> On Thu, Oct 12, 2017 at 2:45 PM, Ben Greear wrote: >>> On 10/11/2017 01:49 PM, David Miller wrote: From: "John W. Linville" Date: Wed, 11 Oct 2017 16:44:07 -0400 > On Wed, Oct 11, 2017 a

[PATCH ethtool 2/2] ethtool.8: Document 56000 advertise link modes

2017-09-28 Thread Gal Pressman
Add the following advertise modes to the manual: 56000baseKR4 Full 56000baseCR4 Full 56000baseSR4 Full 56000baseLR4 Full Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan --- ethtool.8.in | 4 1 file changed, 4 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index de2abc8

[PATCH ethtool 0/2] Documentation fixes and additions for advertise bitmask

2017-09-28 Thread Gal Pressman
Hi John, The next two patches will fix bad formatting in the advertise modes bitmask and document four missing 56000 modes. Regards, Gal. Gal Pressman (2): ethtool.8: Fix formatting of advertise bitmask ethtool.8: Document 56000 advertise link modes ethtool.8.in | 10 +++--- 1 file

[PATCH ethtool 1/2] ethtool.8: Fix formatting of advertise bitmask

2017-09-28 Thread Gal Pressman
Fields should be separated with a tab instead of spaces. Also, remove an accidental ' character from 2500baseX Full mode. Fixes: 64dfc5e2f046 ("ethtool: Add support for 2500baseT/5000baseT link modes") Signed-off-by: Gal Pressman Reviewed-by: Tariq Toukan --- ethtool.8.in | 6

Re: [PATCH net-next 1/3] net: ethtool: add support for forward error correction modes

2017-06-29 Thread Gal Pressman
> Hi Gal, > > ... >> What is the difference between the information in ethtool DEVNAME and >> ethtool --show-fec DEVNAME? > I think there are two questions there. First, how does the FEC-related > information from glinksettings differ from what's retrieved via > gfecparam. Second, how is that ex

Re: [RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-26 Thread Gal Pressman
> On Wed, Jun 21, 2017 at 04:04:44PM +0300, Gal Pressman wrote: >> Currently, drivers can only tell whether the link is up/down through >> ETHTOOL_GLINK callback, but no additional information is given in case >> of link down. >> This patch provides an infrastructure

Re: [RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-26 Thread Gal Pressman
> On Sun, Jun 25, 2017 at 02:59:24PM +0300, Gal Pressman wrote: >>> On Thu, Jun 22, 2017 at 11:09:04AM +0300, Gal Pressman wrote: >>>>>> +enum { >>>>>> +ETHTOOL_LINK_VENDOR_SPECIFIC = -1, /* Vendor specific issue >>>>>>

Re: [PATCH net-next 1/3] net: ethtool: add support for forward error correction modes

2017-06-25 Thread Gal Pressman
> ... > > SHOW FEC option: > root@tor: ethtool --show-fec swp1 > FEC parameters for swp1: > Active FEC encodings: RS > Configured FEC encodings: RS | BaseR > > ETHTOOL DEVNAME output modification: > > ethtool devname output: > root@tor:~# ethtool swp1 > Settings for swp1: > root@hpe-7712-03:~# e

Re: [RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-25 Thread Gal Pressman
> On Thu, Jun 22, 2017 at 11:09:04AM +0300, Gal Pressman wrote: >>>> +enum { >>>> + ETHTOOL_LINK_VENDOR_SPECIFIC = -1, /* Vendor specific issue provided in >>>> vendor_reason */ >>>> + ETHTOOL_LINK_NO_ISSUE, /* No issue observed with link

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-23 Thread Gal Pressman
> On Thu, 22 Jun 2017 11:33:39 +0300, Gal Pressman wrote: >>> Is my reading correct that in case the reason is not in the >>> pddr2ethtool_table opaque binary data will be passed from the firmware >>> to user space? Is there any particular reason to allow for this?

Re: [RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-23 Thread Gal Pressman
>> The I2C bus that's connected to this module (interface). >> We can add another reason for MDIO BUS errors or merge to one BUS error >> reason. + ETHTOOL_LINK_UNSUPP_EEPROM, /* Unsupported EEPROM */ >>> Which EEPROM? >> Module EEPROM. > Which module? This is all very vague. Some of the Mar

Re: [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting

2017-06-22 Thread Gal Pressman
> Any particular reason for implementing this ABI in ethtool rather than > via some netlink-based interface? Devlink naturally comes to mind, > given that cabling problems are not really related to the L2 and netdev > shouldn't be required for diagnostics.. ethtool is already used for reporting

Re: [RFC PATCH net-next 0/3] ethtool: Add link down reason reporting

2017-06-22 Thread Gal Pressman
> Ethtool doesn't work well as a monitoring/event interface. > Maybe this would be better as extended information with the netlink UP/DOW > event. This API is not meant for monitoring events. The main use case here is a new interface that's down and won't go up for some reason. Nothing will mag

Re: [RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-22 Thread Gal Pressman
>> +ETHTOOL_LINK_PWR_BUDGET_EXC, /* Power budget exceeded */ >> +ETHTOOL_LINK_MODULE_ADMIN_DOWN, /* Module admin down */ >> + >> +ETHTOOL_LINK_REASONS_COUNT >> +}; > Any enumerated list is going to get changed too often. > Could the API just return a string? The motivation for the enu

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-22 Thread Gal Pressman
> Is my reading correct that in case the reason is not in the > pddr2ethtool_table opaque binary data will be passed from the firmware > to user space? Is there any particular reason to allow for this? If > it's just for the rare scenario where a new error code needs to be > added perhaps it wou

Re: [RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-22 Thread Gal Pressman
>> +if (!netif_running(netdev)) { >> +ldr->reason = ETHTOOL_LINK_NETDEV_CARRIER_DOWN; >> +return 0; >> +} > This is generic, will work for any interface. The same is true for > ADMIN_DOWN. Either it is not required at all, since the information is > available via ot

Re: [RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-22 Thread Gal Pressman
>> +enum { >> +ETHTOOL_LINK_VENDOR_SPECIFIC = -1, /* Vendor specific issue provided in >> vendor_reason */ >> +ETHTOOL_LINK_NO_ISSUE, /* No issue observed with link */ >> +ETHTOOL_LINK_REASON_UNKNOWN, /* Unknown reason */ > I think OTHER would be better that UNKNOWN. Fine with me. >

[RFC PATCH net-next 1/3] ethtool: Add link down reason callback

2017-06-21 Thread Gal Pressman
administrators precious time which will not be wasted trying to understand why the link won't go up. For example, when the cable is unplugged: $ ethtool ethXX ... Link detected: no (Cable unplugged) Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed --- include/linux/ethtool.h

[RFC PATCH net-next 3/3] net/mlx5e: Expose link down reason to ethtool

2017-06-21 Thread Gal Pressman
Use the new ethtool link down reason api, and expose troubleshooting info regarding the link status. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 107 + .../net/ethernet/mellanox/mlx5/core/mlx5_core.h

[RFC PATCH net-next 2/3] net/mlx5: Add PDDR register infrastructure

2017-06-21 Thread Gal Pressman
was added to the MLX5_CAP_* infrastructure in order to access this mask. Expose query functions for PDDR register which will be used in the following patch. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/mlx5_core.h| 29 drivers

[RFC PATCH net-next 0/3] ethtool: Add link down reason reporting

2017-06-21 Thread Gal Pressman
is available. This kind of information can save system administrators precious time, which will not be wasted trying to understand why the link won't go up. For example, when the cable is unplugged: $ ethtool ethXX ... Link detected: no (Cable unplugged) Thanks, Gal.

Re: [net-next 11/15] net/mlx5e: Reduce number of heap allocated buffers for update stats

2017-06-21 Thread Gal Pressman
>> +u32 in[MLX5_ST_SZ_DW(ppcnt_reg)] = {0}; > How big is that? > > Allocating large on-stack buffers is even worse. Both PPCNT and MPCNT registers are 252 bytes. I don't see a problem allocating them on the stack.

Re: [PATCH ethtool] ethtool: Support for configurable RSS hash function

2017-03-29 Thread Gal Pressman
On 27/03/2017 21:02, John W. Linville wrote: > On Sat, Mar 25, 2017 at 02:50:47PM -0700, Jakub Kicinski wrote: >> On Wed, 8 Mar 2017 16:03:51 +0200, Gal Pressman wrote: >>> This ethtool patch adds support to set and get the current RSS hash >>> function for the device

Re: [PATCH ethtool] ethtool: Support for configurable RSS hash function

2017-03-26 Thread Gal Pressman
On 26/03/2017 00:50, Jakub Kicinski wrote: > On Wed, 8 Mar 2017 16:03:51 +0200, Gal Pressman wrote: >> This ethtool patch adds support to set and get the current RSS hash >> function for the device through the new hfunc mask field in the >> ethtool_rxfh struct. Kernel su

[PATCH ethtool] ethtool: Fix SFF 8079 cable technology bit parsing

2017-03-19 Thread Gal Pressman
According to the transceiver compliance code definition in the spec, bits 2 & 3 in the 8th byte are indication of active/passive cable, and not specifically related to FC/copper. Fixes: 2edf56749abe ("ethtool: Addition of -m option to dump module eeprom") Signed-off-by: Gal Pressman

[PATCH ethtool] ethtool: Support for configurable RSS hash function

2017-03-08 Thread Gal Pressman
index in the string-set. Signed-off-by: Eyal Perry Signed-off-by: Gal Pressman Reviewed-by: Saeed Mahameed --- ethtool.8.in | 6 ++ ethtool.c| 66 +--- 2 files changed, 69 insertions(+), 3 deletions(-) diff --git a/ethtool.8.in b

Re: [PATCH RFC 0/2] ethtool: Add actual port speed reporting

2016-11-03 Thread Gal Pressman
On 02/11/2016 17:50, Mintz, Yuval wrote: >> Sending RFC to get feedback for the following ethtool proposal: >> >> In some cases such as virtual machines and multi functions (SR-IOV), the >> actual >> bandwidth exposed for each machine is not accurately shown in ethtool. >> Currently ethtool show

  1   2   >