Displaying 9 results from an estimated 9 matches for "page_to_free".
Did you mean:
pages_to_free
2023 Aug 21
3
[PATCH net-next v3] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...r *)skb->cb;
}
/*
@@ -469,7 +478,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
unsigned int headroom)
{
struct sk_buff *skb;
- struct virtio_net_hdr_mrg_rxbuf *hdr;
+ struct virtio_net_common_hdr *hdr;
unsigned int copy, hdr_len, hdr_padded_len;
struct page *page_to_free = NULL;
int tailroom, shinfo_size;
@@ -554,7 +563,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
give_pages(rq, page);
ok:
- hdr = skb_vnet_hdr(skb);
+ hdr = skb_vnet_common_hdr(skb);
memcpy(hdr, hdr_p, hdr_len);
if (page_to_free)
put_page(page_to_free);
@@ -966,7 +...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...r *)skb->cb;
}
/*
@@ -469,7 +477,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
unsigned int headroom)
{
struct sk_buff *skb;
- struct virtio_net_hdr_mrg_rxbuf *hdr;
+ struct virtio_net_common_hdr *hdr;
unsigned int copy, hdr_len, hdr_padded_len;
struct page *page_to_free = NULL;
int tailroom, shinfo_size;
@@ -554,7 +562,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
give_pages(rq, page);
ok:
- hdr = skb_vnet_hdr(skb);
+ hdr = skb_vnet_common_hdr(skb);
memcpy(hdr, hdr_p, hdr_len);
if (page_to_free)
put_page(page_to_free);
@@ -966,7 +...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...et_info *vi,
> unsigned int headroom)
> {
> struct sk_buff *skb;
> - struct virtio_net_hdr_mrg_rxbuf *hdr;
> + struct virtio_net_common_hdr *hdr;
> unsigned int copy, hdr_len, hdr_padded_len;
> struct page *page_to_free = NULL;
> int tailroom, shinfo_size;
> @@ -554,7 +562,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
> give_pages(rq, page);
>
> ok:
> - hdr = skb_vnet_hdr(skb);
> + hdr = skb_vnet_common_hdr(skb);
> memcpy(hdr,...
2023 Aug 15
1
[PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...; > > {
> > > > struct sk_buff *skb;
> > > > - struct virtio_net_hdr_mrg_rxbuf *hdr;
> > > > + struct virtio_net_common_hdr *hdr;
> > > > unsigned int copy, hdr_len, hdr_padded_len;
> > > > struct page *page_to_free = NULL;
> > > > int tailroom, shinfo_size;
> > > > @@ -554,7 +555,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
> > > > give_pages(rq, page);
> > > >
> > > > ok:
> > > > - hdr = sk...
2023 Aug 15
1
[PATCH net v1] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...; > > {
> > > > struct sk_buff *skb;
> > > > - struct virtio_net_hdr_mrg_rxbuf *hdr;
> > > > + struct virtio_net_common_hdr *hdr;
> > > > unsigned int copy, hdr_len, hdr_padded_len;
> > > > struct page *page_to_free = NULL;
> > > > int tailroom, shinfo_size;
> > > > @@ -554,7 +555,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
> > > > give_pages(rq, page);
> > > >
> > > > ok:
> > > > - hdr = sk...
2023 Aug 17
1
[PATCH net-next v2] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting
...unsigned int headroom)
>> {
>> struct sk_buff *skb;
>> - struct virtio_net_hdr_mrg_rxbuf *hdr;
>> + struct virtio_net_common_hdr *hdr;
>> unsigned int copy, hdr_len, hdr_padded_len;
>> struct page *page_to_free = NULL;
>> int tailroom, shinfo_size;
>> @@ -554,7 +562,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
>> give_pages(rq, page);
>>
>> ok:
>> - hdr = skb_vnet_hdr(skb);
>> + hdr = skb_vnet_common_hdr(...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...virtqueues with small vrings? */
+ bool svring;
+
/* CPU hotplug instances for online & dead */
struct hlist_node node;
struct hlist_node node_dead;
@@ -455,6 +463,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
unsigned int copy, hdr_len, hdr_padded_len;
struct page *page_to_free = NULL;
int tailroom, shinfo_size;
+ u16 max_frags = MAX_SKB_FRAGS;
char *p, *hdr_p, *buf;
p = page_address(page) + offset;
@@ -520,7 +529,10 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
* tries to receive more than is possible. This is usually
* the case of a broken...
2023 Apr 30
1
[RFC PATCH net 2/3] virtio-net: allow usage of vrings smaller than MAX_SKB_FRAGS + 2
...ngs? some tx rings? names should make it clear.
also do we really need bool svring? can't we just check single_pkt_max_descs
all the time?
> @@ -455,6 +463,7 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
> unsigned int copy, hdr_len, hdr_padded_len;
> struct page *page_to_free = NULL;
> int tailroom, shinfo_size;
> + u16 max_frags = MAX_SKB_FRAGS;
> char *p, *hdr_p, *buf;
>
> p = page_address(page) + offset;
> @@ -520,7 +529,10 @@ static struct sk_buff *page_to_skb(struct virtnet_info *vi,
> * tries to receive more than is possible. This i...
2023 Apr 30
5
[RFC PATCH net 0/3] virtio-net: allow usage of small vrings
At the moment, if a virtio network device uses vrings with less than
MAX_SKB_FRAGS + 2 entries, the device won't be functional.
The following condition vq->num_free >= 2 + MAX_SKB_FRAGS will always
evaluate to false, leading to TX timeouts.
This patchset attempts this fix this bug, and to allow small rings down
to 4 entries.
The first patch introduces a new mechanism in virtio core -