RE: [PATCH 15/17] iommu: remove DOMAIN_ATTR_NESTING

2021-03-24 Thread Tian, Kevin
g that support. > > Not sure what the merge plans are - if the series is ready to be > > merged I could rebase on top of it, otherwise that series will need > > to add the method. > OK I think your series may be upstreamed first. > Agree. The vSVA series is still undergoing a refactor according to Jason's comment thus won't be ready in short term. It's better to let this one go in first. Thanks Kevin

I sent you a mail earlier but not sure if you received it, kindly check your email and get back to me for I have very urgent information to pass to you.

2021-03-12 Thread Kevin Roberts

[PATCH net-next v2] net: octeontx2: Fix the confusion in buffer alloc failure path

2021-02-09 Thread Kevin Hao
ed on that value. Add a parameter for otx2_alloc_rbuf/__otx2_alloc_rbuf() to store the dma address and make the return value to indicate if the buffer allocation really fail or not. Reported-by: Pavel Machek Signed-off-by: Kevin Hao Tested-by: Subbaraya Sundeep --- v2: Just sort the var

[PATCH net-next] net: octeontx2: Fix the confusion in buffer alloc failure path

2021-02-07 Thread Kevin Hao
ed on that value. Add a parameter for otx2_alloc_rbuf/__otx2_alloc_rbuf() to store the dma address and make the return value to indicate if the buffer allocation really fail or not. Reported-by: Pavel Machek Signed-off-by: Kevin Hao --- .../marvell/octeontx2/nic/otx2_common.c

[PATCH net-next v3 4/4] net: dpaa2: Use napi_alloc_frag_align() to avoid the memory waste

2021-02-04 Thread Kevin Hao
The napi_alloc_frag_align() will guarantee that a correctly align buffer address is returned. So use this function to simplify the buffer alloc and avoid the unnecessary memory waste. Signed-off-by: Kevin Hao Reviewed-by: Ioana Ciornei --- v3: Add Reviewed-by from Ioana. drivers/net/ethernet

[PATCH net-next v3 2/4] net: Introduce {netdev,napi}_alloc_frag_align()

2021-02-04 Thread Kevin Hao
t for the page_frag functions, so add the corresponding {netdev,napi}_frag functions. Signed-off-by: Kevin Hao --- v3: Use align mask and refactor the {netdev,napi}_alloc_frag_align() as suggested by Alexander. include/linux/skbuff.h | 36 ++-- net/core/skb

[PATCH net-next v3 3/4] net: octeontx2: Use napi_alloc_frag_align() to avoid the memory waste

2021-02-04 Thread Kevin Hao
The napi_alloc_frag_align() will guarantee that a correctly align buffer address is returned. So use this function to simplify the buffer alloc and avoid the unnecessary memory waste. Signed-off-by: Kevin Hao Tested-by: Subbaraya Sundeep --- v3: Add Tested-by from Subbaraya. drivers/net

[PATCH net-next v3 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-02-04 Thread Kevin Hao
that an aligned buffer address is returned. Signed-off-by: Kevin Hao Acked-by: Vlastimil Babka --- v3: Use align mask as suggested by Alexander. include/linux/gfp.h | 12 ++-- mm/page_alloc.c | 8 +--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/

[PATCH net-next v3 0/4] net: Avoid the memory waste in some Ethernet drivers

2021-02-04 Thread Kevin Hao
align buffer is returned. Then we can drop the ugly workarounds and avoid the unnecessary memory waste. Kevin Hao (4): mm: page_frag: Introduce page_frag_alloc_align() net: Introduce {netdev,napi}_alloc_frag_align() net: octeontx2: Use napi_alloc_frag_align() to avoid the memory waste

Re: [PATCH net-next v2 2/4] net: Introduce {netdev,napi}_alloc_frag_align()

2021-02-03 Thread Kevin Hao
On Tue, Feb 02, 2021 at 08:26:19AM -0800, Alexander Duyck wrote: > On Sun, Jan 31, 2021 at 12:17 AM Kevin Hao wrote: > > > > In the current implementation of {netdev,napi}_alloc_frag(), it doesn't > > have any align guarantee for the returned buffer address, But for

Re: [PATCH net-next v2 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-02-03 Thread Kevin Hao
On Tue, Feb 02, 2021 at 08:19:54AM -0800, Alexander Duyck wrote: > On Sat, Jan 30, 2021 at 11:54 PM Kevin Hao wrote: > > > > In the current implementation of page_frag_alloc(), it doesn't have > > any align guarantee for the returned buffer address. But for some > &g

[PATCH net-next v2 3/4] net: octeontx2: Use napi_alloc_frag_align() to avoid the memory waste

2021-01-31 Thread Kevin Hao
The napi_alloc_frag_align() will guarantee that a correctly align buffer address is returned. So use this function to simplify the buffer alloc and avoid the unnecessary memory waste. Signed-off-by: Kevin Hao --- v2: No change. drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 3

[PATCH net-next v2 2/4] net: Introduce {netdev,napi}_alloc_frag_align()

2021-01-30 Thread Kevin Hao
t for the page_frag functions, so add the corresponding {netdev,napi}_frag functions. Signed-off-by: Kevin Hao --- v2: Inline {netdev,napi}_alloc_frag(). include/linux/skbuff.h | 22 -- net/core/skbuff.c | 25 + 2 files changed, 29 insertions(+

[PATCH net-next v2 4/4] net: dpaa2: Use napi_alloc_frag_align() to avoid the memory waste

2021-01-30 Thread Kevin Hao
The napi_alloc_frag_align() will guarantee that a correctly align buffer address is returned. So use this function to simplify the buffer alloc and avoid the unnecessary memory waste. Signed-off-by: Kevin Hao --- v2: No change. drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 3 +-- 1 file

[PATCH net-next v2 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-01-30 Thread Kevin Hao
that an aligned buffer address is returned. Signed-off-by: Kevin Hao Acked-by: Vlastimil Babka --- v2: - Inline page_frag_alloc() - Adopt Vlastimil's suggestion and add his Acked-by include/linux/gfp.h | 12 ++-- mm/page_alloc.c | 8 +--- 2 files changed, 15 insert

[PATCH net-next v2 0/4] net: Avoid the memory waste in some Ethernet drivers

2021-01-30 Thread Kevin Hao
ds to make sure that we can get a align buffer address for some Ethernet drivers. This patch series tries to introduce some helper functions to make sure that an align buffer is returned. Then we can drop the ugly workarounds and avoid the unnecessary memory waste. Kevin Hao (4): mm: page_frag:

Which interface events will remove IPv6 Proxy NDP addresses from the interface?

2021-01-27 Thread Kevin P. Fleming
I'm trying to track down a problem with systemd-networkd; on three of my machines, I have 'IPv6ProxyNDPAddress' configured in the network configuration file so that additional addresses will be added when the interface comes up. Unfortunately, even though systemd-networkd is adding the addresses,

Re: [PATCH net-next 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-01-23 Thread Kevin Hao
On Sat, Jan 23, 2021 at 12:52:21PM -0800, Jakub Kicinski wrote: > On Sat, 23 Jan 2021 19:59:00 +0800 Kevin Hao wrote: > > +void *page_frag_alloc(struct page_frag_cache *nc, > > + unsigned int fragsz, gfp_t gfp_mask) > > +{ > > + return page_frag_alloc

[PATCH net-next 1/4] mm: page_frag: Introduce page_frag_alloc_align()

2021-01-23 Thread Kevin Hao
that an aligned buffer address is returned. Signed-off-by: Kevin Hao --- include/linux/gfp.h | 3 +++ mm/page_alloc.c | 12 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 6e479e9c48ce..e76e8618e9d7 100644 --- a/in

[PATCH net-next 3/4] net: octeontx2: Use napi_alloc_frag_align() to avoid the memory waste

2021-01-23 Thread Kevin Hao
The napi_alloc_frag_align() will guarantee that a correctly align buffer address is returned. So use this function to simplify the buffer alloc and avoid the unnecessary memory waste. Signed-off-by: Kevin Hao --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 3 +-- 1 file changed

[PATCH net-next 4/4] net: dpaa2: Use napi_alloc_frag_align() to avoid the memory waste

2021-01-23 Thread Kevin Hao
The napi_alloc_frag_align() will guarantee that a correctly align buffer address is returned. So use this function to simplify the buffer alloc and avoid the unnecessary memory waste. Signed-off-by: Kevin Hao --- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 3 +-- 1 file changed, 1

[PATCH net-next 2/4] net: Introduce {netdev,napi}_alloc_frag_align()

2021-01-23 Thread Kevin Hao
t for the page_frag functions, so add the corresponding {netdev,napi}_frag functions. Signed-off-by: Kevin Hao --- include/linux/skbuff.h | 2 ++ net/core/skbuff.c | 40 ++-- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/include/

[PATCH net-next 0/4] net: Avoid the memory waste in some Ethernet drivers

2021-01-23 Thread Kevin Hao
elper functions to make sure that an align buffer is returned. Then we can drop the ugly workarounds and avoid the unnecessary memory waste. Kevin Hao (4): mm: page_frag: Introduce page_frag_alloc_align() net: Introduce {netdev,napi}_alloc_frag_align() net: octeontx2: Use napi_alloc_frag_align

Re: [PATCH] net: octeontx2: Make sure the buffer is 128 byte aligned

2021-01-21 Thread Kevin Hao
On Thu, Jan 21, 2021 at 09:53:08AM +, David Laight wrote: > From: Kevin Hao > > Sent: 21 January 2021 07:09 > > > > The octeontx2 hardware needs the buffer to be 128 byte aligned. > > But in the current implementation of napi_alloc_frag(), it can't > > gu

[PATCH] net: octeontx2: Make sure the buffer is 128 byte aligned

2021-01-20 Thread Kevin Hao
() to make sure that the buffer is aligned correctly. Fixes: 7a36e4918e30 ("octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers") Reported-by: Subbaraya Sundeep Signed-off-by: Kevin Hao --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 3 ++- 1 file change

Re: [PATCH] Revert "octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers"

2021-01-20 Thread Kevin Hao
On Wed, Jan 20, 2021 at 09:13:20PM -0800, Jakub Kicinski wrote: > On Thu, 21 Jan 2021 13:09:10 +0800 Kevin Hao wrote: > > On Wed, Jan 20, 2021 at 08:59:14PM -0800, Jakub Kicinski wrote: > > > On Thu, 21 Jan 2021 12:20:35 +0800 Kevin Hao wrote: > > > &g

Re: [PATCH] Revert "octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers"

2021-01-20 Thread Kevin Hao
On Wed, Jan 20, 2021 at 08:59:14PM -0800, Jakub Kicinski wrote: > On Thu, 21 Jan 2021 12:20:35 +0800 Kevin Hao wrote: > > Hmm, why not? > > buf = napi_alloc_frag(pool->rbsize + 128); > > buf = PTR_ALIGN(buf, 128); > > I'd keep the aligning in the driver u

Re: [PATCH] Revert "octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers"

2021-01-20 Thread Kevin Hao
void *netdev_alloc_frag(unsigned int fragsz) data = page_frag_alloc(nc, fragsz, GFP_ATOMIC); } else { local_bh_disable(); - data = __napi_alloc_frag(fragsz, GFP_ATOMIC); + data = __napi_alloc_frag(fragsz, GFP_ATOMIC, 0);

[PATCH] igc: check return value of ret_val in igc_config_fc_after_link_up

2021-01-06 Thread Kevin Lo
Check return value from ret_val to make error check actually work. Fixes: 4eb8080143a9 ("igc: Add setup link functionality") Signed-off-by: Kevin Lo --- diff --git a/drivers/net/ethernet/intel/igc/igc_mac.c b/drivers/net/ethernet/intel/igc/igc_mac.c index 09cd0ec7ee87..67b8ffd21d8a 10

[PATCH v2] igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr

2020-12-13 Thread Kevin Lo
This patch sets the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr. Without this change it wouldn't lead to a shadow RAM write EEWR timeout. Fixes: ab4056126813 ("igc: Add NVM support") Signed-off-by: Kevin Lo --- v2: Add a Fixes tag. --- diff --git a/drivers/net/eth

Re: [PATCH] igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr

2020-12-13 Thread Kevin Lo
On Sat, Dec 12, 2020 at 02:00:10PM -0800, Jakub Kicinski wrote: > > On Fri, 11 Dec 2020 22:34:56 +0800 Kevin Lo wrote: > > This patch sets the default return value to -IGC_ERR_NVM in > > igc_write_nvm_srwr. > > Without this change it wouldn't lead to a

[PATCH] igc: set the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr

2020-12-11 Thread Kevin Lo
This patch sets the default return value to -IGC_ERR_NVM in igc_write_nvm_srwr. Without this change it wouldn't lead to a shadow RAM write EEWR timeout. Signed-off-by: Kevin Lo --- diff --git a/drivers/net/ethernet/intel/igc/igc_i225.c b/drivers/net/ethernet/intel/igc/igc_i225.c

I sent you a mail earlier but not sure if you received it, kindly check your email and get back to me for I have very urgent information to pass to you.

2020-11-11 Thread Kevin Roberts

RE: [EXTERNAL] Re: [PATCH bpf-next v2] Update perf ring buffer to prevent corruption

2020-11-09 Thread Kevin Sheldrake
> -Original Message- > From: Peter Zijlstra > Sent: 09 November 2020 11:29 > To: Alexei Starovoitov > Cc: Kevin Sheldrake ; Ingo Molnar > ; Daniel Borkmann ; Network > Development ; b...@vger.kernel.org; Andrii > Nakryiko ; KP Singh > Subject: [EXTER

Re: [PATCH net v2 0/4] via-rhine: Resume fix and other maintenance work

2020-09-29 Thread Kevin Brace
Hi David, Thank you for the quick application of the fixes. Regards, Kevin Brace Brace Computer Laboratory blog https://bracecomputerlab.com > Sent: Tuesday, September 29, 2020 at 2:24 PM > From: "David Miller" > To: kevinbr...@gmx.com > Cc: netdev@vger.kernel.org >

Re: [PATCH net 4/4] via-rhine: Version bumped to 1.5.2

2020-09-29 Thread Kevin Brace
Hi David, I sent the v2 patches to netdev mailing list. I hope they meet your standards. Regards, Kevin Brace Brace Computer Laboratory blog https://bracecomputerlab.com > Sent: Monday, September 28, 2020 at 6:50 PM > From: "David Miller" > To: kevinbr...@gmx.com > Cc:

[PATCH net v2 2/4] via-rhine: VTunknown1 device is really VT8251 South Bridge

2020-09-29 Thread Kevin Brace
From: Kevin Brace The VIA Technologies VT8251 South Bridge's integrated Rhine-II Ethernet MAC comes has a PCI revision value of 0x7c. This was verified on ASUS P5V800-VM mainboard. Signed-off-by: Kevin Brace --- drivers/net/ethernet/via/via-rhine.c | 2 +- 1 file changed, 1 insertion(

[PATCH net v2 3/4] via-rhine: Eliminate version information

2020-09-29 Thread Kevin Brace
From: Kevin Brace Signed-off-by: Kevin Brace --- drivers/net/ethernet/via/via-rhine.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c index d3a2be2e75d0..8e8cfe110d95 100644 --- a/drivers/net

[PATCH net v2 1/4] via-rhine: Fix for the hardware having a reset failure after resume

2020-09-29 Thread Kevin Brace
From: Kevin Brace In rhine_resume() and rhine_suspend(), the code calls netif_running() to see if the network interface is down or not. If it is down (i.e., netif_running() returning false), they will skip any housekeeping work within the function relating to the hardware. This becomes a

[PATCH net v2 0/4] via-rhine: Resume fix and other maintenance work

2020-09-29 Thread Kevin Brace
patches apply to the latest code, but they should be backported to older kernels as well. -- Kevin Brace (4): via-rhine: Fix for the hardware having a reset failure after resume via-rhine: VTunknown1 device is really VT8251 South Bridge via-rhine: Eliminate version information via-rhine: New

[PATCH net v2 4/4] via-rhine: New device driver maintainer

2020-09-29 Thread Kevin Brace
From: Kevin Brace Signed-off-by: Kevin Brace --- MAINTAINERS | 3 ++- drivers/net/ethernet/via/via-rhine.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 153f7b3419c8..3e5ae3185847 100644 --- a/MAINTAINERS +++ b

[PATCH net 0/4] via-rhine: Resume fix and other maintenance work

2020-09-28 Thread Kevin Brace
patches apply to the latest code, but they should be backported to older kernels as well. -- Kevin Brace (4): via-rhine: Fix for the hardware having a reset failure after resume via-rhine: VTunknown1 device is really VT8251 South Bridge via-rhine: New device driver maintainer via-rhine

[PATCH net 2/4] via-rhine: VTunknown1 device is really VT8251 South Bridge

2020-09-28 Thread Kevin Brace
From: Kevin Brace The VIA Technologies VT8251 South Bridge's integrated Rhine-II Ethernet MAC comes has a PCI revision value of 0x7c. This was verified on ASUS P5V800-VM mainboard. Signed-off-by: Kevin Brace --- drivers/net/ethernet/via/via-rhine.c | 2 +- 1 file changed, 1 insertion(

[PATCH net 1/4] via-rhine: Fix for the hardware having a reset failure after resume

2020-09-28 Thread Kevin Brace
From: Kevin Brace In rhine_resume() and rhine_suspend(), the code calls netif_running() to see if the network interface is down or not. If it is down (i.e., netif_running() returning false), they will skip any housekeeping work within the function relating to the hardware. This becomes a

[PATCH net 3/4] via-rhine: New device driver maintainer

2020-09-28 Thread Kevin Brace
From: Kevin Brace Signed-off-by: Kevin Brace --- MAINTAINERS | 3 ++- drivers/net/ethernet/via/via-rhine.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 153f7b3419c8..3e5ae3185847 100644 --- a/MAINTAINERS +++ b

[PATCH net 4/4] via-rhine: Version bumped to 1.5.2

2020-09-28 Thread Kevin Brace
From: Kevin Brace via-rhine Version 1.5.2 contains a fix for reset failure and hardware disappearance after resume. I am taking over code maintenance work for via-rhine. Signed-off-by: Kevin Brace --- drivers/net/ethernet/via/via-rhine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

Re: [PATCH net-next v7 09/10] net: phy: smsc: use phy_read_poll_timeout() to simplify the code

2020-06-01 Thread Kevin Groeneveld
_read_poll_timeout(...)" so that it actually checks the error then the function will behave differently than before. The original code would only return an error if phy_read returned an error. On a timeout it just continued. So the "if" could be changed to "if (rc < 0 && rc != -ETIMEDOUT)". But you will still get the extra messages in the log that were not there before. Kevin

Re: [PATCH net-next] net: phy: broadcom: add support for BCM54811 PHY

2020-05-15 Thread Kevin Lo
On Fri, May 15, 2020 at 02:31:42PM -0700, Jakub Kicinski wrote: > > On Sat, 16 May 2020 01:24:47 +0800 Kevin Lo wrote: > > The BCM54811 PHY shares many similarities with the already supported > > BCM54810 > > PHY but additionally requires some semi-unique configuration

[PATCH net-next] net: phy: broadcom: fix checkpatch complains about tabs

2020-05-15 Thread Kevin Lo
This patch makes checkpatch happy for tabs Signed-off-by: Kevin Lo --- diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index 8cd8d188542a..cd271de9609b 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c @@ -356,7 +356,7 @@ static int

Re: [PATCH net] net: phy: broadcom: add support for BCM54811 PHY

2020-05-15 Thread Kevin Lo
On Fri, May 15, 2020 at 08:53:37AM -0700, Florian Fainelli wrote: > > > > On 5/14/2020 10:22 PM, Kevin Lo wrote: > > The BCM54811 PHY shares many similarities with the already supported > > BCM54810 > > PHY but additionally requires some semi-unique configuratio

[PATCH net-next] net: phy: broadcom: add support for BCM54811 PHY

2020-05-15 Thread Kevin Lo
The BCM54811 PHY shares many similarities with the already supported BCM54810 PHY but additionally requires some semi-unique configuration. Signed-off-by: Kevin Lo Reviewed-by: Florian Fainelli --- diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index 97201d5cf007

[PATCH net] net: phy: broadcom: add support for BCM54811 PHY

2020-05-15 Thread Kevin Lo
The BCM54811 PHY shares many similarities with the already supported BCM54810 PHY but additionally requires some semi-unique configuration. Signed-off-by: Kevin Lo --- diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index d14d91b759b7..0360a5cfdb9e 100644 --- a/drivers/net

Re: [PATCH net-next] net: phy: broadcom: fix BCM54XX_SHD_SCR3_TRDDAPD value for BCM54810

2020-05-13 Thread Kevin Lo
On Wed, May 13, 2020 at 06:31:29PM -0700, Florian Fainelli wrote: > > > > On 5/13/2020 5:57 PM, Kevin Lo wrote: > > Set the correct bit when checking for PHY_BRCM_DIS_TXCRXC_NOENRGY on the > > BCM54810 PHY. > > Indeed, good catch! > > > > Signed-o

[PATCH net-next] net: phy: broadcom: fix BCM54XX_SHD_SCR3_TRDDAPD value for BCM54810

2020-05-13 Thread Kevin Lo
Set the correct bit when checking for PHY_BRCM_DIS_TXCRXC_NOENRGY on the BCM54810 PHY. Signed-off-by: Kevin Lo --- diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c index 97201d5cf007..45d0aefb964c 100644 --- a/drivers/net/phy/broadcom.c +++ b/drivers/net/phy/broadcom.c

[PATCH v3] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-09 Thread Kevin Hao
remain area of the allocated page wasted. On a kernel with 64K page, 62K area is wasted. IMHO it is really unnecessary to implement our own method for the buffers allocate, we can reuse the napi_alloc_frag() to simplify our code. Signed-off-by: Kevin Hao --- v3: 1. Use double underscore for

Re: [PATCH v2] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-08 Thread Kevin Hao
On Fri, May 08, 2020 at 05:38:33PM -0700, Jakub Kicinski wrote: > On Fri, 8 May 2020 19:49:53 +0800 Kevin Hao wrote: > > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c > > b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c > > index f1d2d

[PATCH v2] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-08 Thread Kevin Hao
remain area of the allocated page wasted. On a kernel with 64K page, 62K area is wasted. IMHO it is really unnecessary to implement our own method for the buffers allocate, we can reuse the napi_alloc_frag() to simplify our code. Signed-off-by: Kevin Hao --- v2: Use DMA_ATTR_SKIP_CPU_SYNC

Re: [PATCH] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-08 Thread Kevin Hao
On Fri, May 08, 2020 at 01:10:00PM +0530, Sunil Kovvuri wrote: > On Fri, May 8, 2020 at 9:43 AM Kevin Hao wrote: > > > > In the current codes, the octeontx2 uses its own method to allocate > > the pool buffers, but there are some issues in this implementation. >

Re: [PATCH] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-07 Thread Kevin Hao
On Fri, May 08, 2020 at 10:18:27AM +0530, Sunil Kovvuri wrote: > On Fri, May 8, 2020 at 9:43 AM Kevin Hao wrote: > > > > In the current codes, the octeontx2 uses its own method to allocate > > the pool buffers, but there are some issues in this implementation. >

[PATCH] octeontx2-pf: Use the napi_alloc_frag() to alloc the pool buffers

2020-05-07 Thread Kevin Hao
remain area of the allocated page wasted. On a kernel with 64K page, 62K area is wasted. IMHO it is really unnecessary to implement our own method for the buffers allocate, we can reuse the napi_alloc_frag() to simplify our code. Signed-off-by: Kevin Hao --- .../marvell/octeontx2/nic

[PATCH net] tcp_bbr: fix quantization code to not raise cwnd if not probing bandwidth

2019-09-26 Thread Kevin(Yudong) Yang
fail to converge in their bandwidth allocations. Fixes: 383d470 ("tcp_bbr: fix bw probing to raise in-flight data for very small BDPs") Signed-off-by: Kevin(Yudong) Yang Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh Acked-by: Priyaranjan Jha ---

Re: [PATCH bpf-next] libbpf: add xsk_umem__adjust_offset

2019-09-13 Thread Laatz, Kevin
On 13/09/2019 05:59, Björn Töpel wrote: On Thu, 12 Sep 2019 at 17:47, Kevin Laatz wrote: Currently, xsk_umem_adjust_offset exists as a kernel internal function. This patch adds xsk_umem__adjust_offset to libbpf so that it can be used from userspace. This will take the responsibility of

[PATCH bpf-next] libbpf: add xsk_umem__adjust_offset

2019-09-12 Thread Kevin Laatz
only in xsk.c. We therefore add an extra API to return the flags field to the user from the structure, and have the inline function use this flags field directly. Signed-off-by: Kevin Laatz --- tools/lib/bpf/libbpf.map | 1 + tools/lib/bpf/xsk.c | 5 + tools/lib/bpf/xsk.h

[PATCH bpf-next] ixgbe: fix xdp handle calculations

2019-09-05 Thread Kevin Laatz
oom isvnon-zero. This patch fixes this and uses xsk_umem_adjust_offset to add it appropritely based on the mode being run. Fixes: d8c3061e5edd ("ixgbe: modify driver for handling offsets") Reported-by: Bjorn Topel Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_

[PATCH bpf-next] i40e: fix xdp handle calculations

2019-09-05 Thread Kevin Laatz
non-zero. This patch fixes this and uses xsk_umem_adjust_offset to add it appropritely based on the mode being run. Fixes: 2f86c806a8a8 ("i40e: modify driver for handling offsets") Reported-by: Bjorn Topel Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 7 +

[PATCH bpf-next v6 06/12] mlx5e: modify driver for handling offsets

2019-08-27 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v6 05/12] ixgbe: modify driver for handling offsets

2019-08-27 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v6 07/12] net/mlx5e: Allow XSK frames smaller than a page

2019-08-27 Thread Kevin Laatz
From: Maxim Mikityanskiy Relax the requirements to the XSK frame size to allow it to be smaller than a page and even not a power of two. The current implementation can work in this mode, both with Striding RQ and without it. The code that checks `mtu + headroom <= XSK frame size` is modified acc

[PATCH bpf-next v6 08/12] libbpf: add flags to umem config

2019-08-27 Thread Kevin Laatz
Since we change the size of the xsk_umem_config struct, we need to version the ABI. This patch includes the ABI versioning for xsk_umem__create. The Makefile was also updated to handle multiple function versions in check-abi. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v2: - R

[PATCH bpf-next v6 01/12] i40e: simplify Rx buffer recycle

2019-08-27 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH bpf-next v6 04/12] i40e: modify driver for handling offsets

2019-08-27 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Bruce Richardson Signed-off-by: Kevin Laatz

[PATCH bpf-next v6 00/12] XDP unaligned chunk placement support

2019-08-27 Thread Kevin Laatz
This patch set adds the ability to use unaligned chunks in the XDP umem. Currently, all chunk addresses passed to the umem are masked to be chunk size aligned (max is PAGE_SIZE). This limits where we can place chunks within the umem as well as limiting the packet sizes that are supported. The cha

[PATCH bpf-next v6 02/12] ixgbe: simplify Rx buffer recycle

2019-08-27 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH bpf-next v6 03/12] xsk: add support to allow unaligned chunk placement

2019-08-27 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus Signed-off-by: Bruce Richardson --- v2: - Add checks for the flags coming from userspace - Fix how we get chunk_size in xsk_diag.c - Add defines for masking the

[PATCH bpf-next v6 10/12] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-08-27 Thread Kevin Laatz
ss on it's own). Signed-off-by: Kevin Laatz Signed-off-by: Bruce Richardson --- v2: - Removed unused defines - Fix buffer recycling for unaligned case - Remove --buf-size (--frame-size merged before this) - Modifications to use the new descriptor format for buffer recycling v5:

[PATCH bpf-next v6 09/12] samples/bpf: add unaligned chunks mode support to xdpsock

2019-08-27 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v4: - updated help text for -f - use new chunk flag define --- samples/bpf/xdpsock_user.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/

[PATCH bpf-next v6 12/12] doc/af_xdp: include unaligned chunk case

2019-08-27 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH bpf-next v6 11/12] samples/bpf: use hugepages in xdpsock app

2019-08-27 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index dc3d50f8ed86..102eace22956 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

Re: [PATCH bpf-next v5 03/11] xsk: add support to allow unaligned chunk placement

2019-08-23 Thread Laatz, Kevin
On 22/08/2019 19:43, Jonathan Lemon wrote: On 21 Aug 2019, at 18:44, Kevin Laatz wrote: Currently, addresses are chunk size aligned. This means, we are very restricted in terms of where we can place chunk within the umem. For example, if we have a chunk size of 2k, then our chunks can only be

[PATCH bpf-next v5 10/11] samples/bpf: use hugepages in xdpsock app

2019-08-22 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index dc3d50f8ed86..102eace22956 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH bpf-next v5 08/11] samples/bpf: add unaligned chunks mode support to xdpsock

2019-08-22 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v4: - updated help text for -f - use new chunk flag define --- samples/bpf/xdpsock_user.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/

[PATCH bpf-next v5 06/11] mlx5e: modify driver for handling offsets

2019-08-22 Thread Kevin Laatz
. An additional patch that enables the unaligned chunks feature (makes mlx5e accept arbitrary frame sizes) will be added later and will apply on top of this patch. Signed-off-by: Kevin Laatz --- v3: - Use new helper function to handle offset v4: - fixed headroom addition to handle. Using

[PATCH bpf-next v5 07/11] libbpf: add flags to umem config

2019-08-22 Thread Kevin Laatz
Since we change the size of the xsk_umem_config struct, we need to version the ABI. This patch includes the ABI versioning for xsk_umem__create. The Makefile was also updated to handle multiple function versions in check-abi. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v2: - R

[PATCH bpf-next v5 05/11] ixgbe: modify driver for handling offsets

2019-08-22 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Kevin Laatz --- v3: - Use new helper function

[PATCH bpf-next v5 11/11] doc/af_xdp: include unaligned chunk case

2019-08-22 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH bpf-next v5 09/11] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-08-22 Thread Kevin Laatz
ss on it's own). Signed-off-by: Kevin Laatz Signed-off-by: Bruce Richardson --- v2: - Removed unused defines - Fix buffer recycling for unaligned case - Remove --buf-size (--frame-size merged before this) - Modifications to use the new descriptor format for buffer recycling v5:

[PATCH bpf-next v5 04/11] i40e: modify driver for handling offsets

2019-08-22 Thread Kevin Laatz
With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This patch modifies the driver to appropriately mask the address for each case. Signed-off-by: Bruce Richardson Signed-off-by: Kevin Laatz

[PATCH bpf-next v5 02/11] ixgbe: simplify Rx buffer recycle

2019-08-22 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH bpf-next v5 03/11] xsk: add support to allow unaligned chunk placement

2019-08-22 Thread Kevin Laatz
keep track of which pages are followed by a physically contiguous page. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus Signed-off-by: Bruce Richardson --- v2: - Add checks for the flags coming from userspace - Fix how we get chunk_size in xsk_diag.c - Add defines for masking the

[PATCH bpf-next v5 01/11] i40e: simplify Rx buffer recycle

2019-08-22 Thread Kevin Laatz
s directly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/i40e/i40e_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_xsk.c b/drivers/net/ethernet/intel/i40e/i40e_x

[PATCH bpf-next v5 00/11] XDP unaligned chunk placement support

2019-08-22 Thread Kevin Laatz
bpf-af-xdp-wakeup' which was merged recently. - Fixed typo in mlx driver patch. - Moved libbpf patch to later in the set (7/11, just before the sample app changes) Kevin Laatz (11): i40e: simplify Rx buffer recycle ixgbe: simplify Rx buffer recycle xsk: add support to allow unalign

Re: [PATCH bpf-next v4 07/11] mlx5e: modify driver for handling offsets

2019-08-19 Thread Laatz, Kevin
On 19/08/2019 15:36, Maxim Mikityanskiy wrote: On 2019-08-01 13:05, Maxim Mikityanskiy wrote: On 2019-07-30 11:53, Kevin Laatz wrote: With the addition of the unaligned chunks option, we need to make sure we handle the offsets accordingly based on the mode we are currently running in. This

[PATCH net] r8152: fix typo in register name

2019-07-31 Thread Kevin Lo
It is likely that PAL_BDC_CR should be PLA_BDC_CR. Signed-off-by: Kevin Lo --- diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 39e0768d734d..0cc03a9ff545 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -50,7 +50,7 @@ #define PLA_TEREDO_WAKE_BASE

[PATCH bpf-next v4 11/11] doc/af_xdp: include unaligned chunk case

2019-07-30 Thread Kevin Laatz
masked if running the user application in the unaligned chunk mode. Signed-off-by: Kevin Laatz --- Documentation/networking/af_xdp.rst | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/networking/af_xdp.rst b/Documentation/networking/af_xdp.rst index

[PATCH bpf-next v4 10/11] samples/bpf: use hugepages in xdpsock app

2019-07-30 Thread Kevin Laatz
-off-by: Kevin Laatz --- samples/bpf/xdpsock_user.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 62b2059cd0e3..d1c61ec0e697 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c

[PATCH bpf-next v4 09/11] samples/bpf: add buffer recycling for unaligned chunks to xdpsock

2019-07-30 Thread Kevin Laatz
ss on it's own). Signed-off-by: Kevin Laatz Signed-off-by: Bruce Richardson --- v2: - Removed unused defines - Fix buffer recycling for unaligned case - Remove --buf-size (--frame-size merged before this) - Modifications to use the new descriptor format for buffer recycling --- s

[PATCH bpf-next v4 08/11] samples/bpf: add unaligned chunks mode support to xdpsock

2019-07-30 Thread Kevin Laatz
ions. Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v4: - updated help text for -f - use new chunk flag define --- samples/bpf/xdpsock_user.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/

[PATCH bpf-next v4 03/11] libbpf: add flags to umem config

2019-07-30 Thread Kevin Laatz
Signed-off-by: Kevin Laatz Signed-off-by: Ciara Loftus --- v2: - Removed the headroom check from this patch. It has moved to the previous patch. v4: - modified chunk flag define --- tools/include/uapi/linux/if_xdp.h | 9 +++-- tools/lib/bpf/xsk.c | 3 +++ tools/lib

[PATCH bpf-next v4 02/11] ixgbe: simplify Rx buffer recycle

2019-07-30 Thread Kevin Laatz
ly without having to mask and add the headroom. Signed-off-by: Kevin Laatz --- drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_x

[PATCH bpf-next v4 00/11] XDP unaligned chunk placement support

2019-07-30 Thread Kevin Laatz
minor changes based on review comments Kevin Laatz (11): i40e: simplify Rx buffer recycle ixgbe: simplify Rx buffer recycle libbpf: add flags to umem config xsk: add support to allow unaligned chunk placement i40e: modify driver for handling offsets ixgbe: modify driver for handling offs

  1   2   3   4   >