Netdev List
 help / color / mirror / Atom feed
From: Alex Elder <elder@ieee.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	elder@kernel.org, Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next 1/6] net: ipa: remove ethernet-specific artifacts from modem netdev setup
Date: Tue, 24 Nov 2026 11:57:14 -0600	[thread overview]
Message-ID: <91234e5b-6684-4acb-91b3-be8ab11ac032@ieee.org> (raw)
In-Reply-To: <20261124170551.1874487-2-willemdebruijn.kernel@gmail.com>

On 11/24/26 11:05 AM, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
> 
> Commit 75944b040bbc ("net: ipa: open-code ether_setup()") open-coded
> ether_setup(), including fields that do not apply to this headerless
> ARPHRD_RAWIP device:
> 
> - min_header_len = ETH_HLEN, while hard_header_len is 0
> - an Ethernet broadcast address, while addr_len is 0
> - clearing IFF_BROADCAST | IFF_MULTICAST, which are never set
> 
> Remove these and the now unused etherdevice.h include.
> 
> With min_header_len left at 0, the device behaves like other headerless
> devices (such as tun and rmnet) in af_packet's vlan_get_tci(), where
> min_header_len == hard_header_len instead of returning early on the
> mismatch. Normal IPA traffic uses ETH_P_MAP rather than a VLAN
> ethertype, so it is unaffected.
> 
> Cc: Alex Elder <elder@kernel.org>
> Signed-off-by: Willem de Bruijn <willemb@google.com>

This looks pretty reasonable to me.  The "don't open-code"
change was meant to avoid duplicate code.  All the assignments
were preserved, but I didn't fully understand how these fields
were used.

For now I'll just ack this.  If I manage to get my system up
to test this, I'll do that and provide a Reviewed-by, but I'm
not sure I'll get to that soon.

Acked-by: Alex Elder <elder@riscstar.com>


> ---
>   drivers/net/ipa/ipa_modem.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/net/ipa/ipa_modem.c b/drivers/net/ipa/ipa_modem.c
> index d84c1dbd3b1a..e8392d9d3a4f 100644
> --- a/drivers/net/ipa/ipa_modem.c
> +++ b/drivers/net/ipa/ipa_modem.c
> @@ -5,7 +5,6 @@
>    */
>   
>   #include <linux/errno.h>
> -#include <linux/etherdevice.h>
>   #include <linux/if_arp.h>
>   #include <linux/if_rmnet.h>
>   #include <linux/netdevice.h>
> @@ -223,15 +222,12 @@ static void ipa_modem_netdev_setup(struct net_device *netdev)
>   	netdev->header_ops = NULL;
>   	netdev->type = ARPHRD_RAWIP;
>   	netdev->hard_header_len = 0;
> -	netdev->min_header_len = ETH_HLEN;
>   	netdev->min_mtu = ETH_MIN_MTU;
>   	netdev->max_mtu = IPA_MTU;
>   	netdev->mtu = netdev->max_mtu;
>   	netdev->addr_len = 0;
>   	netdev->tx_queue_len = DEFAULT_TX_QUEUE_LEN;
> -	netdev->flags &= ~(IFF_BROADCAST | IFF_MULTICAST);
>   	netdev->priv_flags |= IFF_TX_SKB_SHARING;
> -	eth_broadcast_addr(netdev->broadcast);
>   
>   	/* The endpoint is configured for QMAP */
>   	netdev->needed_headroom = sizeof(struct rmnet_map_header);


  reply	other threads:[~2026-11-24 17:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 17:05 [PATCH net-next 0/6] net: remove dev_validate_header() and net_device::min_header_len Willem de Bruijn
2026-11-24 17:05 ` [PATCH net-next 1/6] net: ipa: remove ethernet-specific artifacts from modem netdev setup Willem de Bruijn
2026-11-24 17:57   ` Alex Elder [this message]
2026-11-26 17:49     ` willemb
2026-11-24 17:05 ` [PATCH net-next 2/6] net: remove header_ops->validate and dev_validate_header() Willem de Bruijn
2026-11-25 20:06   ` netdev-bot+sashiko
2026-11-24 17:05 ` [PATCH net-next 3/6] packet: validate TX header length before skb allocation Willem de Bruijn
2026-11-25 20:06   ` netdev-bot+sashiko
2026-11-24 17:05 ` [PATCH net-next 4/6] packet: reset network header on all headerless devices Willem de Bruijn
2026-11-24 17:05 ` [PATCH net-next 5/6] packet: use Ethernet header length in vlan_get_tci() Willem de Bruijn
2026-11-25 20:06   ` netdev-bot+sashiko
2026-11-24 17:05 ` [PATCH net-next 6/6] net: remove unused net_device::min_header_len Willem de Bruijn
2026-11-26 17:46 ` [PATCH net-next 0/6] net: remove dev_validate_header() and net_device::min_header_len willemb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=91234e5b-6684-4acb-91b3-be8ab11ac032@ieee.org \
    --to=elder@ieee.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=elder@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=willemb@google.com \
    --cc=willemdebruijn.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox