All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: "Seevalamuthu M \(QUIC\)" <quic_seevalam@quicinc.com>
Cc: "ath11k\@lists.infradead.org" <ath11k@lists.infradead.org>,
	 "linux-wireless\@vger.kernel.org"
	<linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath11k: Add support for dynamic vlan
Date: Fri, 03 Jun 2022 11:30:03 +0300	[thread overview]
Message-ID: <878rqeno8k.fsf@kernel.org> (raw)
In-Reply-To: <DM8PR02MB8199EBB0A4ACC6F64F8C92FFF62D9@DM8PR02MB8199.namprd02.prod.outlook.com> (Seevalamuthu M.'s message of "Tue, 8 Feb 2022 05:30:07 +0000")

"Seevalamuthu M (QUIC)" <quic_seevalam@quicinc.com> writes:

> Hi Kalle,
>
>> -----Original Message-----
>> From: Kalle Valo <kvalo@kernel.org>
>> Sent: Monday, January 17, 2022 6:03 PM
>> To: Seevalamuthu M (QUIC) <quic_seevalam@quicinc.com>
>> Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
>> Subject: Re: [PATCH] ath11k: Add support for dynamic vlan
>> 
>> Seevalamuthu Mariappan <quic_seevalam@quicinc.com> writes:
>> 
>> > Advertise AP-VLAN interface type for vlan support in driver.
>> > Metadata information in dp_tx is added to notify firmware that
>> > multicast/broadcast packets are encrypted in software.
>> >
>> > Tested-on: IPQ8074 hw2.0 AHB
>> > WLAN.HK.2.5.0.1-01073-QCAHKSWPL_SILICONZ-1
>> >
>> > Signed-off-by: Seevalamuthu Mariappan <quic_seevalam@quicinc.com>
>> 
>> [...]
>> 
>> > --- a/drivers/net/wireless/ath/ath11k/dp_tx.c
>> > +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
>> > @@ -78,6 +78,44 @@ enum hal_encrypt_type
>> ath11k_dp_tx_get_encrypt_type(u32 cipher)
>> >  	}
>> >  }
>> >
>> > +#define HTT_META_DATA_ALIGNMENT    0x8
>> > +
>> > +static int ath11k_dp_metadata_align_skb(struct sk_buff *skb, u8
>> > +align_len) {
>> > +	if (unlikely(skb_cow_head(skb, align_len)))
>> > +		return -ENOMEM;
>> > +
>> > +	skb_push(skb, align_len);
>> > +	memset(skb->data, 0, align_len);
>> > +	return 0;
>> > +}
>> 
>> [...]
>> 
>> > @@ -211,15 +250,42 @@ int ath11k_dp_tx(struct ath11k *ar, struct
>> ath11k_vif *arvif,
>> >  		goto fail_remove_idr;
>> >  	}
>> >
>> > +	/* Add metadata for sw encrypted vlan group traffic */
>> > +	if (!test_bit(ATH11K_FLAG_HW_CRYPTO_DISABLED, &ar->ab-
>> >dev_flags) &&
>> > +	    !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
>> > +	    !info->control.hw_key &&
>> > +	    ieee80211_has_protected(hdr->frame_control)) {
>> > +		/* HW requirement is that metadata should always point to a
>> > +		 * 8-byte aligned address. So we add alignment pad to start
>> of
>> > +		 * buffer. HTT Metadata should be ensured to be multiple of
>> 8-bytes
>> > +		 *  to get 8-byte aligned start address along with align_pad
>> added
>> > +		 */
>> > +		align_pad = ((unsigned long)skb->data) &
>> (HTT_META_DATA_ALIGNMENT - 1);
>> > +		ret = ath11k_dp_metadata_align_skb(skb, align_pad);
>> > +		if (unlikely(ret))
>> > +			goto fail_remove_idr;
>> 
>> If you push the skb like that shouldn't you also reserve the room for it in
>> struct ieee80211_hw::extra_tx_headroom?
>
> [seevalam] : already this is handled using skb_cow_head() in
> ath11k_dp_metadata_align_skb().

Indeed, I missed that.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@kernel.org>
To: "Seevalamuthu M \(QUIC\)" <quic_seevalam@quicinc.com>
Cc: "ath11k\@lists.infradead.org" <ath11k@lists.infradead.org>,
	"linux-wireless\@vger.kernel.org"
	<linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath11k: Add support for dynamic vlan
Date: Fri, 03 Jun 2022 11:30:03 +0300	[thread overview]
Message-ID: <878rqeno8k.fsf@kernel.org> (raw)
In-Reply-To: <DM8PR02MB8199EBB0A4ACC6F64F8C92FFF62D9@DM8PR02MB8199.namprd02.prod.outlook.com> (Seevalamuthu M.'s message of "Tue, 8 Feb 2022 05:30:07 +0000")

"Seevalamuthu M (QUIC)" <quic_seevalam@quicinc.com> writes:

> Hi Kalle,
>
>> -----Original Message-----
>> From: Kalle Valo <kvalo@kernel.org>
>> Sent: Monday, January 17, 2022 6:03 PM
>> To: Seevalamuthu M (QUIC) <quic_seevalam@quicinc.com>
>> Cc: ath11k@lists.infradead.org; linux-wireless@vger.kernel.org
>> Subject: Re: [PATCH] ath11k: Add support for dynamic vlan
>> 
>> Seevalamuthu Mariappan <quic_seevalam@quicinc.com> writes:
>> 
>> > Advertise AP-VLAN interface type for vlan support in driver.
>> > Metadata information in dp_tx is added to notify firmware that
>> > multicast/broadcast packets are encrypted in software.
>> >
>> > Tested-on: IPQ8074 hw2.0 AHB
>> > WLAN.HK.2.5.0.1-01073-QCAHKSWPL_SILICONZ-1
>> >
>> > Signed-off-by: Seevalamuthu Mariappan <quic_seevalam@quicinc.com>
>> 
>> [...]
>> 
>> > --- a/drivers/net/wireless/ath/ath11k/dp_tx.c
>> > +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
>> > @@ -78,6 +78,44 @@ enum hal_encrypt_type
>> ath11k_dp_tx_get_encrypt_type(u32 cipher)
>> >  	}
>> >  }
>> >
>> > +#define HTT_META_DATA_ALIGNMENT    0x8
>> > +
>> > +static int ath11k_dp_metadata_align_skb(struct sk_buff *skb, u8
>> > +align_len) {
>> > +	if (unlikely(skb_cow_head(skb, align_len)))
>> > +		return -ENOMEM;
>> > +
>> > +	skb_push(skb, align_len);
>> > +	memset(skb->data, 0, align_len);
>> > +	return 0;
>> > +}
>> 
>> [...]
>> 
>> > @@ -211,15 +250,42 @@ int ath11k_dp_tx(struct ath11k *ar, struct
>> ath11k_vif *arvif,
>> >  		goto fail_remove_idr;
>> >  	}
>> >
>> > +	/* Add metadata for sw encrypted vlan group traffic */
>> > +	if (!test_bit(ATH11K_FLAG_HW_CRYPTO_DISABLED, &ar->ab-
>> >dev_flags) &&
>> > +	    !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) &&
>> > +	    !info->control.hw_key &&
>> > +	    ieee80211_has_protected(hdr->frame_control)) {
>> > +		/* HW requirement is that metadata should always point to a
>> > +		 * 8-byte aligned address. So we add alignment pad to start
>> of
>> > +		 * buffer. HTT Metadata should be ensured to be multiple of
>> 8-bytes
>> > +		 *  to get 8-byte aligned start address along with align_pad
>> added
>> > +		 */
>> > +		align_pad = ((unsigned long)skb->data) &
>> (HTT_META_DATA_ALIGNMENT - 1);
>> > +		ret = ath11k_dp_metadata_align_skb(skb, align_pad);
>> > +		if (unlikely(ret))
>> > +			goto fail_remove_idr;
>> 
>> If you push the skb like that shouldn't you also reserve the room for it in
>> struct ieee80211_hw::extra_tx_headroom?
>
> [seevalam] : already this is handled using skb_cow_head() in
> ath11k_dp_metadata_align_skb().

Indeed, I missed that.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  parent reply	other threads:[~2022-06-03  8:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10  3:41 [PATCH] ath11k: Add support for dynamic vlan Seevalamuthu Mariappan
2022-01-10  3:41 ` Seevalamuthu Mariappan
2022-01-17 12:33 ` Kalle Valo
2022-01-17 12:33   ` Kalle Valo
2022-02-08  5:30   ` Seevalamuthu M (QUIC)
2022-02-08  5:30     ` Seevalamuthu M (QUIC)
2022-05-06 11:55     ` Seevalamuthu M (QUIC)
2022-05-06 11:55       ` Seevalamuthu M (QUIC)
2022-06-03  8:30     ` Kalle Valo [this message]
2022-06-03  8:30       ` Kalle Valo
2022-06-03  8:34 ` Kalle Valo
2022-06-03  8:34   ` Kalle Valo

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=878rqeno8k.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_seevalam@quicinc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.