* [PATCH mptcp-next] chtls: rename skb_entail() to chtls_skb_entail()
@ 2021-09-09 8:43 Paolo Abeni
2021-09-09 16:16 ` Mat Martineau
2021-09-11 6:06 ` Matthieu Baerts
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Abeni @ 2021-09-09 8:43 UTC (permalink / raw)
To: mptcp
The next patch will expose the core TCP helper with the same
name. It looks like we can't trivially re-use it in chtls, so
remame the driver specific's one to avoid name conflicts.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
notes:
- this should land before "tcp: expose the tcp_mark_push() and skb_entail()
helpers"
- just build tested, I lack the relevant H/W to do anything better
- we need to CC the appropriate chelsio maintainer when submitting
this patch upstream
- I did not add the reported-by buildbot tag. as there will no issue
with the patch applied in order, but I guess it can be added, too
---
.../net/ethernet/chelsio/inline_crypto/chtls/chtls.h | 2 +-
.../ethernet/chelsio/inline_crypto/chtls/chtls_cm.c | 2 +-
.../ethernet/chelsio/inline_crypto/chtls/chtls_io.c | 10 +++++-----
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h
index 9e2378013642..4b57e58845b0 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h
@@ -580,7 +580,7 @@ void chtls_set_tcb_field_rpl_skb(struct sock *sk, u16 word,
int through_l2t);
int chtls_setkey(struct chtls_sock *csk, u32 keylen, u32 mode, int cipher_type);
void chtls_set_quiesce_ctrl(struct sock *sk, int val);
-void skb_entail(struct sock *sk, struct sk_buff *skb, int flags);
+void chtls_skb_entail(struct sock *sk, struct sk_buff *skb, int flags);
unsigned int keyid_to_addr(int start_addr, int keyid);
void free_tls_keyid(struct sock *sk);
#endif
diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
index bcad69c48074..dfa2bfc9638e 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
@@ -317,7 +317,7 @@ static void chtls_close_conn(struct sock *sk)
OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_CLOSE_CON_REQ, tid));
tcp_uncork(sk);
- skb_entail(sk, skb, ULPCB_FLAG_NO_HDR | ULPCB_FLAG_NO_APPEND);
+ chtls_skb_entail(sk, skb, ULPCB_FLAG_NO_HDR | ULPCB_FLAG_NO_APPEND);
if (sk->sk_state != TCP_SYN_SENT)
chtls_push_frames(csk, 1);
}
diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
index c320cc8ca68d..05cf45098462 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
@@ -119,8 +119,8 @@ static int send_flowc_wr(struct sock *sk, struct fw_flowc_wr *flowc,
if (!skb)
return -ENOMEM;
- skb_entail(sk, skb,
- ULPCB_FLAG_NO_HDR | ULPCB_FLAG_NO_APPEND);
+ chtls_skb_entail(sk, skb,
+ ULPCB_FLAG_NO_HDR | ULPCB_FLAG_NO_APPEND);
return 0;
}
@@ -816,7 +816,7 @@ static int select_size(struct sock *sk, int io_len, int flags, int len)
return io_len;
}
-void skb_entail(struct sock *sk, struct sk_buff *skb, int flags)
+void chtls_skb_entail(struct sock *sk, struct sk_buff *skb, int flags)
{
struct chtls_sock *csk = rcu_dereference_sk_user_data(sk);
struct tcp_sock *tp = tcp_sk(sk);
@@ -840,7 +840,7 @@ static struct sk_buff *get_tx_skb(struct sock *sk, int size)
skb = alloc_skb(size + TX_HEADER_LEN, sk->sk_allocation);
if (likely(skb)) {
skb_reserve(skb, TX_HEADER_LEN);
- skb_entail(sk, skb, ULPCB_FLAG_NEED_HDR);
+ chtls_skb_entail(sk, skb, ULPCB_FLAG_NEED_HDR);
skb_reset_transport_header(skb);
}
return skb;
@@ -857,7 +857,7 @@ static struct sk_buff *get_record_skb(struct sock *sk, int size, bool zcopy)
if (likely(skb)) {
skb_reserve(skb, (TX_TLSHDR_LEN +
KEY_ON_MEM_SZ + max_ivs_size(sk, size)));
- skb_entail(sk, skb, ULPCB_FLAG_NEED_HDR);
+ chtls_skb_entail(sk, skb, ULPCB_FLAG_NEED_HDR);
skb_reset_transport_header(skb);
ULP_SKB_CB(skb)->ulp.tls.ofld = 1;
ULP_SKB_CB(skb)->ulp.tls.type = csk->tlshws.type;
--
2.26.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH mptcp-next] chtls: rename skb_entail() to chtls_skb_entail()
2021-09-09 8:43 [PATCH mptcp-next] chtls: rename skb_entail() to chtls_skb_entail() Paolo Abeni
@ 2021-09-09 16:16 ` Mat Martineau
2021-09-11 6:06 ` Matthieu Baerts
1 sibling, 0 replies; 3+ messages in thread
From: Mat Martineau @ 2021-09-09 16:16 UTC (permalink / raw)
To: Paolo Abeni; +Cc: mptcp
On Thu, 9 Sep 2021, Paolo Abeni wrote:
> The next patch will expose the core TCP helper with the same
> name. It looks like we can't trivially re-use it in chtls, so
> remame the driver specific's one to avoid name conflicts.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> notes:
> - this should land before "tcp: expose the tcp_mark_push() and skb_entail()
> helpers"
> - just build tested, I lack the relevant H/W to do anything better
> - we need to CC the appropriate chelsio maintainer when submitting
> this patch upstream
Yes, noted.
Patch looks good for the export branch, thanks!
Acked-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
> - I did not add the reported-by buildbot tag. as there will no issue
> with the patch applied in order, but I guess it can be added, too
> ---
> .../net/ethernet/chelsio/inline_crypto/chtls/chtls.h | 2 +-
> .../ethernet/chelsio/inline_crypto/chtls/chtls_cm.c | 2 +-
> .../ethernet/chelsio/inline_crypto/chtls/chtls_io.c | 10 +++++-----
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h
> index 9e2378013642..4b57e58845b0 100644
> --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h
> +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls.h
> @@ -580,7 +580,7 @@ void chtls_set_tcb_field_rpl_skb(struct sock *sk, u16 word,
> int through_l2t);
> int chtls_setkey(struct chtls_sock *csk, u32 keylen, u32 mode, int cipher_type);
> void chtls_set_quiesce_ctrl(struct sock *sk, int val);
> -void skb_entail(struct sock *sk, struct sk_buff *skb, int flags);
> +void chtls_skb_entail(struct sock *sk, struct sk_buff *skb, int flags);
> unsigned int keyid_to_addr(int start_addr, int keyid);
> void free_tls_keyid(struct sock *sk);
> #endif
> diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
> index bcad69c48074..dfa2bfc9638e 100644
> --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
> +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c
> @@ -317,7 +317,7 @@ static void chtls_close_conn(struct sock *sk)
> OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_CLOSE_CON_REQ, tid));
>
> tcp_uncork(sk);
> - skb_entail(sk, skb, ULPCB_FLAG_NO_HDR | ULPCB_FLAG_NO_APPEND);
> + chtls_skb_entail(sk, skb, ULPCB_FLAG_NO_HDR | ULPCB_FLAG_NO_APPEND);
> if (sk->sk_state != TCP_SYN_SENT)
> chtls_push_frames(csk, 1);
> }
> diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
> index c320cc8ca68d..05cf45098462 100644
> --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
> +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
> @@ -119,8 +119,8 @@ static int send_flowc_wr(struct sock *sk, struct fw_flowc_wr *flowc,
> if (!skb)
> return -ENOMEM;
>
> - skb_entail(sk, skb,
> - ULPCB_FLAG_NO_HDR | ULPCB_FLAG_NO_APPEND);
> + chtls_skb_entail(sk, skb,
> + ULPCB_FLAG_NO_HDR | ULPCB_FLAG_NO_APPEND);
> return 0;
> }
>
> @@ -816,7 +816,7 @@ static int select_size(struct sock *sk, int io_len, int flags, int len)
> return io_len;
> }
>
> -void skb_entail(struct sock *sk, struct sk_buff *skb, int flags)
> +void chtls_skb_entail(struct sock *sk, struct sk_buff *skb, int flags)
> {
> struct chtls_sock *csk = rcu_dereference_sk_user_data(sk);
> struct tcp_sock *tp = tcp_sk(sk);
> @@ -840,7 +840,7 @@ static struct sk_buff *get_tx_skb(struct sock *sk, int size)
> skb = alloc_skb(size + TX_HEADER_LEN, sk->sk_allocation);
> if (likely(skb)) {
> skb_reserve(skb, TX_HEADER_LEN);
> - skb_entail(sk, skb, ULPCB_FLAG_NEED_HDR);
> + chtls_skb_entail(sk, skb, ULPCB_FLAG_NEED_HDR);
> skb_reset_transport_header(skb);
> }
> return skb;
> @@ -857,7 +857,7 @@ static struct sk_buff *get_record_skb(struct sock *sk, int size, bool zcopy)
> if (likely(skb)) {
> skb_reserve(skb, (TX_TLSHDR_LEN +
> KEY_ON_MEM_SZ + max_ivs_size(sk, size)));
> - skb_entail(sk, skb, ULPCB_FLAG_NEED_HDR);
> + chtls_skb_entail(sk, skb, ULPCB_FLAG_NEED_HDR);
> skb_reset_transport_header(skb);
> ULP_SKB_CB(skb)->ulp.tls.ofld = 1;
> ULP_SKB_CB(skb)->ulp.tls.type = csk->tlshws.type;
> --
> 2.26.3
>
>
>
--
Mat Martineau
Intel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH mptcp-next] chtls: rename skb_entail() to chtls_skb_entail()
2021-09-09 8:43 [PATCH mptcp-next] chtls: rename skb_entail() to chtls_skb_entail() Paolo Abeni
2021-09-09 16:16 ` Mat Martineau
@ 2021-09-11 6:06 ` Matthieu Baerts
1 sibling, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2021-09-11 6:06 UTC (permalink / raw)
To: Paolo Abeni, mptcp
Hi Paolo,
On 09/09/2021 10:43, Paolo Abeni wrote:
> The next patch will expose the core TCP helper with the same
> name. It looks like we can't trivially re-use it in chtls, so
> remame the driver specific's one to avoid name conflicts.
>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> notes:
> - this should land before "tcp: expose the tcp_mark_push() and skb_entail()
> helpers"
> - just build tested, I lack the relevant H/W to do anything better
> - we need to CC the appropriate chelsio maintainer when submitting
> this patch upstream
> - I did not add the reported-by buildbot tag. as there will no issue
> with the patch applied in order, but I guess it can be added, too
Thank you for the patch and the review! Added in our tree before "tcp:
expose the tcp_mark_push() and skb_entail() helpers" and with Mat's ACK.
- 99bd188ec0e2: chtls: rename skb_entail() to chtls_skb_entail()
- 5f3ea6614848: tg:msg: add missing Reported-by tag
- Results: fecd1f9bf19f..98e7006b1e5b
Builds and tests are now in progress:
https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20210911T060609
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export/20210911T060609
Cheers,
Matt
--
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-09-11 6:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 8:43 [PATCH mptcp-next] chtls: rename skb_entail() to chtls_skb_entail() Paolo Abeni
2021-09-09 16:16 ` Mat Martineau
2021-09-11 6:06 ` Matthieu Baerts
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.