search for: header_offset

Displaying 20 results from an estimated 45 matches for "header_offset".

2023 Mar 31
1
[PATCH net-next 8/8] virtio_net: introduce receive_small_xdp()
...28 at 20:04 +0800, Xuan Zhuo wrote: > > @@ -949,15 +1042,11 @@ static struct sk_buff *receive_small(struct net_device *dev, > > { > > struct sk_buff *skb; > > struct bpf_prog *xdp_prog; > > - unsigned int xdp_headroom = (unsigned long)ctx; > > - unsigned int header_offset = VIRTNET_RX_PAD + xdp_headroom; > > + unsigned int header_offset = VIRTNET_RX_PAD; > > unsigned int headroom = vi->hdr_len + header_offset; > > This changes (reduces) the headroom for non-xpd-pass skbs. > > [...] > > + buf += header_offset; > > + memcpy(skb...
2023 Mar 28
8
[PATCH net-next 0/8] virtio_net: refactor xdp codes
Due to historical reasons, the implementation of XDP in virtio-net is relatively chaotic. For example, the processing of XDP actions has two copies of similar code. Such as page, xdp_page processing, etc. The purpose of this patch set is to refactor these code. Reduce the difficulty of subsequent maintenance. Subsequent developers will not introduce new bugs because of some complex logical
2023 Mar 22
9
[PATCH net-next 0/8] virtio_net: refactor xdp codes
Due to historical reasons, the implementation of XDP in virtio-net is relatively chaotic. For example, the processing of XDP actions has two copies of similar code. Such as page, xdp_page processing, etc. The purpose of this patch set is to refactor these code. Reduce the difficulty of subsequent maintenance. Subsequent developers will not introduce new bugs because of some complex logical
2023 Mar 15
10
[RFC net-next 0/8] virtio_net: refactor xdp codes
Due to historical reasons, the implementation of XDP in virtio-net is relatively chaotic. For example, the processing of XDP actions has two copies of similar code. Such as page, xdp_page processing, etc. The purpose of this patch set is to refactor these code. Reduce the difficulty of subsequent maintenance. Subsequent developers will not introduce new bugs because of some complex logical
2017 Jul 18
1
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...*rq, > @@ -415,12 +476,14 @@ static struct sk_buff *receive_small(struct net_device *dev, > { > struct sk_buff *skb; > struct bpf_prog *xdp_prog; > - unsigned int xdp_headroom = virtnet_get_headroom(vi); > + unsigned int xdp_headroom = (unsigned long)ctx; > unsigned int header_offset = VIRTNET_RX_PAD + xdp_headroom; > unsigned int headroom = vi->hdr_len + header_offset; > unsigned int buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + > SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); > + struct page *page = virt_to_head_page(buf); > unsigned...
2017 Jul 18
1
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...*rq, > @@ -415,12 +476,14 @@ static struct sk_buff *receive_small(struct net_device *dev, > { > struct sk_buff *skb; > struct bpf_prog *xdp_prog; > - unsigned int xdp_headroom = virtnet_get_headroom(vi); > + unsigned int xdp_headroom = (unsigned long)ctx; > unsigned int header_offset = VIRTNET_RX_PAD + xdp_headroom; > unsigned int headroom = vi->hdr_len + header_offset; > unsigned int buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + > SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); > + struct page *page = virt_to_head_page(buf); > unsigned...
2018 Mar 01
0
[PATCH net-next 2/2] virtio-net: simplify XDP handling in small buffer
...en headroom is not enough because + * the buffer was refilled before XDP is set. This + * only happen for several packets, for simplicity, + * offload them to generic XDP routine. + */ if (unlikely(xdp_headroom < virtnet_get_headroom(vi))) { - int offset = buf - page_address(page) + header_offset; - unsigned int tlen = len + vi->hdr_len; - u16 num_buf = 1; - - xdp_headroom = virtnet_get_headroom(vi); - header_offset = VIRTNET_RX_PAD + xdp_headroom; - headroom = vi->hdr_len + header_offset; - buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + - SKB_DATA_ALIGN(sizeof(...
2017 Jul 17
0
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...*vi, struct receive_queue *rq, @@ -415,12 +476,14 @@ static struct sk_buff *receive_small(struct net_device *dev, { struct sk_buff *skb; struct bpf_prog *xdp_prog; - unsigned int xdp_headroom = virtnet_get_headroom(vi); + unsigned int xdp_headroom = (unsigned long)ctx; unsigned int header_offset = VIRTNET_RX_PAD + xdp_headroom; unsigned int headroom = vi->hdr_len + header_offset; unsigned int buflen = SKB_DATA_ALIGN(GOOD_PACKET_LEN + headroom) + SKB_DATA_ALIGN(sizeof(struct skb_shared_info)); + struct page *page = virt_to_head_page(buf); unsigned int delta = 0; + struct...
2017 Jul 17
13
[PATCH net-next 0/5] refine virtio-net XDP
Hi: This series brings two optimizations for virtio-net XDP: - avoid reset during XDP set - turn off offloads on demand Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as the ctx virtio-net: pack headroom into ctx for mergeable buffer virtio-net: switch to use new ctx API for small buffer virtio-net: do not reset during XDP set virtio-net: switch off offloads
2017 Jul 17
13
[PATCH net-next 0/5] refine virtio-net XDP
Hi: This series brings two optimizations for virtio-net XDP: - avoid reset during XDP set - turn off offloads on demand Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as the ctx virtio-net: pack headroom into ctx for mergeable buffer virtio-net: switch to use new ctx API for small buffer virtio-net: do not reset during XDP set virtio-net: switch off offloads
2023 Mar 31
1
[PATCH] drm/nouveau/acr: remove unused loc variable
...ret = nvkm_firmware_load_name(subdev, path, "hs_bl_sig", ver, &hsbl); if (ret) @@ -227,7 +227,6 @@ nvkm_acr_lsfw_load_sig_image_desc_v2(struct nvkm_subdev *subdev, hdr = nvfw_ls_hsbl_bin_hdr(subdev, hsbl->data); hshdr = nvfw_ls_hsbl_hdr(subdev, hsbl->data + hdr->header_offset); meta = (u32 *)(hsbl->data + hshdr->meta_data_offset); - loc = *(u32 *)(hsbl->data + hshdr->patch_loc); sig = *(u32 *)(hsbl->data + hshdr->patch_sig); cnt = *(u32 *)(hsbl->data + hshdr->num_sig); -- 2.27.0
2016 Nov 02
0
[PATCH v3 07/15] secboot: generate HS BL descriptor in hook
...gm200_secboot_populate_hsf_bl_desc() - populate BL descriptor for HS image - */ -static void -gm200_secboot_populate_hsf_bl_desc(void *acr_image, - struct gm200_flcn_bl_desc *bl_desc) -{ - struct fw_bin_header *hsbin_hdr = acr_image; - struct hsf_fw_header *fw_hdr = acr_image + hsbin_hdr->header_offset; - struct hsf_load_header *load_hdr = acr_image + fw_hdr->hdr_offset; - - /* - * Descriptor for the bootloader that will load the ACR image into - * IMEM/DMEM memory. - */ - fw_hdr = acr_image + hsbin_hdr->header_offset; - load_hdr = acr_image + fw_hdr->hdr_offset; - memset(bl_desc, 0,...
2023 Jun 09
1
[RESEND 06/15] drm/nouveau/nvkm/subdev/acr/lsfw: Remove unused variable 'loc'
...ret = nvkm_firmware_load_name(subdev, path, "hs_bl_sig", ver, &hsbl); if (ret) @@ -227,7 +227,6 @@ nvkm_acr_lsfw_load_sig_image_desc_v2(struct nvkm_subdev *subdev, hdr = nvfw_ls_hsbl_bin_hdr(subdev, hsbl->data); hshdr = nvfw_ls_hsbl_hdr(subdev, hsbl->data + hdr->header_offset); meta = (u32 *)(hsbl->data + hshdr->meta_data_offset); - loc = *(u32 *)(hsbl->data + hshdr->patch_loc); sig = *(u32 *)(hsbl->data + hshdr->patch_sig); cnt = *(u32 *)(hsbl->data + hshdr->num_sig); -- 2.41.0.162.gfafddb0af9-goog
2016 Feb 24
0
[PATCH v3 10/11] secboot/gm200: add secure-boot support
...+ FALCON_DMAIDX_PHYS_VID = 2, + FALCON_DMAIDX_PHYS_SYS_COH = 3, + FALCON_DMAIDX_PHYS_SYS_NCOH = 4, +}; + +/** + * struct fw_bin_header - header of firmware files + * @bin_magic: always 0x3b1d14f0 + * @bin_ver: version of the bin format + * @bin_size: entire image size including this header + * @header_offset: offset of the firmware/bootloader header in the file + * @data_offset: offset of the firmware/bootloader payload in the file + * @data_size: size of the payload + * + * This header is located at the beginning of the HS firmware and HS bootloader + * files, to describe where the headers and data c...
2017 Jul 19
9
[PATCH net-next V2 0/5] Refine virtio-net XDP
Hi: This series brings two optimizations for virtio-net XDP: - avoid reset during XDP set - turn off offloads on demand Changes from V1: - Various tweaks on commit logs and comments - Use virtnet_napi_enable() when enabling NAPI on XDP set - Copy the small buffer packet only if xdp_headroom is smaller than required Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as
2017 Jul 19
9
[PATCH net-next V2 0/5] Refine virtio-net XDP
Hi: This series brings two optimizations for virtio-net XDP: - avoid reset during XDP set - turn off offloads on demand Changes from V1: - Various tweaks on commit logs and comments - Use virtnet_napi_enable() when enabling NAPI on XDP set - Copy the small buffer packet only if xdp_headroom is smaller than required Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as
2018 Mar 01
2
[PATCH net-next 2/2] virtio-net: simplify XDP handling in small buffer
...-path, even after a long time when XDP were attached. This worries me a bit, for troubleshooting purposes... as this can give a strange user experience given point #1. > + */ > if (unlikely(xdp_headroom < virtnet_get_headroom(vi))) { > - int offset = buf - page_address(page) + header_offset; > - unsigned int tlen = len + vi->hdr_len; > - u16 num_buf = 1; -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer
2018 Mar 01
2
[PATCH net-next 2/2] virtio-net: simplify XDP handling in small buffer
...-path, even after a long time when XDP were attached. This worries me a bit, for troubleshooting purposes... as this can give a strange user experience given point #1. > + */ > if (unlikely(xdp_headroom < virtnet_get_headroom(vi))) { > - int offset = buf - page_address(page) + header_offset; > - unsigned int tlen = len + vi->hdr_len; > - u16 num_buf = 1; -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer
2018 Mar 01
7
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
Hi: This series tries to re-enable XDP_REDIRECT for mergeable buffer which was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). Main concerns are: - not enough tailroom was reserved which breaks cpumap - complex logic like EWMA and linearizing during XDP processing Fix those by: - reserve enough tailroom during refill - disable EWMA
2018 Mar 01
7
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
Hi: This series tries to re-enable XDP_REDIRECT for mergeable buffer which was removed since commit 7324f5399b06 ("virtio_net: disable XDP_REDIRECT in receive_mergeable() case"). Main concerns are: - not enough tailroom was reserved which breaks cpumap - complex logic like EWMA and linearizing during XDP processing Fix those by: - reserve enough tailroom during refill - disable EWMA