Thread (28 messages) 28 messages, 3 authors, 2023-10-27

Re: [PATCH v17 01/20] net: Introduce direct data placement tcp offload

From: Jiri Pirko <jiri@resnulli.us>
Date: 2023-10-27 09:30:45
Also in: linux-nvme

Fri, Oct 27, 2023 at 11:07:58AM CEST, aaptel@nvidia.com wrote:
Jiri Pirko [off-list ref] writes:
quoted
quoted
@@ -2134,6 +2146,9 @@ struct net_device {
      netdev_features_t       mpls_features;
      netdev_features_t       gso_partial_features;

+#ifdef CONFIG_ULP_DDP
+      struct ulp_ddp_netdev_caps ulp_ddp_caps;
Why can't you have this inside the driver? You have set_caps/get_stats
ops. Try to avoid netdev struct pollution.
Ok, we will move ulp_ddp_caps to the driver and add a get_caps() operation.
quoted
quoted
+struct netlink_ulp_ddp_stats {
There is nothing "netlink" about this. Just stats. Exposed over netlink,
yes, but that does not need the prefix.
Ok, we will remove the netlink prefix.
quoted
quoted
+enum {
+      ULP_DDP_C_NVME_TCP_BIT,
+      ULP_DDP_C_NVME_TCP_DDGST_RX_BIT,
+
+      /*
+       * add capabilities above and keep in sync with
+       * Documentation/netlink/specs/ulp_ddp.yaml
Wait what? Why do you need this at all? Just use the uapi enum.
The generated enum does not define a "count" (ULP_DDP_C_COUNT) which we
need to know how big the bitfield should be. Maybe the code generator
can be patched to add a #define with the number of values in the enum?
Yeah. One way or another, don't duplicate the uapi enums.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help