* Re: [PATCH net-next v6 04/10] enic: add admin CQ service with MSI-X interrupt and NAPI polling
[not found] ` <20260503-enic-sriov-v2-admin-channel-v2-v6-4-0af4fbc2d86d@cisco.com>
@ 2026-05-07 8:03 ` Paolo Abeni
2026-05-07 8:06 ` Paolo Abeni
2026-05-07 9:42 ` Paolo Abeni
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2026-05-07 8:03 UTC (permalink / raw)
To: Satish Kharat, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski
Cc: netdev, linux-kernel, Sesidhar Baddela
On 5/3/26 1:22 PM, Satish Kharat wrote:
> +static void enic_admin_msg_enqueue(struct enic *enic, void *buf,
> + unsigned int len)
> +{
> + struct enic_admin_msg *msg;
> +
> + msg = kmalloc(struct_size(msg, data, len), GFP_ATOMIC);
> + if (!msg) {
> + enic->admin_msg_drop_cnt++;
> + if (net_ratelimit())
> + netdev_warn(enic->netdev,
> + "admin msg enqueue drop (len=%u drops=%llu)\n",
> + len, enic->admin_msg_drop_cnt);
Failed allocation will splat dmesg; no need to added additional error
messages (here and elsewhere in the series).
/P
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next v6 04/10] enic: add admin CQ service with MSI-X interrupt and NAPI polling
[not found] ` <20260503-enic-sriov-v2-admin-channel-v2-v6-4-0af4fbc2d86d@cisco.com>
2026-05-07 8:03 ` [PATCH net-next v6 04/10] enic: add admin CQ service with MSI-X interrupt and NAPI polling Paolo Abeni
@ 2026-05-07 8:06 ` Paolo Abeni
2026-05-07 9:42 ` Paolo Abeni
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2026-05-07 8:06 UTC (permalink / raw)
To: Satish Kharat, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski
Cc: netdev, linux-kernel, Sesidhar Baddela
On 5/3/26 1:22 PM, Satish Kharat wrote:
> @@ -197,13 +429,47 @@ static void enic_admin_free_resources(struct enic *enic)
>
> static void enic_admin_init_resources(struct enic *enic)
> {
> + unsigned int intr_offset = enic->admin_intr_index;
> +
> vnic_wq_init(&enic->admin_wq, 0, 0, 0);
> vnic_rq_init(&enic->admin_rq, 1, 0, 0);
> - vnic_cq_init(&enic->admin_cq[0], 0, 1, 0, 0, 1, 0, 1, 0, 0, 0);
> - vnic_cq_init(&enic->admin_cq[1], 0, 1, 0, 0, 1, 0, 1, 0, 0, 0);
> + vnic_cq_init(&enic->admin_cq[0],
> + 0 /* flow_control_enable */,
Replacing magic numbers with macro with significant names would make the
code more readable with no need for additional comments.
/P
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next v6 04/10] enic: add admin CQ service with MSI-X interrupt and NAPI polling
[not found] ` <20260503-enic-sriov-v2-admin-channel-v2-v6-4-0af4fbc2d86d@cisco.com>
2026-05-07 8:03 ` [PATCH net-next v6 04/10] enic: add admin CQ service with MSI-X interrupt and NAPI polling Paolo Abeni
2026-05-07 8:06 ` Paolo Abeni
@ 2026-05-07 9:42 ` Paolo Abeni
2 siblings, 0 replies; 4+ messages in thread
From: Paolo Abeni @ 2026-05-07 9:42 UTC (permalink / raw)
To: Satish Kharat, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski
Cc: netdev, linux-kernel, Sesidhar Baddela
On 5/3/26 1:22 PM, Satish Kharat wrote:
> +static void enic_admin_msg_enqueue(struct enic *enic, void *buf,
> + unsigned int len)
> +{
> + struct enic_admin_msg *msg;
> +
> + msg = kmalloc(struct_size(msg, data, len), GFP_ATOMIC);
> + if (!msg) {
> + enic->admin_msg_drop_cnt++;
> + if (net_ratelimit())
> + netdev_warn(enic->netdev,
> + "admin msg enqueue drop (len=%u drops=%llu)\n",
> + len, enic->admin_msg_drop_cnt);
Failed allocation will splat dmesg; no need to added additional error
messages (here and elsewhere in the series).
/P
^ permalink raw reply [flat|nested] 4+ messages in thread