OSDN Git Service

gve: Add support for raw addressing device option
authorCatherine Sullivan <csully@google.com>
Mon, 7 Dec 2020 22:45:23 +0000 (14:45 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Dec 2020 00:06:28 +0000 (16:06 -0800)
commit4944db80ac1133fe4acb0c9756758da088338b26
tree5aa0f3ab319fc725f969d6fe5df14d332b2f9f8e
parent8354bcbebd26325c9efeb6682a3e14fbbc8ace95
gve: Add support for raw addressing device option

Add support to describe device for parsing device options. As
the first device option, add raw addressing.

"Raw Addressing" mode (as opposed to the current "qpl" mode) is an
operational mode which allows the driver avoid bounce buffer copies
which it currently performs using pre-allocated qpls (queue_page_lists)
when sending and receiving packets.
For egress packets, the provided skb data addresses will be dma_map'ed and
passed to the device, allowing the NIC can perform DMA directly - the
driver will not have to copy the buffer content into pre-allocated
buffers/qpls (as in qpl mode).
For ingress packets, copies are also eliminated as buffers are handed to
the networking stack and then recycled or re-allocated as
necessary, avoiding the use of skb_copy_to_linear_data().

This patch only introduces the option to the driver.
Subsequent patches will add the ingress and egress functionality.

Reviewed-by: Yangchun Fu <yangchun@google.com>
Signed-off-by: Catherine Sullivan <csully@google.com>
Signed-off-by: David Awogbemila <awogbemila@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/google/gve/gve.h
drivers/net/ethernet/google/gve/gve_adminq.c
drivers/net/ethernet/google/gve/gve_adminq.h
drivers/net/ethernet/google/gve/gve_main.c