[PATCH net-next v9] virtio_net: Support RX hash XDP hint

2024-04-17 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. 1. https://lore.kernel.org/all/20231015141644.260646-1-akihiko.od...@daynix.com/#r Signed-off-by: Liang Chen --- Changes from v8: - move max table macro o

Re: [PATCH net-next v8] virtio_net: Support RX hash XDP hint

2024-04-16 Thread Liang Chen
On Tue, Apr 16, 2024 at 3:35 PM Heng Qi wrote: > > > > 在 2024/4/16 下午2:19, Liang Chen 写道: > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost > > (still a w

Re: [PATCH net-next v8] virtio_net: Support RX hash XDP hint

2024-04-16 Thread Liang Chen
On Tue, Apr 16, 2024 at 3:20 PM Jason Wang wrote: > > On Tue, Apr 16, 2024 at 2:20 PM Liang Chen wrote: > > > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost >

[PATCH net-next v8] virtio_net: Support RX hash XDP hint

2024-04-15 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. 1. https://lore.kernel.org/all/20231015141644.260646-1-akihiko.od...@daynix.com/#r Signed-off-by: Liang Chen --- Changes from v7: - use table lookup fo

Re: [PATCH net-next v7] virtio_net: Support RX hash XDP hint

2024-04-15 Thread Liang Chen
On Mon, Apr 15, 2024 at 3:36 PM Jesper Dangaard Brouer wrote: > > > > On 13/04/2024 06.10, Liang Chen wrote: > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost >

[PATCH net-next v7] virtio_net: Support RX hash XDP hint

2024-04-12 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. 1. https://lore.kernel.org/all/20231015141644.260646-1-akihiko.od...@daynix.com/#r Signed-off-by: Liang Chen --- Changes from v6: - fix a coding s

Re: [PATCH net-next v6] virtio_net: Support RX hash XDP hint

2024-04-12 Thread Liang Chen
On Sat, Apr 13, 2024 at 10:11 AM Jakub Kicinski wrote: > > On Thu, 11 Apr 2024 16:52:16 +0800 Liang Chen wrote: > > + switch (__le16_to_cpu(hdr_hash->hash_report)) { > > + case VIRTIO_NET_HASH_REPORT_TCPv4: > > Please indent things according to the k

[PATCH net-next v6] virtio_net: Support RX hash XDP hint

2024-04-11 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. 1. https://lore.kernel.org/all/20231015141644.260646-1-akihiko.od...@daynix.com/#r Signed-off-by: Liang Chen --- Changes from v5: - Preservation of the

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-04-10 Thread Liang Chen
On Mon, Apr 8, 2024 at 2:41 PM Jason Wang wrote: > > On Mon, Apr 1, 2024 at 11:38 AM Liang Chen wrote: > > > > On Thu, Feb 29, 2024 at 4:37 PM Liang Chen > > wrote: > > > > > > On Tue, Feb 27, 2024 at 4:42 AM John Fastabend > > > wrote: >

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-03-31 Thread Liang Chen
On Thu, Feb 29, 2024 at 4:37 PM Liang Chen wrote: > > On Tue, Feb 27, 2024 at 4:42 AM John Fastabend > wrote: > > > > Jason Wang wrote: > > > On Fri, Feb 23, 2024 at 9:42 AM Xuan Zhuo > > > wrote: > > > > > > > > On Fri, 09 Feb

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-29 Thread Liang Chen
On Tue, Feb 27, 2024 at 4:42 AM John Fastabend wrote: > > Jason Wang wrote: > > On Fri, Feb 23, 2024 at 9:42 AM Xuan Zhuo > > wrote: > > > > > > On Fri, 09 Feb 2024 13:57:25 +0100, Paolo Abeni wrote: > > > > On Fri, 2024-02-09 at 18:39 +0800, Li

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-09 Thread Liang Chen
On Wed, Feb 7, 2024 at 10:27 PM Paolo Abeni wrote: > > On Wed, 2024-02-07 at 10:54 +0800, Liang Chen wrote: > > On Tue, Feb 6, 2024 at 6:44 PM Paolo Abeni wrote: > > > > > > On Sat, 2024-02-03 at 10:56 +0800, Liang Chen wrote: > > > > On Sat, Feb

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-06 Thread Liang Chen
On Tue, Feb 6, 2024 at 6:44 PM Paolo Abeni wrote: > > On Sat, 2024-02-03 at 10:56 +0800, Liang Chen wrote: > > On Sat, Feb 3, 2024 at 12:20 AM Jesper Dangaard Brouer > > wrote: > > > On 02/02/2024 13.11, Liang Chen wrote: > [...] > > > > @@ -1033,6 +1

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-02 Thread Liang Chen
On Sat, Feb 3, 2024 at 12:20 AM Jesper Dangaard Brouer wrote: > > > > On 02/02/2024 13.11, Liang Chen wrote: > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost >

[PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-02 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. 1. https://lore.kernel.org/all/20231015141644.260646-1-akihiko.od...@daynix.com/#r Signed-off-by: Liang Chen Reviewed-by: Xuan Zhuo Acked-by:

Re: [PATCH v4] virtio_net: Support RX hash XDP hint

2024-02-02 Thread Liang Chen
On Fri, Feb 2, 2024 at 5:58 PM Xuan Zhuo wrote: > > On Fri, 2 Feb 2024 17:25:02 +0800, Liang Chen > wrote: > > On Thu, Feb 1, 2024 at 1:37 PM Jason Wang wrote: > > > > > > On Wed, Jan 31, 2024 at 11:55 AM Liang Chen > > > wrote: > > > > &

Re: [PATCH v4] virtio_net: Support RX hash XDP hint

2024-02-02 Thread Liang Chen
On Thu, Feb 1, 2024 at 1:37 PM Jason Wang wrote: > > On Wed, Jan 31, 2024 at 11:55 AM Liang Chen wrote: > > > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost >

[PATCH v4] virtio_net: Support RX hash XDP hint

2024-01-30 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. 1. https://lore.kernel.org/all/20231015141644.260646-1-akihiko.od...@daynix.com/#r Signed-off-by: Liang Chen Reviewed-by: Xuan Zhuo --- drivers/net/vi

Re: [PATCH v3] virtio_net: Support RX hash XDP hint

2024-01-30 Thread Liang Chen
On Tue, Jan 30, 2024 at 7:53 PM Xuan Zhuo wrote: > > On Thu, 25 Jan 2024 18:19:12 +0800, Liang Chen > wrote: > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost >

[PATCH v3] virtio_net: Support RX hash XDP hint

2024-01-25 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. 1. https://lore.kernel.org/all/20231015141644.260646-1-akihiko.od...@daynix.com/#r Signed-off-by: Liang Chen --- drivers/net/virtio_

Re: [PATCH v2 1/3] virtio_net: Preserve virtio header before XDP program execution

2024-01-25 Thread Liang Chen
On Wed, Jan 24, 2024 at 5:08 PM Xuan Zhuo wrote: > > On Wed, 24 Jan 2024 16:57:19 +0800, Liang Chen > wrote: > > The xdp program may overwrite the inline virtio header. To ensure the > > integrity of the virtio header, it is saved in a data structure that > > wrap

Re: [PATCH v2 2/3] virtio_net: Add missing virtio header in skb for XDP_PASS

2024-01-24 Thread Liang Chen
On Wed, Jan 24, 2024 at 7:04 PM Heng Qi wrote: > > > > 在 2024/1/24 下午4:57, Liang Chen 写道: > > For the XDP_PASS scenario of the XDP path, the skb constructed with > > xdp_buff does not include the virtio header. Adding the virtio header > > information back when cr

Re: [PATCH v2 2/3] virtio_net: Add missing virtio header in skb for XDP_PASS

2024-01-24 Thread Liang Chen
On Wed, Jan 24, 2024 at 5:16 PM Xuan Zhuo wrote: > > On Wed, 24 Jan 2024 16:57:20 +0800, Liang Chen > wrote: > > For the XDP_PASS scenario of the XDP path, the skb constructed with > > xdp_buff does not include the virtio header. Adding the virtio header > > informa

[PATCH v2 3/3] virtio_net: Support RX hash XDP hint

2024-01-24 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. 1. https://lore.kernel.org/all/20231015141644.260646-1-akihiko.od...@daynix.com/#r Signed-off-by: Liang Chen --- drivers/net/virtio_

[PATCH v2 2/3] virtio_net: Add missing virtio header in skb for XDP_PASS

2024-01-24 Thread Liang Chen
For the XDP_PASS scenario of the XDP path, the skb constructed with xdp_buff does not include the virtio header. Adding the virtio header information back when creating the skb. Signed-off-by: Liang Chen --- drivers/net/virtio_net.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH v2 1/3] virtio_net: Preserve virtio header before XDP program execution

2024-01-24 Thread Liang Chen
The xdp program may overwrite the inline virtio header. To ensure the integrity of the virtio header, it is saved in a data structure that wraps both the xdp_buff and the header before running the xdp program. Signed-off-by: Liang Chen --- drivers/net/virtio_net.c | 43

[PATCH v2 0/3] virtio_net: Support the RX hash XDP hint

2024-01-24 Thread Liang Chen
es from v1: - introduce a wrapper structure to preserve virtio header Liang Chen (3): virtio_net: Preserve virtio header before XDP program execution virtio_net: Add missing virtio header in skb for XDP_PASS virtio_net: Support RX hash XDP hint drivers/net/virtio_n

Re: [PATCH] virtio_net: Support RX hash XDP hint

2024-01-24 Thread Liang Chen
On Wed, Jan 24, 2024 at 2:06 PM Xuan Zhuo wrote: > > On Wed, 24 Jan 2024 10:04:51 +0800, Liang Chen > wrote: > > On Mon, Jan 22, 2024 at 7:10 PM Heng Qi wrote: > > > > > > Hi Liang Chen, > > > > > > 在 2024/1/22 下午6:22, Liang Chen 写道: > >

Re: [PATCH] virtio_net: Support RX hash XDP hint

2024-01-24 Thread Liang Chen
On Wed, Jan 24, 2024 at 10:12 AM Jason Wang wrote: > > On Mon, Jan 22, 2024 at 6:23 PM Liang Chen wrote: > > > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost >

Re: [PATCH] virtio_net: Support RX hash XDP hint

2024-01-23 Thread Liang Chen
On Tue, Jan 23, 2024 at 3:02 PM Michael S. Tsirkin wrote: > > On Mon, Jan 22, 2024 at 06:22:56PM +0800, Liang Chen wrote: > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vho

Re: [PATCH] virtio_net: Support RX hash XDP hint

2024-01-23 Thread Liang Chen
On Mon, Jan 22, 2024 at 7:10 PM Heng Qi wrote: > > Hi Liang Chen, > > 在 2024/1/22 下午6:22, Liang Chen 写道: > > The RSS hash report is a feature that's part of the virtio specification. > > Currently, virtio backends like qemu, vdpa (mlx5), and potentially vhost > &g

[PATCH] virtio_net: Support RX hash XDP hint

2024-01-22 Thread Liang Chen
it's currently missing in the XDP path. Therefore, we are introducing XDP hints through kfuncs to allow XDP programs to access the RSS hash. Signed-off-by: Liang Chen --- drivers/net/virtio_net.c | 56 1 file changed, 56 insertions(+) diff --git a/d

[PATCH v1] bcache: fix a race between cache register and cacheset unregister

2019-03-13 Thread Liang Chen
n+0x2b/0x100 [ +0.000753] vfs_write+0xa8/0x1a0 [ +0.000676] ksys_write+0x4d/0xb0 [ +0.000699] do_syscall_64+0x3a/0xf0 [ +0.000692] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Liang Chen --- drivers/md/bcache/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] KVM: x86: Skip pae_root shadow allocation if tdp enabled

2018-07-25 Thread Liang Chen
Considering the fact that the pae_root shadow is not needed when tdp is in use, skip the pae_root shadow page allocation to allow mmu creation even not being able to obtain memory from DMA32 zone when particular cgroup cpuset.mems or mempolicy control is applied. Signed-off-by: Liang Chen

[PATCH v2] bcache: safeguard a dangerous addressing in closure_queue

2017-10-12 Thread Liang Chen
broken if work_struct or the other structs get changed, and can be a bit difficult to debug. Signed-off-by: Liang Chen --- Replacing all occurences of closure_fn to work_func_fn seems to be an option but that would end up with a big lenghty and error prone patch. drivers/md/bcache/closure.h | 6

Re: [PATCH] bcache: safeguard a dangerous addressing in closure_queue

2017-10-12 Thread Liang Chen
On Fri, Oct 13, 2017 at 1:44 AM, Michael Lyle wrote: > On 10/12/2017 07:37 AM, Liang Chen wrote: >> The use of the union reduces the size of closure struct by taking advantage >> of the current size of its members. The offset of func in work_struct equals >> the size of th

[PATCH] bcache: safeguard a dangerous addressing in closure_queue

2017-10-12 Thread Liang Chen
broken if work_struct or the other structs get changed, and can be a bit difficult to debug. Signed-off-by: Liang Chen --- Replacing all occurences of closure_fn to work_func_fn seems to be an option but that would end up with a big lenghty and error prone patch. drivers/md/bcache/closure.h | 5

[PATCH v2] bcache: explicitly destroy mutex while exiting

2017-10-10 Thread Liang Chen
e and backing devices right before bch_debug_init runs and bch_debug_init failes later. So not exposing userspace interface until everything is ready to avoid that issue. Signed-off-by: Liang Chen --- drivers/md/bcache/super.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dr

Re: [PATCH] bcache: avoid a dangerous addressing in closure_queue

2017-07-05 Thread Liang Chen
I had the same feeling, and was reluctant to do so. The reason for making this change was that current code implicitly converts work_func_t to closure_fn, and it also depends on the offset and size of a few struct not being changed. So the patch was introduced essentially to solve that, and keep th

[PATCH] bcache: avoid a dangerous addressing in closure_queue

2017-07-05 Thread Liang Chen
dangerous. It can be broken if work_struct or the other ones get changed, and can be a bit difficult to debug. Signed-off-by: Liang Chen --- drivers/md/bcache/closure.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/md/bcache/closure.h b/drivers/md/bcache/closure.h

[PATCH] bcache: not exposing userspace interface until ready

2017-07-05 Thread Liang Chen
As Coly pointed out, bcache_exit() may not be able to handle all the references properly, if userspace registers cache and backing devices right before bch_debug_init and bch_debug_init failes later. Signed-off-by: Liang Chen --- drivers/md/bcache/super.c | 4 ++-- 1 file changed, 2 insertions

Re: [PATCH] bcache: release the allocated id, not its multiple of BCACHE_MINORS

2017-06-23 Thread Liang Chen
Sure! I will find you there:) On Fri, Jun 23, 2017 at 3:28 PM, wrote: > Hello Liang chen: > > Please see this patch: > > http://www.spinics.net/lists/linux-bcache/msg04572.html > > Do you have a wechat account? please add me: tangjunhui1984 > > We can talk mo

Re: [PATCH] bcache: release the allocated id, not its multiple of BCACHE_MINORS

2017-06-23 Thread Liang Chen
Hi Coly, Thanks for letting me know. Glad to see it's fixed. Thanks, Liang On Fri, Jun 23, 2017 at 3:30 PM, Coly Li wrote: > On 2017/6/23 下午3:15, Liang Chen wrote: >> The id passed to ida_simple_remove has to be the one originally >> allocated with ida_simple_get, not the

[PATCH] bcache: release the allocated id, not its multiple of BCACHE_MINORS

2017-06-23 Thread Liang Chen
The id passed to ida_simple_remove has to be the one originally allocated with ida_simple_get, not the one after multipling by BCACHE_MINORS. Signed-off-by: Liang Chen --- drivers/md/bcache/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache

[PATCH] bcache: explicitly destory mutex while exiting

2017-05-02 Thread Liang Chen
mutex_destroy does nothing most of time, but it's better to call it to make the code future proof and it also has some meaning for like mutex debug. Signed-off-by: Liang Chen --- drivers/md/bcache/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/md/bcache/super.c b/dr

[PATCH] virtio-pci: use possible fallback queue size

2016-03-21 Thread Liang Chen
Virtio 1.0 spec allows driver to modify queue size to reduce momery requeirments. So the driver should write back the queue size actually allocated, instead of the original value read from the common config for the queue. Signed-off-by: Liang Chen Signed-off-by: Gavin Guo Suggested-by: Jay

[PATCH] KVM: x86: optimize steal time calculation

2016-03-19 Thread Liang Chen
call). And after it's enabled, the MSR enable bit is tested twice every time. Removing the accumulate_steal_time function also avoids the necessity of having the accum_steal field. Signed-off-by: Liang Chen Signed-off-by: Gavin Guo --- arch/x86/include/asm/kvm_host.h | 1 - arch/x86

[PATCH V2] mm: mempolicy: skip non-migratable VMAs when setting MPOL_MF_LAZY

2016-01-06 Thread Liang Chen
ults. Signed-off-by: Liang Chen Signed-off-by: Gavin Guo --- Changes since v2: - Add more description into the changelog We have been evaluating the enablement of MPOL_MF_LAZY again, and found this issue. And we decided to push this patch upstream no matter if we finally determine to prop

[PATCH] mm: mempolicy: skip non-migratable VMAs when setting MPOL_MF_LAZY

2016-01-06 Thread Liang Chen
MPOL_MF_LAZY is not visible from userspace since 'commit a720094ded8c ("mm: mempolicy: Hide MPOL_NOOP and MPOL_MF_LAZY from userspace for now")' , but it should still skip non-migratable VMAs. Signed-off-by: Liang Chen Signed-off-by: Gavin Guo --- We have been evaluati

Re: [PATCH v3 2/2] KVM: x86: directly use kvm_make_request again

2014-09-19 Thread Liang Chen
oops, didn't see this ;) Thank you! Thanks, Liang On 09/19/2014 10:00 AM, Paolo Bonzini wrote: > Il 19/09/2014 15:35, Xiao Guangrong ha scritto: Which is why just removing it solves more problems for me :) >> Thank you for raising this question and letting me know the patch's history. >>

Re: [PATCH v3 2/2] KVM: x86: directly use kvm_make_request again

2014-09-19 Thread Liang Chen
On 09/19/2014 02:12 AM, Xiao Guangrong wrote: > On 09/19/2014 12:38 AM, Liang Chen wrote: >> A one-line wrapper around kvm_make_request does not seem >> particularly useful. Replace kvm_mmu_flush_tlb() with >> kvm_make_request() again to free the namespace a bit. >> &

[PATCH v3 0/2] KVM: count actual tlb flushes

2014-09-18 Thread Liang Chen
ies of two patches. * rename the util function kvm_mmu_flush_tlb in x86.c to kvm_vcpu_flush_tlb v1 -> v2: * Instead of calling kvm_mmu_flush_tlb everywhere to make sure the stat is always incremented, postponing the counting to kvm_check_request. Liang Chen (1): KVM: x86: direct

[PATCH v3 2/2] KVM: x86: directly use kvm_make_request again

2014-09-18 Thread Liang Chen
A one-line wrapper around kvm_make_request does not seem particularly useful. Replace kvm_mmu_flush_tlb() with kvm_make_request() again to free the namespace a bit. Signed-off-by: Liang Chen --- arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/mmu.c | 16 +--- arch

[PATCH v3 1/2] KVM: x86: count actual tlb flushes

2014-09-18 Thread Liang Chen
ck_request(). Signed-off-by: Radim Krčmář Signed-off-by: Liang Chen --- arch/x86/kvm/mmu.c | 1 - arch/x86/kvm/x86.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 9314678..b41fd97 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86